2023-03-15 12:10 AM
Hi ,
I integrated st25dv64kc nfc tag into stm32 board. I have to store a serial number permanently in NFC EEPROM user area. It should not be erased in RF write and I2c Write. I used NDEF format .
Is it possible to store text permanently ?
Solved! Go to Solution.
2023-05-04 08:43 AM
Hello Neethu,
Ok, so if the data is correct using i2C read, this means that the application is not able to read the data at this place in memory (probably using read Single Blocks command)
Can you please try this application: https://play.google.com/store/apps/details?id=com.st.st25nfc&hl=en&gl=US
Also, if your NDEF file is to be from block 0000h to block 01ffh, you need a special CC file on two blocks (CCFile on 1 block will allow NDEF file only up to block FFh).
The application I recommend you will create the appropriate CCFile for you (I think NFC tool may not create the correct CCFile) If you want infor on CCFile format, please read this application note: https://www.st.com/resource/en/application_note/an4911-ndef-management-with-st25dvi2c-series-and-st25tv16k-and-st25tv64k-products-stmicroelectronics.pdf
Best regards.
2023-03-20 03:29 AM
Hello,
The EEPROM is non volatile memory, which means that once your data is written, it is not erased at power down. Then, if you want it not to be overwritten, you need to write-protect the memory.
In ST25DV64KC, you can protect the memory from write (and read if needed).
The memory can be divided in 1 up to 4 areas. Each are can be independently protected.
The size of each area is also programmable. The areas are contiguous and minimum size is 32 Bytes.
So, to store your serial number, you can create an area of at least the size of your number. this is done using the ENDA1, ENDA2, ENDA3 configuration registers. Pleas see chapter 4.2.1 User memory areas in the datasheet.
Then you need to protect this area against write (see chapter 5.6 Data protection in datasheet).
You can protect the access from the RF interface by setting the value of the RFAxSS configuration registers corresponding to your area. You can allow to access the area in read only after presentation of a password, or you can definitely block the write access by protecting the area without a password.
On the I2C side, the area can be protected in write using the I2CSS configuration register.
Best regards.
2023-04-10 10:15 AM
2023-04-18 12:54 AM
Hello Neethu,
Let me answer your questions one by one:
"Is it possible to write ccfile in the ENDA2 area?": yes, it is possible, but it is meaningless since the CCFile must always be at the first address of the memory to be regognized yb a reader (this is the NFC Forum specification). So, in practice, the CCFile must always be at the start of the memory, in the first area.
"if I protected the ENDA1 area for write protection, would RF write in the ENDA2 area possible.? Will writing to different areas using the RF write will work ?": yes, protection of each area are completely independent from each others.
Basically, if you want to use NDEF, you must have the CCFile at the beginning of memory (start of area 1), immediately followed by the NDEF data. This is mandatory to respect the NFC Forum specification and ensure interoperability with readers.
Then if you want to have proprietary data, you can put it in the second area and protect it separately from area1.
Best regards.
2023-04-27 05:34 AM
2023-04-28 03:37 AM
Hello,
Off course, all the data in the tag are readable.
The Area1 contains an NDEF file, which is a standardized file format. So any application which is NFC Forum compliant can read it as it is standard data format.
The area2 contains proprietary data, stored in a proprietary way. So you need a proprietary application, either on your phone or on a reader to read it.
I don't know which NFC application you are using, but very often those apps are allowing you to read the memory content in raw format. You can read the area 2 this way.
Best regards.
2023-05-02 03:53 AM
You can set up the CC area to indicate that a specific memory block (or blocks) is read-only, which will prevent it from being erased or modified by RF writes or I2C writes. This can be done using the ST25 NFC Tag configuration software provided by STMicroelectronics.
Once the CC area is set up, you can write your serial number to the user area of the tag using the NDEF format, as you have already done. The serial number will be stored permanently in the read-only memory block(s) that you have specified.
2023-05-04 08:13 AM
2023-05-04 08:23 AM
@NN R.2:
I still don't know what is this NFC tool app you are using, but be this can be the issue.
In ISO15693 and NFC Forum type 5, there are two different read commands:
The first one codes the block address on one Byte, and thus is only able to address the first 256 Blocks of memory.
The second one is to be used with large memory tags, and codes the block address on 2 Bytes. It is able to address all blocks of the tag.
If your NFC tool app is only able to send Read Single Block, the address block 200h will problably be truncated to address 00h, which can explain that you read the same NDEF data as in area 1.
When you read memory at I2C address 800h from I2C interface, is your data correct ?
Best regards.
2023-05-04 08:37 AM
@MStev 8:
The indication of read only state in the CCFile is only an INFORMATIVE indication. It doesn't mean that the block indicated are really locked.
One that put the read only bit in the CCFile shall also lock those blocks pointed out by the CCFile.
Furthermore, CCFile lock specifies a lock for the complete NDEF file, so it may not correspond to what is requested here.
Best regards.