Hi,
We are currently using an external Real Time Clock t (RTC) hat uses the I2C protocol connected to the F28335.
Due to design restrictions we cannot use interrupts, so we can to generate while loops to wait for the data transfer between the the RTC and the DSP.
TI recommended the following while loops
while(I2caRegs.I2CMDR.bit.STP == 1){}; //Wait for STP bit to clear
while(I2caRegs.I2CSTR.bit.BB == 1){}; //Wait for BB bit to clear
However, there is a flaw, what happens if the RTC does not respond and it is locked for some reason? Is there any way you can tell if the RTC is actually alive and communicating with the DSP? Is there anyway I can break the while looks without having to use a delay/time out? Is there any status flag in the I2C registers that tells me if the I2C is receiving/transmitting data?
Thank you
Alex