cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 tick source

MFawzy
Associate II

Hello,

I'm wondering what is general criteria to set a tick source?

for example I have two different boards NUCLEO-64 based on STM32F411 and STM32F429I-DISC1 and when i tried to generate a project using the STMCubeIDE, the tool used TIM6 as a source of ticks and to override the one exist in the HAL layer for the STM32F429I-DISC1 while it used the one defined by the HAL for the STM32F411.

any idea?

Thanks,

Mohammed

1 REPLY 1
KnarfB
Principal III

You can choose a tick source in STM32CubeIDE/MX, so you cahnge it to your needs. SysTick is pre-selected unless you use an RTOS. Then, SysTick is assigned to RTOS and a timer, TIM6, is assigned as HAL tick source. This is because SysTick is part of the ARM core, whereas the timers are STM specific. Cross-vendor RTOS porting is easier when SysTick is used by the RTOS. HAL wants some timer tick for counting out delays, independent of a RTOS scheduler timer tick. Timers also sit in a peripheral clock domain. This may be important when you plan to change/stop some perpherals to achieve low-power etc..

hth

KnarfB