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.

MSP430FR2355: I2C UCSTPIFG vs UCTXSTP?

Part Number: MSP430FR2355

Can someone tell me why in the i2c module you would use one method over the other (UCSTPIFG vs UCTXSTP) to generate a stop flag when not in auto mode?

  • Hi Steve,

    It looks like UCSTPIFG is a flag that is intended to be set by the I2C peripheral when a stop condition is detected on the bus. On the other hand, UCTXSTP is a flag that you'd utilize in order to assert a stop condition on the bus. It looks like if you set the UCSTPIFG yourself, you might be anticipating a stop when there is no stop condition on the bus. Utilize UCTXSTP to assert a stop condition, and UCSTPIFG to detect a stop condition.

  • Thanks Dylan....

    Changing this made a big difference in how my code works / doesn't work....It definitely has a bearing....I really thought asserting the IFG would be the same as creating a stop condition on the bus but it definitely is not.

**Attention** This is a public forum