This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1294NCPDT: I2C module locks up?

Part Number: TM4C1294NCPDT

During I2C module debug, sometimes I will stop I2C communication in the wrong state. When I reload the project and restart, the program will hang up in

while(I2CMasterBusBusy(I2C2_BASE));

even the following can't get it out of trouble

SysCtlPeripheralDisable(SYSCTL_PERIPH_I2C2);
SysCtlPeripheralReset(SYSCTL_PERIPH_I2C2);
SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C2);

Only recycling the power will get it out of this mess.

How do I reset the I2C module when I start the program?