2021-07-06 01:16 PM
We are using Area 1 for a 32 byte header, and Area 2 is being used as general EEPROM storage (ENDA1 = 0x00, ENDA2=ENDA3=ENDA4=0x0F). When I setup the system ENDAx registers like this and I try to do a read across the Area1-Area2 boundary the first 32 bytes are read in just fine, but everything beyond that is read as 0's. When I setup ENDAx registers like this and try to do a write across the Area1-Area2 boundary, the first 32 bytes are written, but it fails beyond that point with an I2C error due to a received NACK. If I instead split the reads/writes at the Area1-Area2 boundary (ie. I read the first 32 bytes, and then read the next 256 bytes right after that) then I will succeed.
I haven't found any mention in the documentation of I2C access being limited in this way by the Area settings, I thought Area settings were purely for the RF side. From my understanding I2C should always see all of the EEPROM memory space as one giant block of bytes, and the ENDAx settings should have no impact on I2C access. However, I'm clearly seeing something to the contrary and I'm hoping someone can help by pointing out what I'm missing in the documentation, or maybe help clarify a general misunderstanding I may have about the way the component is intended to operate on the I2C side. Thank you in advance!
Solved! Go to Solution.
2021-07-08 07:41 AM
Hello,
This is indeed expected behavior for a ST25DV04K tag.
There is a lot of things in the product datasheet and you may have missed it, but it is explained in chapter "6.5.3 Sequential read":
"Sequential read in user memory:
• Sequential read cannot cross area borders. After reaching area border, device continues to output FFh"
and in chapter "6.4.2 Sequential write":
"Byte write is inhibited if byte complies with conditions described in Section 6.4.1 I2C Byte write, in addition:
• Byte is in user memory but does not belong to same area than previous received byte (area border crossing
is forbidden)."
So, you will have to use two separate I2C read commands to read both your header in area1 and your data in area 2. Same thing to write.
By the way, there is a new version of ST25DV-I2C series tag, the ST25DV04KC (see here https://www.st.com/en/nfc/st25dv04kc.html) which is an improved version of the ST25DV04K and which allows read across areas.
Hope this help and best regards.
2021-07-08 07:41 AM
Hello,
This is indeed expected behavior for a ST25DV04K tag.
There is a lot of things in the product datasheet and you may have missed it, but it is explained in chapter "6.5.3 Sequential read":
"Sequential read in user memory:
• Sequential read cannot cross area borders. After reaching area border, device continues to output FFh"
and in chapter "6.4.2 Sequential write":
"Byte write is inhibited if byte complies with conditions described in Section 6.4.1 I2C Byte write, in addition:
• Byte is in user memory but does not belong to same area than previous received byte (area border crossing
is forbidden)."
So, you will have to use two separate I2C read commands to read both your header in area1 and your data in area 2. Same thing to write.
By the way, there is a new version of ST25DV-I2C series tag, the ST25DV04KC (see here https://www.st.com/en/nfc/st25dv04kc.html) which is an improved version of the ST25DV04K and which allows read across areas.
Hope this help and best regards.