f28022 I2C issue.
I have followed the tips found at
http://processors.wiki.ti.com/index.php/I2C_Tips
and I see in the sample code, the author is resetting the I2c module from time to time by clearing ICMDR_IRS.
Mostly to clear NACKS and such, but one time he resets the module at the beginning of the transfer.
My application has two slave only devices attached to the Piccolo, and the uP is the only master ever.
Once in a while, the bus seems to hang, in that I will send a STOP, and wait for the STOP to go away in the MDR, but it never does. There are no bus clocks, and the BB is set.
Clearly, this is a flaw of come kind, and I am still tracking it down, but...
Should I wait a while, then after a time out, reset the module and start over or is there another way to clear this situation?
The article talks about putting the pins into GPIO mode and toggling the clock a few times to clear a stuck ACK from one of the slaves. I understand the theory, but In practice, how often does that happen?
The literature, SPRUFZ9D Piccolo I2C Module, section 5.4, says I should wait some time after I set ICMDR_IRS so the BB flag matches the actual bus.
Since I am the only master, is it necessary to wait?
Any thoughts will be helpful.
Thanks,
Mark.