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?

1 ACCEPTED SOLUTION

Accepted Solutions
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.

View solution in original post

6 REPLIES 6
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)?

mardaguler
Associate II

Hello,

Any updates ?, i am also working on freertos in nucleo-stm32wl55jc1

 

Regards

Hello @mardaguler ,

To get started with FreeRTOS on the NUCLEO-STM32WL55JC1, use the STM32CubeWL firmware package, which provides several ready-to-use FreeRTOS examples run using STM32CubeIDE, and are easily customizable. 

Make sure to follow the instructions in the readme file and you can refer to " Getting started with STM32CubeWL" section in the UM2643 Getting started with STM32CubeWL for STM32WL Series.

If you still have issues, please create a new thread with more details as mentioned here: How to write your question to maximize your chances to find a solution.

 

 

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Okey, thanks a lot.

Arda