Skip to main content
MLa.3
Associate
January 22, 2022
Question

HAL_Init initializes Systick, then SystemClock_Config changes the clock?

  • January 22, 2022
  • 1 reply
  • 1473 views

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?

This topic has been closed for replies.

1 reply

MLa.3
MLa.3Author
Associate
January 22, 2022

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