Skip to main content
BHuss.2
Visitor II
October 17, 2023
Question

HAL tick problem

Hi, 

I am using stm32wb55 mcu with freeRtos, I changed the timebase source time to TIM17 as recommended when using freeRTOS but I am facing unxpected behavior unless I use TIM17 as the source time base the HAL_Delay is not working and the uwTick is stack on zero until the freeRtos schedular starts. 
What I noticed that I did not get the TIM17 interrupt until the OS starts what is not clear for me, I changed the timebase source so I can call the HAL functions which are using the DELAY before the freeRTOS starts.

Any Idea 

BR 

Basel 

This topic has been closed for replies.

1 reply

Bob S
Super User
October 17, 2023

This is a known issue with FreeRTOS.  Any function that creates a FreeRTOS task/mutex/queue/etc. and is called before osKernelStart() will disable interrupts.  This includes the usual MX_FREERTOS_Init() function.  So any code you have between MX_FREERTOS_Init() and osKernelStart() will run with interrupts disabled.