NTAG I2C Plus - NT3H2211 EEPROM memory caching question

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

NTAG I2C Plus - NT3H2211 EEPROM memory caching question

1,055 次查看
arthurm
Contributor I

I have been testing with the chip doing an NDEF write from an Android Host after activation and on the chip reading the NDEF data and updating the EEPROM Memory via the I2C interface.

However subsequent NDEF reads from the host only ever seem to return the data I first wrote - even after some wait time. It does not return the updated EEPROM data I wrote until I do an RF reactivate/reconnect to the NTAG chip from the reader.  

It almost looks as if the chip is implementing some sort of write through memory cache and not re-reading the EEPROM actual data because it is unaware it could have been changed (by the attached MCU). 

Is this behaviour real/known? There is no mention of this in the datasheet. What can I do from the MCU side to ensure subsequent NDEF reads after a write return the correct data?

This is a big issue for us as via the NDEF interface on iOS and Android we would be limited to a two tap rather than one tap solution.

 

 

0 项奖励
2 回复数

1,027 次查看
arthurm
Contributor I

Hi,

Yes I am doing this in the session - using the code base from the NXP Demo 

 

Hi usak,
typing this again as I must have timed out last time and lost the text :(
This the code that show the steps. I have verified that the EEPROM data that was updated by the MCU only appears using a second tap (verified with TagInfo)
long
RegTimeOutStart = System.currentTimeMillis();
NdefMessage sendMessage = createNdefMessage("Ckitkatcommand");
reader.writeNDEF(sendMessage,null);
Thread.sleep(1000);

msg = reader.readNDEF(); // msg contains same message as was written.
If its any help my registers are:
EC: 21 01 F8 48
E9: 0B 01 00


If its

 

0 项奖励

1,042 次查看
ukcas
NXP Employee
NXP Employee

Dear Arthur,

Access of Read/Write operations to NTAG's EEPROM is handled by "Arbiter". It works on "first come first serve" principle and ensures that only 1 interface (I²C Master or NFC) is accessing EEPROM at the time. There are Session Registers available for both interfaces, to check whether other interface is accessing EEPROM at the moment.

Data (16 bytes) is written to EEPROM after 4 ms after I²C write command. Consequently last written data is available for reading after that time. NFC can check for readiness at I2C_LOCKED or EEPROM_WR_BUSY session registers.

Is your application working like:

1. default data is stored in NTAG's EEPROM

2. NFC device comes in with the NFC field

3. NFC device reads out NDEF message (natively - no app)

4. µC updates NDEF contents

5. Application waits for the next NFC tap?

 

Best regards,

uksac

0 项奖励