Electrical – Debugging I2C, Effect of Oscilloscope Probes

i2craspberry pi

Working on a simple I2C setup: Raspberry Pi connected to a WM8731 audio chip. The Raspberry Pi configures the WM8731 (which is write only) over I2C.

Problem is WM8731 doesn't always respond with ACK. I have logic analyzer attached to the I2C lines, and about 5% of the time the transmissions end in NAK. No other devices are on the bus.

The curious thing is when I attach oscilloscope probes to the lines, it greatly increases the number of NAKs. The scope shows nice sharp transitions on SDA and SCL, but sometimes the WM8731 just doesn't pull low for ACK.

What could be going on such that merely attaching the scope probes would make the problem worse?

Signals during proper transmission:

enter image description here

Signals during NAK:

enter image description here

Best Answer

new

I would be curious to know if a 1MHz snubber at the Rx would reduce NAK error rate.

C=560pF in series with 220 Ohms across Rx to 0V. Some adjust may be necessary. e.g. 500 Ohm 270 pF


old info

I2S uses 74HCTxx or TTL logic thresholds. I2C uses std CMOS thresholds.

If the Vcc of each endpoint is floating, connecting a scope probe with an inductive long ground lead adds a common mode voltage (0V) than may differ from the "floating" ground and due to CM noise coupling at each end , some differential voltage can result.

It is hard to assess your CM noise without measurements between each ground with a current shunt.

The cable will have 100pF/m or so of capacitance and adding 10nH/cm of scope ground clip can induce a resonant impedance that may cause ringing.

So investigate noise ingress and experiment with earth grounding at either or both ends of the communication. Also, consider twin probes in A-B for signal integrity such that when both probes are on the same signal it produces a flat line. ( Vdif=0)

Depending on cable lengths and bit rate, a CM ferrite transformer can help raise the CM impedance to radiated noise.

The R pull-up depends on cable capacitance and bit period vs risetime and amount of noise ingress.

http://www.ti.com/lit/an/slva689/slva689.pdf