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.

TMP100: I2C Read Issue

Part Number: TMP100
Other Parts Discussed in Thread: SYSCONFIG

We are trying to read the Temperature registers on the TMP100 using an arm chip and face an issue that the 2nd byte is not being sent by the slave. I found this an earlier thread: https://e2e.ti.com/support/sensors/f/1023/p/127472/1625495?tisearch=e2e-sitesearch&keymatch=TMP100%252520resolution#1625495

That states an I2C Read shall be sent as follows: 

to Read register 0 (temperature register) you should do the following:

  1. Start I2C bus by master
  2. Transmit slave address 0x98 (write)
  3. TMP100 will ACK
  4. Transmit pointer register address 0x00
  5. TMP100 will ACK
  6. Start I2C bus by master
  7. Transmit slave address 0x99 (read)
  8. TMP100 will ACK
  9. Read byte 1 from TMP100 register
  10. Master will ACK
  11. Read byte 2 from TMP100 register
  12. Master will ACK
  13. Stop I2C bus by master

while the data sheet specifies the following in Section 7.3.3:

Acknowledge: Each receiving device, when addressed, is obliged to generate an Acknowledge bit. A device
that acknowledges must pull down the SDA line during the Acknowledge clock pulse in such a way that the SDA
line is stable LOW during the HIGH period of the Acknowledge clock pulse. Setup and hold times must be taken
into account. On a master receive, the termination of the data transfer can be signaled by the master generating
a Not-Acknowledge on the last byte that is transmitted by the slave.

Since we are in Master receive mode, shouldn't step 12 be a NOACK? We did achieve some success with changing step 12 to a NOACK but I want to confirm which is technically correct since we will need to make changes to our i2c to support this specifically. Thanks so much! 

 

  • Hi Chad,

    Welcome to the TI E2E forums and thank you for your interest in our temperature and humidity sensing technology.

    We have a configuration setup tool to help with this

    First, please feel free to utilize our sysconfig tool here: https://dev.ti.com/sysconfig/. Once there, you can choose the TMP100 under " Analog Signal Chain Studio -> Other Device, Part, Package " and there you can find scripts for setting up the TMP100. Once downloaded, this code can be customized to your specific MCU for proper i2c communication.

    Once it can be ensured that normal i2c operation is fine, and the i2c data is being properly read/written, then we recommend to try to have the master send NACK @ end of transmission configured.

    I hope this helps.

    Thank you,

    Chris

  • Hi Chris,

    Thank you for your reply, however the I2C code of this sysconfig tool merely states: 

    int8_t mcu_i2cTransfer( uint8_t busId, uint8_t i2cAddr,
    uint8_t *dataToWrite, uint8_t writeLength,
    uint8_t *dataToRead, uint8_t readLength)
    {
    /*
    * Add MCU specific I2C read/write code here.
    */

    /*
    * Add MCU specific return code for error handling
    */

    which would be the portion I am looking for to determine what the TMP100 is expecting as far as I2C Protocol.

    Regards,

    Chad 

  • Hi Chad,

    TMP100 should follow I2C protocol as you've described. A read transaction should end with NACK. Could you please show us the oscilloscope or logic analyzer capture of the problem you're encountering?

    thanks,

    ren