Hi,
We had what we thought was a stable I2C driver subsystem until we encountered an issue today during testing.
Our driver roughly follows:
- Setup for the transaction (data length, slave addx, etc)
- Set the start condition on the bus
- Wait for the TX buffer to be empty (It already should be)
- Send the slave address
- Wait for Tx buffer empty (it should go empty after sending slave addx)
- Check ACK/NACK status
- Go on and send any other data ...
- Set stop condition and cleanup
We intentionally addressed an I2C slave with the wrong address, and found that after sending the slave address and watching the slave NACK (Technically not ACK) we find that TXRDY in the status register is 0 (still contains data). On the bus analyzer we see our false address, and a NACK but, but the RM4 does not bring the SCL line high.
Page 1308 of SPNU503B, TXDRY bit states that the bit is set to 1 (empty) when data has been copied from DXR register to shift register.
Is there some issue that would prevent the TXRDY bit from becoming 1 (empty) if there is a NACK on the bus during slave addressing phase?
Thanks
Stomp!