Skip to main content
Graduate
September 2, 2021
Solved

Problem with "globalCommProtectCnt" during importing the project

  • September 2, 2021
  • 1 reply
  • 1518 views

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

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    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

    1 reply

    Technical Moderator
    September 2, 2021

    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

    DIvan.1Author
    Graduate
    September 2, 2021

    Thank you, your answer is very usefull.

    I forgot to copy uint8_t globalCommProtectCnt = 0;

    Thank you again and have a nice day,

    Domen