Hi All,
I am working on multiple tasks, i have around 6 tasks and would like to implement round robbin scheduling as follows.
task1 is at priority 6 and task2 to task 6 are at 5.
here is what i have done till now in brief. Each task is created after esp32 recieves the IP. Each tasks has log at the start that shows it is created. Each task also has a log inside there loop that shows whether it running or not.
I have enabled configUSE_TIME_SLICING to 1 in FreeRTOSConfig.h, as per my understanding this enables round robbin scheduling.
But somehow only task 1(Highest priority) and task 2, and task 3 are running. whereas task2 to task6 should run in round robbin.
Could someone let me know whether this is right and also is there any other way to schedule them.
Thank you
Paul
freeRTOS scheduling on esp32
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: freeRTOS scheduling on esp32
Fyi, timeslicing already is on in FreeRTOS (if it's not defined, it defaults to 1). How do you create your tasks exactly?
Re: freeRTOS scheduling on esp32
Hi ,
After i get ip, i have tasks creator function to create all tasks with a delay of 50 ticks between each creation.
I am not pinning the tasks to any core.
Thanks
Paul
After i get ip, i have tasks creator function to create all tasks with a delay of 50 ticks between each creation.
I am not pinning the tasks to any core.
Thanks
Paul
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: freeRTOS scheduling on esp32
Can you share your code so we can try to reproduce this?
-
- Posts: 2
- Joined: Tue Jan 17, 2017 8:16 pm
Re: freeRTOS scheduling on esp32
If you are not sure how the scheduler selects which task to execute then I would recommend reading the first few chapters of the book that can be downloaded from here.
Re: freeRTOS scheduling on esp32
Hi All,
I am able to schedule now properly.
previously a created task acquired a mutex and then got deleted without giving away the mutex back. The same mutex has to be acquired before creating additional tasks. hence sometimes the tasks were created and sometimes not.
Thank you
Paul
I am able to schedule now properly.
previously a created task acquired a mutex and then got deleted without giving away the mutex back. The same mutex has to be acquired before creating additional tasks. hence sometimes the tasks were created and sometimes not.
Thank you
Paul
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: freeRTOS scheduling on esp32
Glad you got it solved!
Who is online
Users browsing this forum: No registered users and 127 guests