This post contains step by step guide of how to use the NTAG I²C plus with LPC55S69. This is easy and straightforward to do, since the MCUXpresso SDK Builder tool has an option to add NTAG I²C plus example directly to SDK of LPC55S69.
Follow the following simple steps to use NTAG I²C plus with LPC55S69:
Connect the LPC55S69 and NTAG I²C plus boards together. Details of these connections can be found in the “readme.txt” file in the “doc” folder of the project:
Finally click on debug in the Quickstart Panel to build the project, flash it to the MCU, and start debugging.
This is how the output looks like in the Console tab of IDE:
Bring any active nfc device (e.g. an NFC phone with NFC enabled) near the ntagi2c board. The program will detect it and consequently blink the LED as well as display a message on the console:
Read the “readme.txt” file for more details regarding the project.
Hi, I would like to report a bug in SDK file of ntag_i2cplus/HAL_NTAG/ntag_driver.c that causes I2C address to get corrupted.
I'm using the 'lpcxpresso55s69_ntag_i2c_explorer_blink' example with NXP NT3H2111_2211 NFC chip.
I'm using SDK 2.6.2 for LPCXpresso55S69
The issue is that I2C address is held in memory byte zero of NT3H2111, so writing to block zero will corrupt I2C address. The function 'NTAG_WriteBytes' takes account of this but has a flaw. The flaw is the I2C address is held in upper 7 bits, but the function writes it to lower 7 bits.
The fix looks like this...
/* check if it is the first Block(0x00) and not the I2C Addr */
/* be careful with writing of first byte in management block */
/* the byte contains part of the serial number on read but */
/* on write the I2C address of the device can be modified */
if (0x00 == current_block && NTAG_MEM_ADRR_I2C_ADDRESS < begin)
ntag->rx_buffer[RX_START + 0] = ntag->address; << Original Code
ntag->rx_buffer[RX_START + 0] = (ntag->address) << 1; << Fixed code