0
\$\begingroup\$

I am trying to analyze the I2C commands sent by a PC software to R3910 DSP chip

The software uses a programming box (provided by the same company that manufactures the R3910 chip) to communicate with the chip via I2C. The software can send commands to do things like mute/unmute the chip, change parameters, enable disable features, etc. The chip has dedicated SCL, SDA pins and logic high on these lines is around 1.29 V, logic low is 0.

I am using the Analog input pin of an LHT00SU1 logic analyser and PulseView software to view changes on the SDA and SCL lines. The SCL line seems to show a normal pattern, consistent with what would expect an I2C command to look like. A section of the total data collected on the SCL pin when sending the mute command from the PC software is given below:

enter image description here

The SDA line, however, looks normal at some places and distorted at others.

enter image description here

The first few cycles on hte left side of this figure look ok, and what I would expect on an I2C line, but in the middle the picture looks sort of strange, for example logic low not going all the way to 0, while at the right I am not sure what is going on at all. I get this same patern on the SDA line if the repeat the experiment with a higher sampling rate for the logic analyzer. I have seen a similar pattern when viewing the SDA line using a high quality oscilloscope so I am thinking this is not related to the sampling frequency of my logic analyzer.

Am I getting the correct reading on the SDA/SCL lines?

The current hardware connection looks something like this.

schematic

simulate this circuit – Schematic created using CircuitLab

The pins from the programmer are connected directly to the I2C pads on the chip, while I hook the SCL, SDA and GND pads directly to my programmer. The actual circuit looks like this:

enter image description here

I have read in some blogs that I2C lines require pull up resistors, but the R3910 chip's sample schematics do not mention any pull up resistors. Plus I can control the chip using the PC flawlessly (so the I2C signal itself is not damaged) and the data in the SCL line looks normal as well, so I am assuming the chip has internal pull ups for the I2C lines. I connect the programmer with the R3910 chip on a desktop PC, while I use the logic analyzer on a separate laptop running on battery, so the logic analyzer and programmer are completely separated from each other (I read about grounding causing issues when connecting cheap logic analyzers and programmer for device under test to the same PC).

What is causing the distortion on my SDA signal and how can I make it look better on my logic analyzer?

\$\endgroup\$
16
  • \$\begingroup\$ What's the I2C clock frequency you use .. \$\endgroup\$
    – Mitu Raj
    Jan 23, 2020 at 6:55
  • \$\begingroup\$ @MituRaj I think it's around 300 kHz. \$\endgroup\$
    – user13267
    Jan 23, 2020 at 6:58
  • \$\begingroup\$ Are you using a R3910 or a R8910? Please correct the text ro schematic accordingly. If possible, provide a link to the datasheet as well. \$\endgroup\$
    – Huisman
    Jan 23, 2020 at 7:46
  • \$\begingroup\$ do you have chance to reduce the frequency of operation? and also to monitor the bus voltage suing a digital multimeter when the bus is idle. \$\endgroup\$
    – User323693
    Jan 23, 2020 at 7:46
  • \$\begingroup\$ @Umar I think the I2C clock frequency is fixed, I can't find any options in the PC software to fix this. The idle pin voltages are: Vcc: 1.296 V, SDA: 1.296 V, SCL: 1.296 V \$\endgroup\$
    – user13267
    Jan 23, 2020 at 7:51

2 Answers 2

1
\$\begingroup\$

The last SCL pulse in each series belongs to the ACK bit. For addressing and write operations the SDA line is controlled by the slave during this bit time. On the right of your lower plot is read operations, where the behaviour is reversed – and now it's the 8 data bits not properly pulled down, while the host ACK bit is nice.

It seems your slave cannot properly pull down the SDA line to GND. Check the GND wiring. Especially, make sure there is no high current running through the GND line due to some short on the device board.

Don't run supply current for relays etc. through the GND line either. Use a local power supply for the external board. If you can't help the latter, use differential I²C instead.

\$\endgroup\$
1
  • \$\begingroup\$ Im not connecting relays or anything else to this circuit. The basic circuit is simply the programmer board connected to the chip (connected as specified by the manufacturer; the programmer is the standard programmer for this chip) and this much works perfectly. My only addition is i tapped in to the sda, scl and gnd connections for the logic analyzer \$\endgroup\$
    – user13267
    Jan 23, 2020 at 11:31
0
\$\begingroup\$

I suggest to use an Oscilloscope. The note in the logic analyser states

From the link in the question:

The Noname LHT00SU1 is a USB-based, 8-channel logic analyzer with up to 24MHz sampling rate, with 1 additional analog channel (theoretically 2, but only one of them can be used at a time; 3MHz analog bandwidth).

This might be the root problem. I do not suspect on the wiring as the functionality is always okay when programmed via PC

\$\endgroup\$
5
  • \$\begingroup\$ Ive tried an oscilloscope before but the overall i2c command is very long (the screenshots posted here are only a small section) and its not possible to view the whole thing in my oscilloscope. But at rare occasions when i did manage to stop the oscilloscope disply while ic2 transfer was happening, i have seen similar spikes as seen in the right side of the lower picture. Also i know about the two channel thing, i have connected the i2c line to the channel that pulseview software can display \$\endgroup\$
    – user13267
    Jan 23, 2020 at 11:34
  • \$\begingroup\$ can you disconnect the slave and then monitor the i2c line.. perhaps with only the external pull up termination? And then monitor the clock and data lines as much as possible.. i understand slave wont be there \$\endgroup\$
    – User323693
    Jan 23, 2020 at 11:51
  • \$\begingroup\$ The programmer won't work without the chip connected \$\endgroup\$
    – user13267
    Jan 23, 2020 at 11:57
  • \$\begingroup\$ can you monitor the current through the SDA line? \$\endgroup\$
    – User323693
    Jan 23, 2020 at 12:10
  • \$\begingroup\$ I don't know if I have the equipment to do that, I'd prefer alternative methods for troubleshooting this \$\endgroup\$
    – user13267
    Jan 23, 2020 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.