This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Question about application of PendSV

Reading jyiu book on Cortex-M4 and general information about usage of PendSV exception type.

One application highlighted is of context switching in the RTOS wherein on a Systick timer interrupt, instead of context switching, it will set the PendSV bit. This will then execute the context switching at the lowest priority after all other interrupts have been handled. Again this is because the priority of PendSV will be kept the lowest.

However, is the same not possible if we just lower down the priority of Systick timer exception? In that case, if any interrupt is active, the systick timer exception handler will get executed after all other interrupts are done with.

If that is possible, then what is the major benefit in using PendSV?

Am I missing something?