cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_Init initializes Systick, then SystemClock_Config changes the clock?

MLa.3
Associate II

In the cubeMX default code the order is:

HAL_Init(); and then SystemClock_Config();

HAL_Init() sets up the Systick Timer with HAL_InitTick().

Afterwards SystemClock_Config changes the Clock setup (to HSE in my case), but HAL_InitTick() is not called again. Does this not mean that the 1ms SysTick will not be 1ms because it was set up with the wrong frequency?

1 REPLY 1
MLa.3
Associate II

Solved, HAL_InitTick() ist called at the end of HAL_RCC_ClockConfig.