Skip to main content
Graduate II
June 29, 2025
Solved

How to correctly use rfalST25xVPollerReadConfiguration and WriteConfiguration with ST25TV02KC?

  • June 29, 2025
  • 1 reply
  • 289 views

Hi everyone,

I’m currently working with ST25TV02KC NFC tags and the ST25R3916B reader, using the RFAL library.

I’m trying to access the configuration registers via the following functions:

rfalST25xVPollerReadConfiguration(...)

rfalST25xVPollerWriteConfiguration(...)

 

I’ve already opened the CONFIG security session successfully using PresentPassword with PWD_CFG, so write access should be allowed.

What I’m trying to do:

Read and write configuration registers like:

RW_PROTECTION_A1 → FID: 0x00, PID: 0x00

END_A1 → FID: 0x00, PID: 0x01

According to the datasheet (Table 4), these are valid config registers in group FID 0x00.

 

Here is how I call the read function:

uint8_t regVal = 0;

ReturnCode err = rfalST25xVPollerReadConfiguration(RFAL_NFCV_REQ_FLAG_DEFAULT, uid, 0x01, &regVal); // PID = 0x01 for END_A1

 

And the write function:

uint8_t newVal = 0x20; // Example: change END_A1 to enable dual-area mode

ReturnCode err = rfalST25xVPollerWriteConfiguration(RFAL_NFCV_REQ_FLAG_DEFAULT, uid, 0x01, newVal);

 

Problem: I always receive an error code (5) from both functions.

I verified the UID is correct and tried different register addresses (PIDs), but the behavior remains inconsistent.

 

My questions:

1. Are FID and PID handled internally by these functions, or do I need to somehow pass FID explicitly?

2. Is there anything else that needs to be done before calling ReadConfiguration / WriteConfiguration — e.g., some init command or delay after opening the CONFIG session?

3. Could this be related to timing issues or session closing too quickly?

Any help or working examples would be really appreciated. Thanks in advance!

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    Hi,

    See this ST Community post.

    The support for these two APIs is subsequent to X-CUBE-NFC6 version 3.1.0 but is included in the ST25 embedded library.

    Regards,
    BT

    1 reply

    Technical Moderator
    June 30, 2025

    Hi,

    See this ST Community post.

    The support for these two APIs is subsequent to X-CUBE-NFC6 version 3.1.0 but is included in the ST25 embedded library.

    Regards,
    BT