cancel
Showing results for 
Search instead for 
Did you mean: 

Reset_Handler NFC07A1

CART
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

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:

  • Check that the jumper on the X-NUCLEO-NFC07A1 ST1 connector is in place (between the middle pin and the 3V3 pin if providing power from the nucleo board). This jumper provides the required voltage to the device on the board;
  • Check that the X-NUCLEO-NFC07A1 is properly connected on top of the STM32 Nucleo.

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.

View solution in original post

5 REPLIES 5
Brian TIDAL
ST Employee

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

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.

I'm leaving the code attached. In the Nucleo L053R8, led1 and led3 remain solid red, while in the NFC07A1, led1,led2 and led3 light up correctly

Brian TIDAL
ST Employee

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

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.

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?

Brian TIDAL
ST Employee

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:

  • Check that the jumper on the X-NUCLEO-NFC07A1 ST1 connector is in place (between the middle pin and the 3V3 pin if providing power from the nucleo board). This jumper provides the required voltage to the device on the board;
  • Check that the X-NUCLEO-NFC07A1 is properly connected on top of the STM32 Nucleo.

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.