STM32H7xx ThreadX with HAL, bug in HAL_InitTick
function HAL_InitTick() in generated code from STM32Cube IDE does not register the TimeBase_TIM_PeriodElapsedCallback after HAL_TIM_Base_Start(&htim6). it just returns the result if Timer Start.
setting up the callback is done after this but never reached when HAL_TIM_Base_Start() worked fine. As a result, the tick does not count.
if(HAL_TIM_Base_Init(&htim6) == HAL_OK)
{
/* Start the TIM time Base generation in interrupt mode */
return HAL_TIM_Base_Start_IT(&htim6);
}
HAL_TIM_RegisterCallback(&htim6, HAL_TIM_PERIOD_ELAPSED_CB_ID, TimeBase_TIM_PeriodElapsedCallback);
/* Return function status */
return HAL_ERROR;
}Edited to apply source code formatting - please see How to insert source code for future reference.
