cancel
Showing results for 
Search instead for 
Did you mean: 

Integrating RFAL Files for NFC Communication with STM32Cube

med_benhaj1
Associate

I am currently working on a project that involves reading NFC tags using the NFC X-NUCLEO-NFC08A1 extension, which utilizes the ST25R3916 NFC reader connected to an STM32 Nucleo-G0B1RE platform.

Having completed the hardware interfacing for SPI communication between the two, I have now integrated the RFAL files into the project via the X-CUBE-NFC6 package to enable communication between the STM32Cube software and the NFC reader.

Are there any modifications required in these files to adapt them to the project? Additionally, what is the difference between X-CUBE-NFC6 and STSW-ST25RFAL002?

3 REPLIES 3
Brian TIDAL
ST Employee

Hi,

STSW-ST25RFAL002 contains the standalone RFAL only whereas X-CUBE-NFC6 contains full demos (polling demo and NDEF demo) in addition to the RFAL.

When using the X-CUBE-NFC6 with STM32CubeMX, a running project is generated (either based on the polling demo or based on the NDEF demo). It should run out of the box on your board without any modification (make sure to follow the getting started guide inside the documentation folder). Then you can modify the  demo_polling.c file to adapt the application to your own needs.

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.
med_benhaj1
Associate

Thank you so much for your response, it was very helpful. Now, I am encountering an issue with the hardware configuration before generating the code in STM32CubeMX.

I have configured SPI1 under the <connectivity> section, selecting all the appropriate pins for the corresponding signals according to the datasheet and schematic. However, when configuring X-CUBE-NFC6 in the <platform Settings> section, I cannot find the pins I configured for the NFC CS PIN and NFC INT PIN, even though the pins are correctly highlighted in green in the graphical interface.

Brian TIDAL
ST Employee

Hi,

as shown in figure 20 of the STMicroelectronics.X-CUBE-NFC6_GettingStarted.pdf, the hardware NSS signal should be disabled. The SPI1_NSS should be enabled as a GPIO_Output pin (Figure 21).

The NFC INT PIN should enabled as an EXTI with External Interrupt Mode with Rising edge trigger detection (should not be not a GPIO_input). The related EXTI interrupt should enabled and the interrupt priority must lower than the systick interrupt (lower priority means higher numerical value). Figure 23 shows an incorrect priority for the EXTI Line 0 (should be > 0).

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.