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.

I2C and USCI_I2C_UCNACKIFG interrupt

Hello Guys

I am trying to test my i2c code(Read and write eeprom) on the MSP-EXP430F5438 board. And i am trying to trigger the USCI_I2C_UCNACKIFG interrupt by disconnecting

the eeprom , but failed.  Is there any googd way to trigger the USCI_I2C_UCNACKIFG interrupt?

Thanks a lot!
BR

Charles

  • If the device you are trying to select is not present on the bus you should get a NACK as nothing will generate the ACK in response to the device address you send.

    If you are not seeing the the NACK with the EEPROM disconnected then there is a configuration issue, eg interrupts not enabled etc.

    If you are trying to generate a NACK in mid data transfer thats harder and I would suggest mocking that up in your code so you pretend the NACK was seen after a number of bytes transferred. However, most devices will generate a NACK under some conditions, eg EEPROM writing beyond a page boundary or some such.

    Nick

**Attention** This is a public forum