This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMP117: I2C LINES HELD

Part Number: TMP117
Other Parts Discussed in Thread: INA233

Hello, 

(Using the TM4C1294NCPDTI3 to talk to TMP117).

I am having I2C problems in which my i2c line seems to get stuck. The state where it's stuck is CLK held high and DATA held low. 

This has consistently happened after writing to the Configuration Register (01h) and reading back the 16-bit response. In the screenshots I took from the oscilloscope it looks like the data values are getting through but seem to have a problem getting the NACK and stop condition from the master. Is there any reason for this failure or how to avoid it? The problem is very inconsistent. 

Other things to note are that are 4 INA233 on the i2c bus, an ADXL355BEZ accelerometer, and this TMP117 temperature sensor. 

In all of the failures, the temperature sensor was always the peripheral that held the line. 

YELLOW IS CLK

BLUE IS DATA

See failure waveform:

This is the successful transaction earlier in the loop: 

Any ideas or advice would be helpful 

  • In the datasheet (7.5.3.1.7) The Timeout Function says that "the SDA line is held low by the TMP117 for 35 ms (typical) between a START and STOP condition. The TMP117 releases the SDA line if the SCL pin is pulled low and waits for a START condition from the host controller". We have a process that can bit-bang to attempt to fix this holdup but currently, we see this issue has something that needs to be resolved outside of doing a bit-bang. There is nowhere in the datasheet that states why the TMP117 would hold the line low. 

  • Shaun,

    This appears to be read transactions you are showing, and I see that after the data is returned on the bad reads the acknowledge bit is low. You need to force a NACK from the controller at the end of a read transaction. The TMP117 should have no problem recieving NACKs from an I2C controller, you may need to look at your controller and see if you are forcing the NACKs correctly/consistently at the end of the read transactions.

    Thanks

    -Alex

  • Hey Alex, thanks for the response. It seems to run for a while (not sure how many reads we do exactly), then fails after 5-10 minutes. There are plenty of successful NACKS sent normally but there is one instance where we don't see the micro sending it. Any idea what could be causing one instance every few minutes like this?

  • Shaun,

    Have you tried removing the other ICs on the bus temporarily and trying just the TMP117? I suspect the cause is a conflict from something else on the bus occuring occasionally. Try just the microcontroller and the TMP117 and see if you still get issues sending the NACK to the TMP117.

    Thanks

    -Alex

  • Alex, I have tried the other option for this method. I took off the temperature sensor and the i2c has been running for 6 hours without a hold on the bus. I can try your suggestion and see if just the temperature sensor running on the bus will have any issues with the NACK. I will update when I have a result

  • Thanks, please let me know what you find.

    -Alex

  • Update, I ran two 1 hour long tests using the temperature sensor on the i2c bus without failure. I am going to add peripherals one at a time until I see the failure occur again.

  • Hi Shaun,

    Happy to hear the TMP117 is working correctly in your setup. Please let me know which peripherals trigger the SDA line being held low.

    Thanks

    -Alex

  • Ok so after a day's worth of testing I was able to get 5 out of the 6 peripherals on the i2c bus and working for an hour. The 5 devices were the temperature sensor (TMP117) and 4 INA233s. As soon as I added the tilt sensor (ADXL355BEZ) the i2c bus ran into the same issue after 1 minute of the testing. Going to try to do the same testing tomorrow by isolating the tilt sensor. Maybe it's something to do between the tilt sensor and the temperature sensor.

  • Shaun,

    Nice find on that, have you been able to find the source of the conflict? Do they share an I2C address?

    Thanks

    -Alex

  • I have not found the source of the conflict but I was able to narrow it down that I only get the holdup when the accelerometer and the temperature sensor are on the bus at the same time. Individually they both work with no issues. The i2c addresses are not the same. I am continuing to investigate and look at the code we use to control them. 

  • Shaun,

    Since the TMP117 seems to be working fine in your system alone and with most of the other peripherals, I'm going to go ahead and close this thread. If you are digging through the code and have some questions about communicating with or programming the TMP117, please reply back on this thread and it will be re-opened.

    Thanks

    -Alex