FreeRTOS how to manage multiple tasks
Posted: Fri Sep 03, 2021 11:21 am
Hello. I would like some advice for my project regarding managing multiple tasks. What is generally the best method to handle multiple tasks? In my project, I am going to have multiple tasks for example BLE task, WiFi task, Controller task, Serial_communication task and more.. Within the controller_task I am going to have some smaller tasks. For example my controller can run in multiple modes ( mode1, mode2, mode3). For each mode, I am planning to create a seperate task because it seems like a good idea.
I am now concerned about how to properly handling creating task, deleting tasks, stopping task and etc. Should I create a seperate task "Task_handler_task" which would run in the background and would be responsible for controlling the required tasks. For example when controller mode is changed, I must delete or stop the previous task and start the new task. Also, when BLE_task is going, I must ensure that wifi task is stopped because I think its problematic to have both running at once. Please give any general tips regarding FreeRTOS
I am now concerned about how to properly handling creating task, deleting tasks, stopping task and etc. Should I create a seperate task "Task_handler_task" which would run in the background and would be responsible for controlling the required tasks. For example when controller mode is changed, I must delete or stop the previous task and start the new task. Also, when BLE_task is going, I must ensure that wifi task is stopped because I think its problematic to have both running at once. Please give any general tips regarding FreeRTOS