AnsweredAssumed Answered

Control NTAG I2C

Question asked by Genis Aguilar on Sep 12, 2016
Latest reply on Sep 22, 2016 by Jorge_Gonzalez

I am trying to controll an I2C NTAG from an LPCXpresso54102. For that, I power the NTAG from the LPCXpresso and I connected the SDA and SCL lines. Connections seem to be right since I can issue an empty write operation and the NTAG acknowledges it.


The problem arises when I try to write a memory block in the NTAG. The NTAG acknowledges its own I2C address, it acknowledges the MEMA (memory block address) but then I receive a NACK when I try to transfer the payload. Sometimes, though very rarely, it succeeds on writing a memory block. Then it will fail if I try to write a second one.


From the screenshot you can see I am setting the I2C clock to 100kHz. The effective clock is about 105 kHz but I don't think that should be a problem provided the NTAG suports fast I2C. Also, you can notice that there seems to be some clock stretching when the NTAG sends the ACKs. That doesn't happen when using the I2C NTAG Explorer Kit.


Also, I based my program on the i2c_probe sample application in the LPC SDK. The only difference is that I don't ever make the LPC sleep by calling __WFI() or anything similar.


Any thoughts on that?