Other Parts Discussed in Thread: TCA9555, C2000WARE
I have developed an I2C communication driver for a multi-slave system for the TMS320F2837xS family of controllers that I am unit-testing on the LaunchPadXL for 28377S.
I encountered a hardware issue with one of the evaluation modules (IO_EXPANDER_EVM, repopulated with TCA9555) used as a slave device, where the TCA9555 does not ACK even when addressed correctly. This is a hardware setup issue because I have a second EVM repopulated with the TCA9555 which has the same address pin configuration, which is working correctly.
I have been able to detect these NACKs because I've been using a protocol analyzer to monitor the I2C bus transactions. (attached snip with "*" in the Addr column denoting NACKs).
I have included a flag in my driver to indicate if a NACK is received based on the I2C Status Register (I2CSTR). However, the NACK bit never seems to be set. I believe I am missing something while polling the NACK bit. The 2837xS controller is always the master and being used in non-repeat mode.
My interrupt sources for read and write transaction are ACCESS_READY and STOP_CONDITION detected. I check the NACK bit in the interrupt service routine
Is the NACK bit in the status register cleared every time a stop condition is issued?
Do I have to explicitly enable NACK interrupts to be able to detect the NACK? If I do this, will an expected NACK (generated by the master controller) at the end of a normal read also generate an interrupt that I will have to account for in the ISR?