July 21, 2024, 10:22:40 PM

STM32CubeMX - Timebase Source

Started by lim, October 21, 2020, 02:36:22 PM

Previous topic - Next topic


Pardon my ignorance. I experience this problem since the beginning. Whenever, I used the default setting of "SYS Mode and Configuration" which its Timebase Source = SysTick, my problem halts at HAL_Delay().

I read about it is meant for RTOS, but I don't use any RTOS. Also not knowing is the right timer, I chose TIM10.

Anyone has any input on what is the right way to handle this issue, please?


Sharing someone's comments "First of all CubeMX strongly suggests to change hw timer for ST HAL, because Systick is already used by FreeRTOS. I understood the problem is
with interrupt priority: ST HAL needs the highest priority (because
ticks counting must continue during whatever ISR, because some ISR code
could wait for some time... how bad!!!); FreeRTOS needs the lowest
priority (sincerely I couldn't understand why)."

However, one can still use Systick as default timebase, but needs to respect the HAL programming,i.e., do not call HAL time-related, I guess (I am not sure) like, HAL_Delay in any ISR. I have not experimented that myself.