In our prototype , we have a I2C based EEPROM . During ESD Test(High potential spark is injected into system for a very short moment), the drivers hangs in the I2C code.
Basically there are while loops in which which we are checking is the busy , or transmit flag is set or not, Acknowledge received or not using the respective registers. So , if any of the parameters is not matched , then the code will hang in that loop itself.
This driver works fine in normal conditions.
But during spark injection, it hangs in one of the loops.
And even after the ESD test it remains in the same condition, , it does not recover until we restart the device.
What could go wrong with the controller(MSP430F6438 I2c bus) or the slave(I2c based EEPROM), which causes the code to hang in one of the loops which checks for busy bus, transmitt flag, acknowledge recieved flag?