Part Number: CCSTUDIO
Tool/software: Code Composer Studio
I'm using CSL I2C write and read functions, according to the "CSL_I2C_PollExample".
C5517 device,Ic55_csl_3.04 with CCS5.
I noticed that the CSL function does handle START and STOP but looking at the code in csl_i2c.c file it seems to me that it asserts the start and stop bit on the ICMDR register. Reading the C5517 reference manual I understand that the stop bit is sent once the data I2C data couter is 0 (all data is transmitted).
My question is: what happen if a timeout or a NACK occur (no response from slave device)? How should I handle a timeout/NACK condition? I tested this and I saw with the oscilloscope that once a NACK or timeout occur the SCL in held low and the Busy Bit = 1 (that is because the STOP condition has not been sent!).
I need to use a I2C polling mode.
Thank you,
Stefano