AnsweredAssumed Answered

Bug Report: HAL_Init() function Fails to initialize  systick “timer” correctly.

Question asked by Ehsan Nayeri on Sep 26, 2017
Latest reply on Sep 27, 2017 by Imen D

This function which is called at the entry of Main() function(Code generated by cubeMX) can not initialize systick timer to create 1ms time intervals correctly. As a result if functions which are called after HAL_Init() use HAL_GetTick() for delay or wait purposes fail to work as programmer expect.

It is true until SystemClock_Config() function  (which itself trust on HAL_GetTick()  for some initializations wait time)  modify systick timer.


The reason is that for initialization of systick timer HAL_InitTick() function use the value of “SystemCoreClock” variable which is not updated yet.