cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with "globalCommProtectCnt" during importing the project

DIvan.1
Associate III

Hello after importing NFC project example (X-NUCLEO-NFC05A1) to chip "STM32L051C8T6" I get an error: "undefined reference to `globalCommProtectCnt'"

0693W00000DlxezQAB.pngI made import of the NFC project many times but never get this error. Only difference from other is that now I have the same interrupt function for EXTI0 and EXTI1.

So, instead of "void EXTI0_IRQHandler(void){"

I have now "void EXTI0_1_IRQHandler(void)".

During importing the project I did:

  • add rfal and ST25R3911 library,
  • add path to this library,
  • add USE_LOGGER to symbol,
  • add demo, logger, platform, spi and usart files to Src and Inc folder,
  • add "st25r3911Isr();" into the folder stm32l0xx_it.c,
  • in platform file change "EXTI0_IRQHandler" to "EXTI0_1_IRQHandler" .

Thank you for your time and help,

Domen

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi,

the main.c needs also to be modified:

  • uint8_t globalCommProtectCnt = 0; has to be added in the /* USER CODE BEGIN PV */ ... /* USER CODE END PV */ private variable block
  •  spiInit(&hspi1);  logUsartInit(&huart2); demoIni() has to be added in the /* USER CODE BEGIN 2 */ block
  •   demoCycle(); has to be added in /* USER CODE BEGIN WHILE */ while block

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

2 REPLIES 2
Brian TIDAL
ST Employee

Hi,

the main.c needs also to be modified:

  • uint8_t globalCommProtectCnt = 0; has to be added in the /* USER CODE BEGIN PV */ ... /* USER CODE END PV */ private variable block
  •  spiInit(&hspi1);  logUsartInit(&huart2); demoIni() has to be added in the /* USER CODE BEGIN 2 */ block
  •   demoCycle(); has to be added in /* USER CODE BEGIN WHILE */ while block

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.

Thank you, your answer is very usefull.

I forgot to copy uint8_t globalCommProtectCnt = 0;

Thank you again and have a nice day,

Domen