2024-06-19 02:24 AM
Hello everyone, I am using the NFC TAP app on my iPhone to write and read ST25DV16. I am using X-cube-NFC4 to control the MCU and NFC. I meet two questions when I write content into EEPROM.
Q1: I control the GPO interrupt when RFWRITE occurs, but when I try to write a quite large file into the tag, let's say 1024 bytes. I read the datasheet, and I believe the interruption will occur only when the writing process is finished. I change MAX_WRITE_BYTE to 1024 as well. However, the GPO interrupt will occur dozens of times during the process, do l have a way to avoid this?
Q2: I try to read/write data in the GPO interruption function. However, if I do so, the NFC TAP app will report an error that says Read/Write memory command failed: com.st.st25.STException: Error CMD_FAILED. I wonder why it occurs and what should l do to avoid this problem.
Thanks!
Solved! Go to Solution.
2024-06-19 02:51 AM
Hello,
I can answer your question 1. (I suggest you open another post for question 2, it is easier for everyone to have only one question per post).
When you do a write into EEPROM, this is translated into "Write Single Block" or "Write Multiple Blocks" RF commands. The ST25DV16 accepts those commands to write data into EEPROM.
Those commands are limited to a single block for the first one (which is 4 Bytes), and 4 blocks for the second one (which is 16 Bytes). It is not possible to do a write of more data in a single command. This is how ISO15693 and NFC Type 5 are working.
So, when you do a 1024 write, the software is "slicing" it and translating this into several "Write Single Block" (or Write Multiple Blocks, I'm not sure) commands.
The RFWRITE interrupt is trigged after each Write Single Block command. The ST25DV16 is not aware of the total amount of data that you want to write, it only understands the current Write Single Block command.
This is why you see several interrupts when writing more than one block of data.
Best regards.
2024-06-19 02:51 AM
Hello,
I can answer your question 1. (I suggest you open another post for question 2, it is easier for everyone to have only one question per post).
When you do a write into EEPROM, this is translated into "Write Single Block" or "Write Multiple Blocks" RF commands. The ST25DV16 accepts those commands to write data into EEPROM.
Those commands are limited to a single block for the first one (which is 4 Bytes), and 4 blocks for the second one (which is 16 Bytes). It is not possible to do a write of more data in a single command. This is how ISO15693 and NFC Type 5 are working.
So, when you do a 1024 write, the software is "slicing" it and translating this into several "Write Single Block" (or Write Multiple Blocks, I'm not sure) commands.
The RFWRITE interrupt is trigged after each Write Single Block command. The ST25DV16 is not aware of the total amount of data that you want to write, it only understands the current Write Single Block command.
This is why you see several interrupts when writing more than one block of data.
Best regards.
2024-06-19 08:42 PM
Thanks for your reply.
2024-06-20 12:02 AM
hello ZHANGHN,
I'm in charge of the iOS NFC Tap support.
Please , could you detail more how to reproduce issue ?
Thx and br,
2024-06-20 12:14 AM
Thanks for your reply. I have just posted a more detailed question at
https://community.st.com/t5/st25-nfc-rfid-tags-and-readers/error-using-nfc-tag-app-to-read-write-st25dv/m-p/687942#M10972. Could you please answer that poster? Thanks!