Ok, after reading the vTaskSuspendAll() page I remembered I couldn’t do that. But I did get some questions:
- If vTaskSuspendAll() suspends the scheduler but not the interrupts, why keep the RTOS ticks pending?
- The behavior of vTaskSuspendAll() I wanted it to wait and exit after a call to vTaskNotifyGiveFromISR() from an interrupt. What I could expect was that an assert would be triggered due to an attempted context switch (caused by ulTaskNotifyTake) with a suspended scheduler. What happens is none of this. Is that correct?
The call to ulTaskNotifyTake() takes place inside a function called from other parts of the code, and for a sequence of events it can happen that this function is called with suspended scheduler. How can I get around the problem?