2019-04-09 02:50 AM
Hi all,
I am working with the Nucleo-L476RG board.
I generated a project with CubeMx and enabling FreeRTOS.
At this point the project is running fine.
I debug the project and all is working.
I put a breack point inside the "SysTick_Handler" and this hadler is always launching.
Now, in main function, I add "HAL_Delay(1000)" after creation of the default task with "osThreadCreate" function:
When I debug this code, the "SysTick_Handler" is never launching.
And the code hangs in the "HAL_Delay" function where "HAL_GetTick()" function returns always 0.
I read at https://community.st.com/s/question/0D50X00009XkYFaSAN/freertos-stm32-tick
that If Iwant to use HAL_Delay() before vTaskStartScheduler (osKernelStart), I need to check scheduler state before call xPortSysTickHandler:
I add this check in "SysTick_Handler":
BUT the problem persists because the "SysTick_Handler" was never launched.
Can anyone please found the cause of this problem.
I now that I can overwrite the "HAL_Delay" function since it is "weak", but I need to know the cause of this problem.
Is there any missing configuration ?
Thank you.
2024-07-30 09:05 AM
@Yassine1 I don't think there is anything to overcome -- one just needs to be aware of the issue and write one's code accordingly.