cancel
Showing results for 
Search instead for 
Did you mean: 

what to do when you want to password protected write for nfc 5 tag using st25dvXX ?

Mpraj.19
Associate II

I am implementing nfc reader and writer application. i am able to write in a tag.

But I want password authentication before write what i should do to achieve this.

Thanks st community for your Helpful information.

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi,

some additional information: the RFAL library in X-CUBE-NFC5 firmware package for ST25R3911B X-NUCLEO-NFC05A1 expansion board provides an API for presenting password and for reading/writing the configuration. See rfal_st25xv.c for more details.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
JL. Lebon
ST Employee

​Hello,

The ST25DV allows to partition the memory in 1, 2, 3 or 4 memory areas (configurable in size). Each area can be individually read and/or write protected by a 64 bits password.

For your use case, you first need to determine if you need one or more area memory. This is configured using the ENDA1 to ENDA3 static register. Please refer to datasheet chapter "4.2.1 User memory areas" which explains how to configure memory areas.

Then, you can write protect the one or more areas with password by programming the RFA1SS, RFA2SS, RFA3SS or RFA4SS respectively for area 1, 2, 3 and 4. This is all explained in the datasheet in chapter "5.6 Data Protection".

For example, on a ST25DV04K, if you want to have only one area including the whole memory, you should have ENAD1=ENDA2=ENDA3=0Fh.

Then you can write protect area1 with password 1 by writing RFA1SS=09h. This will write protect the complete tag's memory, and write will only be possible after presenting the correct password #1.

Hope this helps,

Best regards.

Brian TIDAL
ST Employee

Hi,

some additional information: the RFAL library in X-CUBE-NFC5 firmware package for ST25R3911B X-NUCLEO-NFC05A1 expansion board provides an API for presenting password and for reading/writing the configuration. See rfal_st25xv.c for more details.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Can you please send a link of rfal_st25xv.c and related firmware package.

Thank you for Help​

Brian TIDAL
ST Employee

Hi,

you can download the firmware package at https://www.st.com/en/embedded-software/x-cube-nfc5.html. rfal_st25xv.c is located in STM32CubeExpansion_NFC5_V2.0.0\Middlewares\ST\rfal\Src. Overall documentation is in STM32CubeExpansion_NFC5_V2.0.0\Middlewares\ST\rfal\doc\rfal.chm

Rgs

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.