Write NFC Tag throug I2C

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Write NFC Tag throug I2C

1,554 次查看
NHell
Contributor I

Hello,

I am here because I am blocked on accessing memory through I2C on an NTP53121 NFC Tag. Indeed, I try to read any user memory block (for example 0x01 which should contain 0x03 and other data) but receive only 0xFF. Same when I try to write a block, I2C driver returns no error but data in EEPROM is not updated. Reading and writing through NFC interface works like a charm.

Maybe there is something I did not get in datasheet, I try to write/read each block separately using STM32 HAL I2C: 

 

HAL_I2C_Mem_Read_IT(m_pst_i2cHandler, (u16_iDevAddr << 1), u16_iRegAddr, 1, kpu8_oRegData, u8_iCnt);

 

 I used default SLAVE ADDRESS shifted as address (0x54 for NTP53121 on read), if I understand well, the parameter u16_iRegAddr is the addr of the block I want to read (for example 0x01 for first block in user memory).

Is there something I am doing wrong ? 

Thanks

0 项奖励
回复
3 回复数

1,535 次查看
NHell
Contributor I

Hi Ricardo,

 

Thanks for your answer, from MCU side I guess it is a classic read or write operation but still I wonder why the write seems to work, same with read operation (though I only get 0xFF as response), is that possible that the I2C interface of the NFC Tag is blocked or something ? If that is the case, is there a way to unlock it ?

Best regards,

Nicolas.

0 项奖励
回复

1,524 次查看
nxf58474
NXP Employee
NXP Employee

Hi Nicolas,

Did you try to change the subAddress size (Register Address size)? You can access the memory from I2C perspective, using the 16bits address. If your MCU is using a 8bit address, you might be writing to an undesired memory region, changing some registers/settings.

Untitled picture.png

 

Do you have any capture from a logical analyzer when you try to read or write?

How are you reading from NFC perspective? Do you have one of our NFC Readers (OM27462CDKP, OM25180FDK, OM26630FDK)?

If that is the case, I would recommend the NTAG 5 Cockpit, it is a specialized tool to work with the NTAG 5. (User Guides: NTAG 5 NFC Cockpit, NTAG 5 I2C Cockpit).

 

Best Regards,

Ricardo

0 项奖励
回复

1,543 次查看
nxf58474
NXP Employee
NXP Employee

Hi,

 

Hope you are doing well. I can't help from the MCU side as it's not from NXP, but make sure to use a 16 bits register address size. The issue should be there.

 

Best Regards,

Ricardo

0 项奖励
回复