I am working on a MSP430F1612 that is connected to an EEPROM (AT24C512BN) and RTC (DS1339) by I2C. The application is a data logger. Now it is in field trials and basically works fine, but, it is observed that every now and then it gets stuck and has to be power cycled to recover. On debugging, it is seen that it is hanging on trying to read from the I2C, specifically it is hanging on the line "while ((~I2CIFG)&ARDYIFG);". This means (I think) that it is not receiving all the bits for the byte and is hanging. My question is, what may be causing this? Is it hardware? Can it be software related? My assumption now (based on inputs, not my own) that possibly there is noise on the clock line. I appreciate any ideas on how to approach/debug this issue. Thanks!