I have a task that is setup to interface with a flash memory chip for our design. I have a HW interrupt to detect when our products supply voltage is falling. I was planning to use the Task_setPri( task, -1 ) within the low voltage HW interrupt to inactivate the task that is interfacing to our flash memory, that way I prevent subsequent writes to flash when power is being lost.
I have verified that a pended task will stop when set to a priority of -1. I am wondering if a running task will require a scheduler call to stop work if its priority is set to -1 from a HW interrupt? If so, would using a Task_yield() in the running task satisfy the requirement?