Why cubeMx recommend I use the timer, not systick, when I config freeRTOS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-03 5: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.
- Labels:
-
FreeRTOS
-
STM32CubeMX
-
SysTick
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-03 6: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.
​
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-03 6: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.
​
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-03 6:28 AM
@Pavel A.​
OK, I got it.
Thank yours.
