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?
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.
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?
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.