cancel
Showing results for 
Search instead for 
Did you mean: 

Impact and selection of the correct timebase source

Rookie38
Associate III

Hello ST community,

In the software STM32CubeMX there is the possibility to select different timebase sources. By default the SysTick is selected. What criteria should be considered to decide which timebase to use ? What is the advantage/disadvantage of the other timebase sources? Is there an effect on precision or on energy consumption.

Are the other timebase options relevant for applications with an RTOS only? Mostly I read that in combination with a RTOS the SysTick is not used for unknown reasons.

Many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

IMHO this is mainly for RTOS use when SysTick is used for the scheduler. Since SysTick is part of the ARM core, it is more portable using it in the RTOS than using a vendor specific peripheral timer. The timer you are specifyfing as time base will be used in HAL for delays and timeouts. So you have two independent interrupt sources avoiding potential deadlocks or interference. SysTick can be disabled but I doubt that you would see any significant power savings when doing so.

see also https://community.st.com/s/question/0D50X0000A4nQxpSQE/when-freertos-is-used-it-is-strongly-recommended-to-use-a-hal-time-base-source-other-than-the-systick-

hth

KnarfB

View solution in original post

2 REPLIES 2
KnarfB
Principal III

IMHO this is mainly for RTOS use when SysTick is used for the scheduler. Since SysTick is part of the ARM core, it is more portable using it in the RTOS than using a vendor specific peripheral timer. The timer you are specifyfing as time base will be used in HAL for delays and timeouts. So you have two independent interrupt sources avoiding potential deadlocks or interference. SysTick can be disabled but I doubt that you would see any significant power savings when doing so.

see also https://community.st.com/s/question/0D50X0000A4nQxpSQE/when-freertos-is-used-it-is-strongly-recommended-to-use-a-hal-time-base-source-other-than-the-systick-

hth

KnarfB

That link is now dead. Any chance you have a backup copy?