Skip to main content
Visitor II
March 10, 2022
Solved

How to create a project with X CUBE NFC06

  • March 10, 2022
  • 2 replies
  • 1662 views

Hi,

I want to detect NFC tag. For that I have a P-NUCLEO-WB55 + X NUCLEO NFC06A1.

I have downloaded the zip file (en.X-CUBE-NFC6_v1.1.0) from ST with examples but they are for boards that aren't mine.

I tried to:

  • Generate a code for wb55 with CubeMX
  • Add files (header and source) from the zip file

But I ended up with somes errors like "/Core/Inc/platform.h:149:55: warning: implicit declaration of function '_Error_Handler'; did you mean 'Error_Handler'?"

or "'BUS_SPI1_NSS_GPIO_PORT' undeclared (first use in this function); did you mean 'NUCLEO_SPIx_SCK_GPIO_PORT'?"

So my question is what is the right way to create a project with X CUBE NFC6 ?

EDIT:

Thanks to Brian TIDAL, I have been able to create a project from scratch for WB55 + NFC06A1 shield.

Process should be the same for others boards so you will find in attachement a zip containing a tutorial.

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

    Hi,

    this is the right way: generates a skeleton from STM32CubeMX and importing the RFAL sources/includes into your project.

    You will find tips in https://community.st.com/s/question/0D53W000006G1H9SAK/how-to-start-with-st25r3911b-and-is-it-really-necessary-to-use-rfal-and-st25r3911-libraries-for-simpel-project (it is related to ST25R3911B but applies as well on ST25R3916).

    Regarding the various compilation errors, the platform.h macros need to be updated in accordance with you platform:

    • your error handler is probably declared as Error_Handler in main.h
    • modify ST25R391X_SS_PORT in platform.h to SPI1_CS_GPIO_Port (assuming SPI1_CS is the name of the SPI1 Chip Select in your STM32CubeMX configuration, See your main.h for the naming on your platform).
    • modify other defines to cope with your STM32CubeMX configuration

    Rgds

    BT

    2 replies

    Technical Moderator
    March 10, 2022

    Hi,

    this is the right way: generates a skeleton from STM32CubeMX and importing the RFAL sources/includes into your project.

    You will find tips in https://community.st.com/s/question/0D53W000006G1H9SAK/how-to-start-with-st25r3911b-and-is-it-really-necessary-to-use-rfal-and-st25r3911-libraries-for-simpel-project (it is related to ST25R3911B but applies as well on ST25R3916).

    Regarding the various compilation errors, the platform.h macros need to be updated in accordance with you platform:

    • your error handler is probably declared as Error_Handler in main.h
    • modify ST25R391X_SS_PORT in platform.h to SPI1_CS_GPIO_Port (assuming SPI1_CS is the name of the SPI1 Chip Select in your STM32CubeMX configuration, See your main.h for the naming on your platform).
    • modify other defines to cope with your STM32CubeMX configuration

    Rgds

    BT

    Visitor II
    March 16, 2022

    Thanks to Brian TIDAL, I've been able to create this tutorial to create a project fom scratch for WB55 + NFC06A1.

    Process should be the same for others boards.

    You will find this in attach zip folder.