Tool/software: Code Composer Studio
We are communicating a sensor with TM4C1294 controller on I2C bus. It is working fine for a few minutes and after that code stuck in while(I2CMasterBusy(ui32Base)); function. We have checked the SDA, SCL line on logic analyzer and found that some times controller responds with a NACK and after that code hanging problems starts. We have used a 20ms timeout condition in while(I2CMasterBusy(ui32Base)); function to come out of the function and resend the command to the sensor. This is also working for a while but after some time controller stops sending the read command to the sensor even if it is going in the I2C function.
Please guide me how to resolve this issue.
I am not getting why controller stops sending the read command even if it is going in the I2C function.
Is there any way to reset the I2C in controller?
For the reference purpose, i have attached screenshots of the logic analyzer.
Thanks