Post Go back to editing

SSM I2C issue

Product Number: Audio amplifier SSM2380
Software Version: VIVADO 2021.1 with Vitis 2021.1

Hi all...

Good day,

We are working on communication system using AD9361 with xc7z030.

So I'm working with a xc7z030, vivado version 2021.1, and Vitis for Software.

I2C signals read back from audio amplifier(SSM2380) is not giving the expected register values. The read-back register values are always constant 0xFF.

Write is working and during read amplifier is acknowledging address but data is wrong.

a. VIVADO 2021.1 Screenshot for the Writing_0_to_Reg5.

b.  VIVADO 2021.1 Screenshot for the Reading_from_Reg5.

Kindly refer the attached picture.

Any help would be very appreciated, since I need to progress on my work.
Parents
  • Hello Analog404,

    Thanks for the screenshots. It was a little bit of work to decode but I think I see what is going on. 

    For the Read sequence. You are sending the Start then the device address with bit A0 set to {write) and then the address. This part is all correct. (Actually I have one comment later about the address)

     Then you send a repeated start with the device address but you have bit A0 low which is a write command. But A0 needs to be a "1" to set the interface to read the data from the address you just wrote before the repeated start. I think that is where you are going wrong. 

    Here is how it is defined in the datsheet:

    Regarding the address. It looks like you are sending three bytes for the address. The device only uses one byte for the register address. 

    Dave T

  • Hi all,

    Thank you for the reply. Our device address is 0x31 and in the waveform we are writing and reading from address 0x5. The SDA_I and SDA_O are the input and outputs of the tristate buffer driving the SDA line. In case of read, we are first writing the device address with A0 bit set to write (0), then register address, followed by restart condition and device address with A0 bit set to read (1) and keeping the bus tristate for next 8 clocks, then acknolweding it (by pulling down sda) again keeping bus at tristate  for 8 clocks and not acknowleging it followed by stop condition. Could you please reverify the waveforms are correct?

    Awaiting your reply....

Reply
  • Hi all,

    Thank you for the reply. Our device address is 0x31 and in the waveform we are writing and reading from address 0x5. The SDA_I and SDA_O are the input and outputs of the tristate buffer driving the SDA line. In case of read, we are first writing the device address with A0 bit set to write (0), then register address, followed by restart condition and device address with A0 bit set to read (1) and keeping the bus tristate for next 8 clocks, then acknolweding it (by pulling down sda) again keeping bus at tristate  for 8 clocks and not acknowleging it followed by stop condition. Could you please reverify the waveforms are correct?

    Awaiting your reply....

Children