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.

MSP430G2553: How to programmatically reset a stuck i2c interface?

Part Number: MSP430G2553


I am using the MSP EXP430G2ET Board.
One in a while the SDA pin is "Stuck at 0" the only way I can fix it is to unplug the board and replug it in.


I have tried

Reloading the program. The init routine contains:

 UCB0CTL1 |= UCSWRST;
...

 UCB0CTL1 = UCSSEL_2 | UCSWRST;

without any success.

Also the Soft/Hard reset option on CCS does not reset the SDA pin.

Is there anyway to reset the I2C interface programmatically?

  • If the condition survives a master (MCU) reset, that suggests that it's the slave holding it low. Per I2C spec (UM10204 rev6) sec 3.1.16,  in this case your options are limited. If it's only SDA being held, you may succeed by sending 9 SCL pulses (you'll have to disconnect the pins from the USCI and wiggle them as GPIOs). If it's SCL, you're stuck.

    The spec suggests having a reset or power-control pin for the slave. I've found that many I2C devices are sufficiently low-power to be powered from a GPIO. In this case, power-control is pretty simple.

**Attention** This is a public forum