Other Parts Discussed in Thread: MSP430FR2476
Hi,
I'm implementing MSP430 as an I2C slave device with multiple read / write registers. For some reason, I2C clock is held low and master cannot communicate with slave anymore.
To handle this, I've enabled I2C clock low timeout interrupt. Interrupt is being triggered, as can be seen on LED being toggled.
Now I want to reset I2C module inside Interrupt handler. Referring to
24.3.7.3 Clock Low Timeout
The UCCLTOIFG interrupt allows the software to react if the clock is low longer than a defined time. It is
possible to detect the situation, when a clock is stretched by a master or slave for a too long time. The
user can then, for example, reset the eUSCI_B module by using the UCSWRST bit.
The clock low time-out feature is enabled using the UCCLTO bits. It is possible to select one of three
predefined times for the clock low time-out. If the clock has been low longer than the time defined with the
UCCLTO bits and the eUSCI_B was actively receiving or transmitting, the UCCLTOIFG is set and an
interrupt request is generated if UCCLTOIE and GIE are set as well. The UCCLTOIFG is set only once,
even if the clock is stretched a multiple of the time defined in UCCLTO.
I'm adding following lines inside interrupt handler
UCB0CTLW0 = UCSWRST;
UCB0CTLW0 &= ~UCSWRST;
It does not reset the I2C module.
What could be done inside interrupt handler to restart I2C module?