We have seen a problem in production units using the TMS320F28034 where a symptom is that the I2C bus is hung up (slave holding SDA low). Resetting the TMS320F28034 does not clear the problem, but powering the whole board down and then powering it backup does. The I2C bus in this application has only 3 parts -- TMS320F28034 (master) and 2 slaves (I2C EEPROM and an I2C accelerometer). Everything about the I2C bus is nominal (pull up resistors (6.8k), bus capacitance (30-40pF) SCL clock speed (161kHz), supply voltage for master, slaves, & I2C (3.3V),.rise times on SCL & SDA, I2C high (~3.3V), I2C low (~0V), etc. We were able to find some TI documentation (I2C Tips http:/processors.wiki.ti.com/index.php/I2C_Tips ) that indicated if the I2C master was reset in the middle of data being sent from a slave on I2C, then it could hang up the bus. The TMS320F28034 reset pin (/XRS) has a 1k pull-up to 3.3V and a 0.1uF cap to GND. We were able to manually cause the I2C bus to hang up by triggering a reset in the middle of I2C communications where the serial I2C EEPROM read out its whole memory. (If the reset occurs while the slave is reading out a "0" and the clock goes away, the slave is left holding the SDA line low.) The TMS320F28034 expects the supply voltage to be 3.3V +/- 10% while the I2C slaves will operate with a supply voltage of 5.5V down to 1.9V. It could be possible for a glitch on the 3.3V supply to cause the TMS320F28034 to do a POR/BOR reset, but for the I2C slaves to continue to operate normally. The board layout does not provide the master with a way to do a power-on-reset of the I2C slaves.
In trying to debug this problem and/or reproduce it, we have managed to manually trigger a reset of the TMS320F28034 while it was in the process of reading an I2C EEPROM memory dump and we caught the EEPROM in the middle of sending a "0". The result is the I2C bus is hung with the slave holding the SDA line down.
The only ways we can think of for this problem to occur "normally" would be a POR/BOR reset, watchdog reset, NMI reset (attempting to write to protected memory, etc.), or a memory leak or errant pointer writing over the I2C control registers
Is there any way to operate the I2C master pathologically to cause it to hang up the I2C bus? If the I2C peripheral is disabled in the middle of an I2C read, could this mimic the microcontroller being reset and hang up the bus? (IRS bit in I2CMDR (I2C Mode Register) written with "0" while the I2C peripheral is reading data from slaves.) The I2C registers are not write protected so errant software could overwrite them.
POR/BOR reset would involve glitches on the supply voltage inputs. This would seem unlikely as the power looks clean and the glitch would need to cause 3.3V regulator to drop out enough for the TMS320F28034 to do a POR/BOR but not drop out low enough to do a power-on-reset of the slaves and this must occur in the middle of an I2C read where the slave is sending a "0". We were not able to trigger the reset from EMI (we used variable speed DC drill and you could watch the brushes arc). A watchdog reset or NMI type of reset would seem to be symptomatic of errant software -- memory leak or errant pointer. All of these would seem to not occur often enough to have a good chance of actually occurring at the magic point needed to hang the I2C bus. If an errant pointer or memory leak managed to write over the I2C Mode Register and hang the I2C bus first and eventually cause a watchdog reset or NMI type of reset, the reset itself might not be the actual cause of the problem we are seeing but just a coincidence.
Any observations and suggestions would be welcome. Please let me know if these speculations are delusional or not. We are trying to determine if the source of the problem is in the HW or SW in order to focus our efforts.