@sunnycase said in FreeRTOS SDK uxCriticalNesting[uxPsrId] == ~0UL Error: @loboris According to ISO/IEC 9899:1999 Program termination If the return type of the main function is a type compatible with int, a return from the initial call to the main function is equivalent to calling the exit function with the value returned by the main function as its argument;10)reaching the } that terminates the main function returns a value of 0. If the return type is not compatible with int, the termination status returned to the host environment is unspecified. If you return from main, the program calls exit and terminates. You should not rely on the FreeRTOS SDK implementation details to assume the rest of the tasks will contiune to run. @sunnycase thanks for the clarification. Currently, I'm still running a loop at the end of main() with a vTaskDelay() to yield to other tasks inside the loop. But what I am seeing now after updating to the latest toolchain and develop branch of Kendryte-FreeRTOS-SDK is improved behavior where I can now successfully run wifi_init() task that then terminates correctly after initializing WiFi. But a subsequent call to vTaskCreate() to run MQTT task fails with uxCriticalNesting[uxPsrId] == ~0UL.