cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS: no verride generated for systick

Hello, I am using CubeMX 4.26.1:

The bug scenario is the following:

  • Configure project for FreeRTOS usage,
  • Configure SysTick as system clock,
  • Everything works, as FreeRTOS in port.c uses the SYstick registers.
  • Change the timer to other one than Systick in sys configuration,
  • FreeRTOS generated code will not be aware of that and still configure Systick registers at init instead of ie. TIM2.

All port.c file is coded around systick, with hardcoded addressing and no overrides available to change the timer. Can anyone confirm or had a similar problem?

3 REPLIES 3
Barry.Richard
Associate III

If you change the clock then you also have to change the code - there is no way FreeRTOS can automatically do that for you.

Here are some links that will help:

https://www.freertos.org/low-power-ARM-cortex-rtos.html

https://www.freertos.org/low-power-tickless-rtos.html

Hi @Barry.Richard​ , thanks for answer.

I dont mean for FreeRTOS to do that but CubeMX yes, the same way it changes other FreeRTOS settings.

Pavel A.
Evangelist III

This is strange. Normally, CubeMX knows that freeRTOS uses systick, and offers to choose one of MCU timers for HAL tick source. Note, the ST HAL will use the TIM as its tick - not freRTOS.

-- pa