cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL55 & FreeRTOS - Change system time base

hluyo
Associate

Hello, I am working with the STM32WL55 core and I started the FreeRTOS test and a problem occurred to me that I would like to share with you.
The only thing I have done is define pin 15 of port B as output and I have created a FreeRTOS task, and within the task I have performed the LED switching:

hluyo_0-1706060373735.png

In addition to that, as is already known, FreeRTOS works with Sistyck and the HALs should use another clock source to avoid generating conflicts, in this case I have used timer 1.

hluyo_1-1706060394133.png

After configuring that way, I run the program and the LED stays on on the board, it does not switch as done in the programming.

Something different happens when I let the FreeRTOS and the HAL use the Systick as a clock source, the LED does blink.

What do you think is happening?

3 REPLIES 3
STTwo-32
ST Employee

Hello @hluyo 

As you said "FreeRTOS works with Systick so is recommended for the HALs to use another clock source to avoid generating conflicts". I've personally tested using this example and it works fine. I've defined the Timebase source to both Tim1 and Tim17 and both works.

Best Regards.

STTwo-32

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.

AElgh
Associate III

Check the priority of the Systick in the NVIC, maybe other higher priorities tasks cut it before it finishes updating the counting.

Is it possible to use the RTC(as in the LoRaWAN-End-Node example) as the HAL time-base source (instead of any of the timers)?