Critical Nesting issue in SMP port

Hello Team,

In my project I am using FreeRTOS with SMP port which we have developed for MPC5777 Power PC micro controller.

Recently we started using Freertos MUTEXes for IPC and after this we have got issue with task preemption.

When we use preemption feature with configUSE_PREEMPTION 1 code hits this assert configASSERT( pxCurrentTCB->uxCriticalNesting == 0 ); from tasks.c and halts the execution of the code. If we run the debug session again it runs for sometime and again hits this assert and halts.

This issue is not seen if we disable the preemption feature by making configUSE_PREEMPTION to 0.

Could you please some inputs on what is causing this issue.

Thank you very much in advance!!

Best regards,

I do not see this assert in tasks.c - FreeRTOS-Kernel/tasks.c at main · FreeRTOS/FreeRTOS-Kernel · GitHub. Which version of the code are you using? Can you try the latest version and let us know if you still see the issue?