2023-04-03 05:35 AM
Hi,
The same as the title, I'm confused that why NOT just use systick as the tick of RTOS.
The aim of the systick is for good portability of the RTOS, yes?
Solved! Go to Solution.
2023-04-03 06:03 AM
> The aim of the systick is for good portability of the RTOS, yes?
Yes, FreeRTOS, for one, uses systick as its tick timer. The CubeMX/IDE configurator fully supports this and lets the RTOS manage the systick.
But the "HAL" library also needs a tick timer, by default it is the systick as the simplest choice. When the user's project contains a RTOS, the Cube advises to use a different timer for the "HAL" library.
Can these two timers be merged together? Sometimes yes, but generally no.
If you don't use the HAL library at all, there is no need for a separate timer for it and the whole issue disappears.
2023-04-03 06:03 AM
> The aim of the systick is for good portability of the RTOS, yes?
Yes, FreeRTOS, for one, uses systick as its tick timer. The CubeMX/IDE configurator fully supports this and lets the RTOS manage the systick.
But the "HAL" library also needs a tick timer, by default it is the systick as the simplest choice. When the user's project contains a RTOS, the Cube advises to use a different timer for the "HAL" library.
Can these two timers be merged together? Sometimes yes, but generally no.
If you don't use the HAL library at all, there is no need for a separate timer for it and the whole issue disappears.
2023-04-03 06:28 AM
@Pavel A.
OK, I got it.
Thank yours.