Skip to main content
Explorer II
April 4, 2023
Question

How can I program my ST25DV board for NFC communication with my own application specifications?

  • April 4, 2023
  • 10 replies
  • 7685 views

Hey, Can you please help me with using ST25DV64KC board. With stm32L476VGT6 core M4 processor.

I want to do NFC communication. I couldn't find anything on the internet or youtube about how to program it.

Somewhere, i read that we have to download the firmware for our board. And it contains the source code..

I downloaded the firmware for my Board from the ST community website. But when I run it it gives me errors. I am trying to resolve these erros from two to three days. But they are not completely removed. The software I am using is STM32 Cube IDE. I want to ask the following questions:

1) Is the firmware code the only way to do NFC Communication? And am I doing something wrong?

2) The IDE that I am using is Stm32 Cube IDE. Does the firmware code supports this? Or it is written for Keil?

3) Do the package contains file that should be removed in order to run it in Stm32 Cube ide.

I will be grateful if you can help me with my questions. Thank you very much.

Best Regards.

    This topic has been closed for replies.

    10 replies

    Technical Moderator
    April 4, 2023

    Hi,

    which FW package do you use? Is your board the ST25DV64KC-DISCO?

    Rgds

    BT

    NZama.1Author
    Explorer II
    April 4, 2023

    I downloaded this firmware package (Source file):

    https://www.st.com/en/embedded-software/stsw-st25dv002.html

    and yes the board is ST25DV64KC-DISCO.

    Technical Moderator
    April 6, 2023

    Hi,

    "1) Is the firmware code the only way to do NFC Communication? And am I doing something wrong?"

    The NFC RF communication is handled autonomously by the ST25DV64KC. There is no need for FW. As soon as the ST25DV64KC is in the operating volume of a NFC reader, it will answer to the reader requests.

    FW is needed for I2C communication between the STM32 MCU and the ST25DV64KC (typically to retrieve the content of mailbox).

    If I am not wrong, the board is delivered with its FW being already downloaded. I would suggest to play with the various menus before using the source code.

    "2) The IDE that I am using is Stm32 Cube IDE. Does the firmware code supports this? Or it is written for Keil?"

    Keil µVision is being used to built this project. Porting to STM32CubeIDE should be feasible.

    "3) Do the package contains file that should be removed in order to run it in Stm32 Cube ide."

    STM32CubeIDE needs the appropriate startup_stm32l476vgtx.s startup file and potentially syscalls.c and sysmem.c. I would suggest to use STM32CubeMX to generate project skeletons for STM32CubeIDE and for Keil µVision to find which changes are needed for STM32CubeIDE.

    Rgds

    BT

    NZama.1Author
    Explorer II
    April 17, 2023


    _legacyfs_online_stmicro_images_0693W00000biF9OQAU.pngI just want to do NFC communication with the processor on this board. According to my own application. I also want to use the daughterboard to complete my task. So, to code for it I was asking that how can I accompalish it? That is why I downloaded the firmware so I could program it accordingly by my own.

    Regards.

    Technical Moderator
    April 11, 2023

    Hi,

    this is  ST25DV64KC-DISCO with STSW-ST25DV002 (Firmware for ST25DV64KC-DISCO kit). If you simply want to download the original FW on the board, use the STSW-ST25DV002 Firmware for ST25DV64KC-DISCO kit (Binary) 2.1.0. Connect the STLink USB, an MB1396 virtual drive should appear on your PC, then drag and drop the binary into the MB1396 drive. Press the reset button (black) and this should work.

    Rgds

    BT

    NZama.1Author
    Explorer II
    April 17, 2023


    _legacyfs_online_stmicro_images_0693W00000biFA2QAM.png SW-ST25DV002   (Firmware for ST25DV64KC-DISCO kit).

    Technical Moderator
    April 18, 2023

    Hi,

    if you need to write your own application, you can use the source code: STSW-ST25DV002SC Firmware for ST25DV64KC-DISCO kit (Source).

    Then, if your IDE is not Keil µVision, you will have to port to your own IDE (STM32CubeMX can help you to generate the application skeleton).

    Feel free to share more details about your application so that we can better support you.

    Rgds

    BT

    Technical Moderator
    April 19, 2023

    Hi,

    make sure your include path is correct. You can retrieve the include path inside the Keil µVision uvprojx file (see <IncludePath> in the Project.uvprojx file). Also make sure to have the proper defines (see <Define> in the Project.uvprojx file).

    Rgds

    BT

    NZama.1Author
    Explorer II
    April 19, 2023
    Ok. I'll give it a try and then let you know. Thank you.
    ST Employee
    April 20, 2023

    Hi @NZama.1​ ,

    Here attached you will find the project files for STM32CubeIDE to help you working with ST25DV64KC-DISCO and STM32CubeIDE.

    I used references to source code instead of direct source code in the project explorer, so you need to copy the folder from the zip file in the source code of the ST25DV64KC-DISCO to Projects\ST25DV-Discovery\Demonstrations\ST25DVDemo\ to have correct references. Include files are set in the project properties menu in C/C++ Build -> Settings -> Tool Settings -> MCU GCC Compiler -> include paths. Preprocessor symbols are also defined.

    I hope this can help you.

    Kind Regards.

    NZama.1Author
    Explorer II
    April 25, 2023

    Hi, Thankyou what you did. But unfortunately I got this when I pasted your file here Projects\ST25DV-Discovery\Demonstrations\ST25DVDemo\


    _legacyfs_online_stmicro_images_0693W00000binhPQAQ.png 

    I just change the name of your MX file from NFC_Final_Working to Final_NFC_Working so I could remove the error . But i could'nt get that whether I did what you asked me to do or not? Have I placed the files in the correct place? Can you clear me the complete folder paths I mean complete folder that worked for you? Not just the inner project file? Thank you. Best Regards.

    ST Employee
    April 25, 2023

    Hi @NZama.1​,

    I didn't update the IOC file for this project so that's why you got the error opening this file.

    Just copy into the folder as you did (Projects\ST25DV-Discovery\Demonstrations\ST25DVDemo\NFC_Final_Working). And you should be able to compile the project, if not give feedback on errors you get.

    You may have some warning during compilation because keil and STM32CubeIDE doesn't use same compiler but compilation and running should be ok (it is on my side).

    Kind Regards.

    NZama.1Author
    Explorer II
    May 8, 2023

    Can anyone guide me about my problem? I am stuck in doing this NFC communication with firmware code as explained in my previous posts. Any help will be appreciated.