You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
I have searched the issue tracker for a similar issue and not found a similar issue.
General issue report
If 2 cores and mutexes are used, a situation arises where on core 1 the highest priority task (which does not use mutexes) is not executed while a task on core 0 is waiting for a mutex.
Attached is a test project with this problem.
If you run it as is, then the task high _1 will be executed after high _0 is executed, although it is on another core and does not wait for the mutex.
2) if increase the priority of high _1 above high _0 (set 12 instead of 9), then the program execution becomes as expected
3) if transfer the task high _1 with priority 9 to core 0, then the program execution becomes as expected
4) if transfer the task low _1 with priority 1 to core 0, then the program execution becomes as expected
I found out that this happens because of FreeRTOS priority inheritance https://www.freertos.org/Documentation/02-Kernel/02-Kernel-features/02-Queues-mutexes-and-semaphores/04-Mutexes.
With one core system, it is clear why this happens.
But with 2 cores, the principle of multiple cores is violated.
It turns out that while the low-priority task is executed on the first core (and takes mutex), the high-priority one (on first core) is not executed, because the high-priority task on the zero core is waiting for a mutex.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Freertos mutex and task switching 2 cores version
Freertos mutex and task switching 2 cores version (IDFGH-14654)
Feb 15, 2025
Answers checklist.
General issue report
If 2 cores and mutexes are used, a situation arises where on core 1 the highest priority task (which does not use mutexes) is not executed while a task on core 0 is waiting for a mutex.
Attached is a test project with this problem.
If you run it as is, then the task high _1 will be executed after high _0 is executed, although it is on another core and does not wait for the mutex.
2) if increase the priority of high _1 above high _0 (set 12 instead of 9), then the program execution becomes as expected
3) if transfer the task high _1 with priority 9 to core 0, then the program execution becomes as expected
4) if transfer the task low _1 with priority 1 to core 0, then the program execution becomes as expected
mutex_test.zip
I found out that this happens because of FreeRTOS priority inheritance https://www.freertos.org/Documentation/02-Kernel/02-Kernel-features/02-Queues-mutexes-and-semaphores/04-Mutexes.
With one core system, it is clear why this happens.
But with 2 cores, the principle of multiple cores is violated.
It turns out that while the low-priority task is executed on the first core (and takes mutex), the high-priority one (on first core) is not executed, because the high-priority task on the zero core is waiting for a mutex.
The text was updated successfully, but these errors were encountered: