Describe the bug
Assume a Multicore System using the SMP Version of FreeRTOS.
Whenever a Tasks calls xQueueSend (xQueueGenericSend) the scheduler gets suspended for a brief moment (vTaskSuspendAll). This results in the variable uxSchedulerSuspended to be incremented.
Now, the second core might execute another Tasks that calls vTaskDelay which in turn calls vTasksSuspendAll (which increments uxSchedulerSuspended). The check afterwards configASSERT( uxSchedulerSuspended == 1U );` will fail in that scenario.
Target
Development board: TrenzElectronic MPSoC Development Board mit AMD Zynq™ UltraScale+™ ZU2 und 1 GB LPDDR4
Instruction Set Architecture: ARMv8A
IDE and version: Vitis IDE
Toolchain and version: gcc
FreeRTOS Kernel V11.1.0 / FullDemo
Host
Host OS: Windows
Version: 10
To Reproduce
see description
Expected behavior
This check should only be valid for non SMP configurations.
Additional context
Stack Trace:
APU
Cortex-A53 #0 (External Debug Request), EL3(S)/A64
0x00000000ffff2048 GateSmp_tryLock(): portASM.S, line 473
0x000000000004b3a8 vPortRecursiveLock(): port.c, line 229
0x0000000000048714 vTaskEnterCritical(): tasks.c, line 6966
0x00000000000428f0 xQueueGenericSend(): queue.c, line 1108
0x000000000004ca94 prvTestAbortingQueueSend(): AbortDelay.c, line 621
0x000000000004c40c prvBlockingTask(): AbortDelay.c, line 257
0x0000000000000000
Cortex-A53 #1 (External Debug Request), EL3(S)/A64
0x000000000004abf0 vMainAssertCalled(): main.c, line 261
0x00000000000456fc vTaskDelay(): tasks.c, line 2446
0x00000000000508c4 prvTest6_CheckAutoReloadResetBehaviour(): TimerDemo.c, line 598
0x000000000004fd24 prvTimerTestTask(): TimerDemo.c, line 214
0x0000000000000000
vTaskSuspendAll acquires task lock here, so the 2nd task running on other core cannot pass this point and increment uxSchedulerSuspended until the task lock is released in xTaskResumeAllhere.
Describe the bug Assume a Multicore System using the SMP Version of FreeRTOS. Whenever a Tasks calls xQueueSend (xQueueGenericSend) the scheduler gets suspended for a brief moment (vTaskSuspendAll). This results in the variable uxSchedulerSuspended to be incremented. Now, the second core might execute another Tasks that calls vTaskDelay which in turn calls vTasksSuspendAll (which increments uxSchedulerSuspended). The check afterwards
configASSERT(
uxSchedulerSuspended == 1U );` will fail in that scenario.Target
Host
To Reproduce see description
Expected behavior This check should only be valid for non SMP configurations.
Additional context
Stack Trace: