I need to stop task execution until event occurs. I detect this event in ISR. May I use vTaskSuspend(0) to suspend task and resume it later with vTaskResume() call from ISR. I’ve tried both cooperative and preemption modes, in both cases I’ve got similar results - the task does not work properly after resuming (in some cases stack is corrupted, other unexpected behaviour is also detected).
Before I dig in my code with bug search, I’d like to know is it legal to call vTaskResume from ISR. From what I saw in sources, it should be, but I didn’t found explicit statement which confirms this.