2026-05-16 8:05 AM
Hi everyone! I'm working with the NFC07A1 board associated with the Nucleo L053R8, with the intention of being able to perform ADC readings. I configured everything(ADC, pin, NFC07A1, etc.) on CubeMx, and then, opened the generated file on CubeIde. After writing the code for reading the ADC in the main file, i tried to run it, but even though there were no errors in the code, the "startup_stm32l053r8tx.s" tab opens by pointing to line 51 (as well as Reset_Handler: ldr r0, =_estack). Consequently, the values acquired via the ADC are not printed on the screen, but the only thing printed on the sreen is "welcome to x-cube-nfc7 example". Could you help me solve the problem?
Solved! Go to Solution.
2026-05-21 5:22 AM
Hi,
make sure to follow the User Manual UM2960 Getting started with the X-NUCLEO-NFC07A1 NFC/RFID tag IC expansion board based on ST25DV64KC for STM32 Nucleo. In particular:
Rgds
BT
2026-05-16 4:01 PM
Hi,
as "welcome to x-cube-nfc7 example" is displayed on the serial console, it is likely that the code runs properly up to MX_NFC7_Init() in main(). I guess you code is in /* USER CODE BEGIN 2 */. I suggest to set a breakpoint in the very first line of your code after MX_NFC7_Init() and to step in until you see the crash. Likely a printf or a null pointer issue.
Rgds
BT
2026-05-17 8:11 AM
2026-05-17 2:17 PM
Hi,
have you tried to debug step by step your code?
Also some suggestions: I would first display the raw 12 bits value of the ADC as unsigned integer before trying to convert to floats and before trying to use sprintf with %f and before trying to use floats on an embedded system. Note that you can use printf as io_putchar is redirected to HAL_UART_Transmit in stm32l0xx_nucleo.c. Check also the stack size.
Rgds
BT
2026-05-20 4:26 AM
Thanks for the advice! I tried debugging step by step, and when i got to the MX_NFC7_Init(); line, everything froze. I then ran the Step into command, and the app_nfc7.c file opened. Here, i noticed that the code stopped working when it encountered the while (NFC07A1_NFCTAG_Init(NFC07A1_NFCTAG_INSTANCE)!=NFCTAG_OK); line. What's the problem? How can i solve it?
2026-05-21 5:22 AM
Hi,
make sure to follow the User Manual UM2960 Getting started with the X-NUCLEO-NFC07A1 NFC/RFID tag IC expansion board based on ST25DV64KC for STM32 Nucleo. In particular:
Rgds
BT
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.