Skip to main content
Associate
December 13, 2025
Solved

X-NUCLEO-NFC09A1 using library demo app

  • December 13, 2025
  • 7 replies
  • 1676 views

vinodyp92_0-1765650610536.png

It is getting hang at this point, going to infinite loop 
MCU: STM32F407
SPI1 Interface
Tried ST25R_SELFTEST as well same problem 

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

Hi,

do you use the X-CUBE-NFC9 Firmware package or the ST25R Embedded Library Firmware package? Have you generated your application with STM32CubeMX+X-CUBE-NFC9?

Could you check that the EXTI interrup of the pin connected to the ST25R100 interrupt line is enabled and that the st25r200Isr is properly called by the interrup handler? Also check the priority of the EXTI interrupt versus the priority of SYSTICK interrup. Is the platformProtectST25RComm properly implemented? 

Rgds

BT

7 replies

Brian TIDAL
Brian TIDALBest answer
Technical Moderator
December 14, 2025

Hi,

do you use the X-CUBE-NFC9 Firmware package or the ST25R Embedded Library Firmware package? Have you generated your application with STM32CubeMX+X-CUBE-NFC9?

Could you check that the EXTI interrup of the pin connected to the ST25R100 interrupt line is enabled and that the st25r200Isr is properly called by the interrup handler? Also check the priority of the EXTI interrupt versus the priority of SYSTICK interrup. Is the platformProtectST25RComm properly implemented? 

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.
vinodyp92Author
Associate
December 15, 2025

Hello

Thank you for the response,
I Corrected Priority and Enabled NVIC EXTI and also called the st25r200Isr, 

Now the infinite loop issue gone.

I'm using ST25NFC_Embedded_Lib_ST25R200_1.8.0, 
STMicroelectronics\ST25NFC_Embedded_Lib_ST25R200_1.8.0\Middlewares\ST\RFAL
I generated code using STM CUBE IDE FOR STM32F407 Discovery Board , included above path to use the library.
I Have done SPI Connection from my discovery board to X-NUCLEO-FC09A1 Board.

Now I'm stuck at 

case DEMO_ST_DISCOVERY:

if( rfalNfcIsDevActivated( rfalNfcGetState() ) )

I'm getting RFAL_NFC_STATE_POLL_TECHDETECT:

vinodyp92_0-1765794496979.png

 

 

Brian TIDAL
Technical Moderator
December 15, 2025

Hi,

could you enable ST25R_SELFTEST and ST25R_SELFTEST_TIMER compilation flags?

Which tag (manufacturer and model) do you use for your tests?

Could you check with a scope that the RF field is on?

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.
vinodyp92Author
Associate
December 15, 2025

Hello

I Enabled Self Test, going to error platformErrorHandle();
RFAL_ERR_SYSTEM 8 

vinodyp92_1-1765799381468.png

Im using a card ISO 14443-3A by NXP- MIfare Clasic

I don't have any equipment to check RF Filed 

Vinod

Brian TIDAL
Technical Moderator
December 15, 2025

Hi,

could you check the implementation of the following macros in rfal_platform.h:

  • #define platformTimerCreate( t )
  • #define platformTimerIsExpired( timer )
  • #define platformTimerGetRemaining( timer )
  • #define platformDelay( t )
  • #define platformGetSysTick()

See an example of rfal_platform.h in polling demo in the ST25NFC_Embedded_Lib_ST25R200 package.

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.
Brian TIDAL
Technical Moderator
December 15, 2025

Hi,

I suspect that the system tick is not configured correctly.

How is the system tick being implemented in your application? Could you check that the tick is regularly incremented? Could you toggle a GPIO for 50ms using HAL_Delay(50)  and check the output with a scope connected to the GPIO?

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.
vinodyp92Author
Associate
December 15, 2025

uint32_t t1 = HAL_GetTick();
HAL_Delay(10);
uint32_t t2 = HAL_GetTick();
t2 - t1 ≈ 11

I'm getting above difference.

Brian TIDAL
Technical Moderator
December 16, 2025

Hi,

Could you check the accuracy of the system tick? e.g. toggle a GPIO and connect a logic analyzer.

To check the RF field, just connect the ground of a scope probe to the tip of the probe. This creates a antenna loop that can be used to probe the RF signal.

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.
vinodyp92Author
Associate
December 16, 2025

Hello,

I commented the ST25R_SELFTEST_TIMER and proceeded, now I could able to detect the card and read the UID.
Next is I want to do the authenticate the card, I want to perform the read /write the card.
Im using a card ISO 14443-3A by NXP- MIfare Clasic
MCU:STM32F407 Discovery
NFC: X-NUCLEO-NFC09A1

Kindly help

Vinod



Ulysses HERNIOSUS
Technical Moderator
December 16, 2025

Hi,

commenting the ST25R_SELFTEST_TIMER may cover issues which you encounter in future. From a first glimpse your timer is slower than expected - might be acceptable, depending no how much it is off.

For Mifare Classic support: ST does not provide code. If you look around in the community you will find discussions how to use RFAL for transceiving the frames required for these cards.

 

BR, Ulysses

Brian TIDAL
Technical Moderator
January 14, 2026

Hi,

the 50ms duration seems to be correct.

Could you reenable the ST25R_SELFTEST_TIMER: do you still face the issue? If yes, could you connect a logic analyzer on SPI (CLK, MISO, MOSI, CS), ST25_RESET pin and ST25_INT pin and provide a log from power on up to the issue?

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.
vinodyp92Author
Associate
January 14, 2026

I reenable the ST25R_SELFTEST_TIMER, same issue I'm facing. i will try to get the logs from logic analyzer. but
But if i disable  and run discovery i could able to do read write to my nfc tag 216. problem is if u use same code in different my colleague board, card discovery not happening.so i thought of asking 

vinodyp92Author
Associate
January 14, 2026

I re-enabled ST25R_SELFTEST_TIMER, but I’m still facing the same issue. I’ll try to capture logs using the logic analyzer.

However, if I disable it and run discovery, I’m able to read and write to my NFC Tag 216.

The problem is, when I use the same code on my colleague’s board, card discovery is not happening at all. So I thought of asking you about this.

Brian TIDAL
Technical Moderator
January 14, 2026

Hi,

could you share details about your application:

  • HW:
    • how are connected the MCU board (STM32F407 Discovery Board) and the X-NUCLEO-NFC09A1 board: flying wires? Are the flying wires close to the antenna? Make sure to have the flying wires not in the antenna operating volume
    • how is the X-NUCLEO-NFC09A powered? From the P2 connector (5V pin) of the discovery board or from external power supply? In case it is powered by the discovery board, make sure the wire is big enough 
    • Are the GNB of the 2 boards properly connected?
    • Is the ST25_RESET pin connected to a control GPIO of the Discovery board?
    • Is the USB port able to provide enough current to the Discovery board + X-NUCLEO-NFC09A1? Could you try with a powered USB port
    • Are the R211 and R212 0 Ohm resistor properly not mounted on X-NUCLEO-NFC09A1?
  • SW
    • how is the ST25_RESET control GPIO being managed? fixed at boot up or managed through the rfal_plaftorm.h ST25R_RESET_PIN and ST25R_RESET_PORT defines

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.