Using multiple tasks in FreeRTOS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-02-05 1:12 PM
I am having a strange problem with FreeRTOS in CubeMX, I cannot get multiple tasks to work concurrently. I use the following procedure -
Pre: Check STM32Cube_FW is fresh (v1.9.0 used)
- Open STM32Cube V1.0 (v5.0.0 used)
- New Project -> 'Access To MCU Selector'
- MCU -> 'STM32F091RC' -> 'Start Project' (sel STM32F091RCTx)
- SYS: Timebase Source - TIM17
- FreeRTOS: Enabled
- Add Task: myTask02 with defaults
- Generate Code
For the example above myTask02 fires but the defaultTask does not, what am I missing to get both working? This has always worked for me before, what is wrong now?
Solved! Go to Solution.
- Labels:
-
FreeRTOS
-
STM32CubeMX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-02-05 1:43 PM
Solved it, sharing response if useful for others. In the example listed above all task timing is aligned, e.g. StartDefaultTask() & StartTask02() look like this -
void taskExample(void const * argument) {
for(;;) {
osDelay(1);
}
}
So they clobber each other. Solution? Introduce timing offsets, e.g. change the osDelay() value for each task. Done!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-02-05 1:43 PM
Solved it, sharing response if useful for others. In the example listed above all task timing is aligned, e.g. StartDefaultTask() & StartTask02() look like this -
void taskExample(void const * argument) {
for(;;) {
osDelay(1);
}
}
So they clobber each other. Solution? Introduce timing offsets, e.g. change the osDelay() value for each task. Done!
