I'm using an NT3H2111 NTAG/NFC chip. It's working well, I can read/write NDEF records from I2C or NFC and I can read/write Session registers from I2C (at 0xFE) to do data transfers using passthrough mode.
My problem is that read or write any Config register from I2C (at 0x3A) will fail, I get NAK response on I2C.
I haven't set any 'Lock' bits and they all seem ok.
What am I doing wrong?
Note: My intention is to turn off clock-stretching by setting I2C_CLOCK_STR bit to zero. Data sheet says this is Read-only in Session register, so I need to set its state by writing to Config register.
Solved! Go to Solution.
ok, after doing some deeper investigation I think the NT3H2111 chip data sheet is incorrect.
Para 9.8 describes read/write operation for Config register, but when I do that the read/write is rejected with I2C NAK.
Looking at some NXP lib code for accessing the register I found it doesn't use Register read/write operation, instead it uses the chip memory read/write operation to access the Config registers.
I took a look at the NXP lib code for reading 'session' register and compared it to the NXP lib code for reading 'config' register. I expected them to be same except for register address, but I found the functions are very different. So my next step is to port the 'config' register NXP lib function to my project. See the functions NTAG_ReadRegister() and NTAG_ReadConfiguration() code in NXP SDK file /ntag_i2c_plus/HAL_NTAG/ntag_driver.c
After porting functions NTAG_ReadConfiguration() and NTAG_WriteConfiguration() I can now read/write Config registers ok.
ok, after doing some deeper investigation I think the NT3H2111 chip data sheet is incorrect.
Para 9.8 describes read/write operation for Config register, but when I do that the read/write is rejected with I2C NAK.
Looking at some NXP lib code for accessing the register I found it doesn't use Register read/write operation, instead it uses the chip memory read/write operation to access the Config registers.
I took a look at the NXP lib code for reading 'session' register and compared it to the NXP lib code for reading 'config' register. I expected them to be same except for register address, but I found the functions are very different. So my next step is to port the 'config' register NXP lib function to my project. See the functions NTAG_ReadRegister() and NTAG_ReadConfiguration() code in NXP SDK file /ntag_i2c_plus/HAL_NTAG/ntag_driver.c
After porting functions NTAG_ReadConfiguration() and NTAG_WriteConfiguration() I can now read/write Config registers ok.