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.

TMS320F28388D: Unable to set read bit when using I2C commands from i2c.h

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hey,

 I am trying to use a TMP10x Temperature Sensor With I2C with a TMS320F28388D. To be able to read from the chip, I need to send the address with the read bit enabled but I am unable to get it to work. I am using I2C_setConfig with I2C_CONTROLLER_RECEIVE_MODE and I am unable to read from the chip. I have not been able to find any other way to be able to set the read bit and assumed that the receive mode would set that. Any help would be appreciated and I can try to give more information if needed, just not sure how to word the question. 

  • Hi Grant,

    Please consider adapting the C2000Ware i2c_ex4_eeprom_polling.c (also see i2cLib_FIFO_polling) or i2c_ex6_eeprom_interrupt.c example to use I2C to read / write using interrupts.

    Referring to this table in the TRM, controller receive mode can only be entered from controller transmit mode which means the I2C modules needs to transmit the target address and R/W = 1. This is done by configuring the own and target addresses and enabling I2C as shown in Figure 33-7.

    Regards,

    Aishwarya