[Thread] vTaskResume after vTaskSuspendAll

For help: my usage is like this: task1 { vTaskSuspendAll(); vTaskResume(task2); } task2 { xSemaphoreTake();
xSemaphoreGive();
} but I got an assert in xSemaphoreTake(); configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); I check the code, and find that vTaskResume() will not resume the scheduler, so does it design like this, only vTaskResumeAll will resume the scheduler? Thanks

[Thread] vTaskResume after vTaskSuspendAll

vTaskSuspendAll() doesn’t suspend each task individual, but disable the scheduler, it is a form of a ‘Critical Section’ that doesn’t affect the interrupts, and thus can use a bit more time with less issues than the critical sections that disable interrrupts.

[Thread] vTaskResume after vTaskSuspendAll

Thanks, and may I ask another question? If I suspend all task , and then vTaskResume one task, will this task run or keep suspended until vTaskResumeAll?

[Thread] vTaskResume after vTaskSuspendAll

Thanks, and may I ask another question? If I suspend all task , and then vTaskResume one task, will this task run or keep suspended until vTaskResumeAll?
vTaskSuspendAll() suspends the scheduler, so you need to call xTaskResumeAll() to unsuspend the scheduler. vTaskResume() will not make a task run if the scheduler is suspended, and you should not make FreeRTOS API calls when the scheduler is suspended.

[Thread] vTaskResume after vTaskSuspendAll

Thanks for your answer.