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?
Thank you Chris. That is good explanation. Basically since Systick can be used for other purpose as well in addition to the context switching, it makes sense not to disturb the execution times of those things done in Systick.