Electrical – I2C – Certain Slaves not Pulling the Lines down fully

i2cpulldownslavetexas instruments

I have a large number of boards deployed with a TI CC3200 microcontroller and a variety of sensors for an industrial monitoring application. I have been having an issue for some time now, on some of the boards, where an infrared temperature sensor, TI's TMP007, cannot be read from. This includes any manufacturer/device ID registers. They communicate via I2C, and there are 10k pullups on both lines.

I have been looking at the lines on a scope, and found that when communicating with the TMP007 the voltages are only pulled down about half as much as when communicating with some of the other, working, I2C sensors. It still seems like it meets the I2C spec at least though, and the TMP007 appears to ACK when I write its manufacturer ID register to it.

My question specifically is, has anyone had similar issues before where different devices are pulled down to different levels and what possible causes this could have. For instance, could it be a problem with the hardware or could another I2C device be trying to drive the lines at the same time?

Edit: I believe Ali Chen has rightly pointed out a power supply starvation issue, switching off some of the other I2C sensors when reading from the TMP007 appears to have solved the issue.

Best Answer

I2C has a very relaxed idea of what can be received as a low signal. If a transmitter tries to exploit this and not drive down to the typically 0.5v that's easily possible with any normal driver, it might just get it wrong.

This 'sloppy low' is exploited in devices that are opto-isolated. It's used to avoid hanging the bus. If the device sees the line low, is it because the bus is being driven low, so it should be repeated into the device, or is the device driving it low, in which case it should not drive the bus? This can't be done from a state machine in the device, as the bus could go low at any time. The solution many devices adopt is to expect the bus to be driven down to a decent low voltage, but only drive the bus to a sloppy low, and to sense the difference carefully.

Obviously this approach slashes noise margins, and may not work with other devices that are technically compliant, but do not have generous over-design.

I've not put any specific voltages in here because, if you're going to try to understand or use this technique, you need to get the official specification and read it to the last footnote.