A warning prompted by cubemx when generating code with freertos chosen with timebase as systick. While this message is pretty confusing because the warning message is actually saying that the timebase of HAL driver shall NOT use systick anymore. Systick will be used for freertos. Not the freertos timebase will use the TIMx whichever specified.
Read the generated code you will find:
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
/* USER CODE BEGIN Callback 0 */
/* USER CODE END Callback 0 */
if (htim->Instance == TIM1) {
HAL_IncTick();
}
/* USER CODE BEGIN Callback 1 */
/* USER CODE END Callback 1 */
}
Note that HAL_IncTick() is called by TIMx interrupt callback. Not the SysTick_Handler anymore.
The reason for doing this is that HAL driver needs to call HAL_GetTicks to caculate timeout. If both uses the SysTick interrupt will definitely infulence OS efficiency.
uCOS-III does not have this issue, because
a, uCOS-III has a tick task that will do ticking.
b, the bsp porting replaced the HAL_GetTick function
uint32_t HAL_GetTick (void)
{
CPU_INT32U os_tick_ctr;
#if (OS_VERSION >= 30000u)
OS_ERR os_err;
#endif
#if (OS_VERSION >= 30000u)
os_tick_ctr = OSTimeGet(&os_err);
#else
os_tick_ctr = OSTimeGet();
#endif
return os_tick_ctr;
}