Skip to main content
Visitor II
June 12, 2020
Solved

hello,I have a question that X-NUCLEO-NFC03A1 cann't read and write X-NUCLEO-NFC04A1! By the way,My phone'NFC function can read X-NUCLEO-NFC04A1. I have Nucle0-64 STM32L433 to drive X-NUCLEO-NFC03A1.

  • June 12, 2020
  • 6 replies
  • 1796 views

My project is tansplanted accordding to X-CUBE'STM32F401RE-Nucleo. main.c Functiong also is same. But when I am running ,the Program is dead. To the same time ,My warning LED that Nucle0-64 STM32L433 board' LED isn't lighting. Than I shield ---if( !demoIni() )----else-----,LED light. Finally,When I use ndef_example_read.c and ndef_example_write.c,program enter in HardFault_Handle. I also initialise my ST32L433 board through cube_MX,also According to X-CUBE'STM32F401RE-Nucleo.I want to know that NFC-CR95HF is developed ways and procedure. Thank you !

    This topic has been closed for replies.
    Best answer by KJame.1

    Hi,

    Thank your for your patiently answer and guidance! According to X-NUCLEO-NFC03A1 instructions'Figure 2 Nucleo connectors, I initialized my NUCLEO-L433RC-P SPI1 that mapping PA5,PA6,PA7,PB6. we shouled use SPI2 mapping PB15 ,PB14,PB13. My error lead to demoIni() failing. Thank you again!

    6 replies

    Technical Moderator
    June 12, 2020

    Hi,

    I suggest you first generate your NUCLEO-L433RC-P project from STM32CubeMX and make a simple LED blinking loop

    Then, thanks to STM32CubeMX, add the various initialization (GPIO, SPI, etc.). Here is for example the IOC file for NUCLEO-L476RG. For the SPI, make sure to use the proper prescaler according to your clock settings. Check as well the proper pin assignment. Check the stack size (see IOC example). Generate the project and test again with the simple LED blinking.

    Plug the X-NUCLEO-NFC03A1 shield, add the various rfal and ndef files into your project, modify the main.c to call demiIni() and demo() loop. Set the proper defines (ST25R95) in the build system. This should work.

    Rgds

    BT

    KJame.1Author
    Visitor II
    June 15, 2020

    First,I generate my Project,NUCLEO-L433RC LED is blinking normally.Accordding to your sending X-NUCLEO-NFC03A1, have modified differences . Then I plug the lib NDEF,RFAL,Commponents etc. Importantly,Main.c is plugged demo.c ,demo_ce.c,logger.c, not ndef_demo.c and ndef_dump.c. To the same time ,I shield ---if( !demoIni() )----else----,finding NUCLEO-L433RC LED not blinking. By debugging ,program is died in rfalNfcInitialize().

    Technical Moderator
    June 15, 2020

    Hi,

    can you give more information about your IDE? Keil/IAR/STM32CubeIDE?

    What is your stack size?

    can you give more information about "program died in rfalNfcInitialize()": is an hard fault triggered? Does the issue happen when executing rfalAnalogConfigInitialize or when executing rfalInitialize

    Can you confirm your board is a NUCLEO-L433RC-P?

    Is it not needed to add the NDEF in your project if you use on demo.c

    Rgds

    BT

    Technical Moderator
    June 15, 2020

    Hi,

    I've ported on NUCLEO-L433RC-P and did not faced any issue. You can unzip the attached package in STM32CubeExpansion_NFC3_V2.1.0\Projects and compile it with STM32CubeIDE. Can you share what was wrong on your side?

    Thanks

    Rgds

    BT

    KJame.1AuthorAnswer
    Visitor II
    June 17, 2020

    Hi,

    Thank your for your patiently answer and guidance! According to X-NUCLEO-NFC03A1 instructions'Figure 2 Nucleo connectors, I initialized my NUCLEO-L433RC-P SPI1 that mapping PA5,PA6,PA7,PB6. we shouled use SPI2 mapping PB15 ,PB14,PB13. My error lead to demoIni() failing. Thank you again!