Tool/software:
On a C2000 device with a C28x core, the Peripheral Interrupt Expansion (PIE/ePIE) Module inherently allow for nesting of interrupts. By default, the CPU will service each interrupt to completion without breaking out of an ISR even if a higher priority interrupt gets flagged during its execution. Once the CPU finishes executing an ISR, it will then service the highest priority interrupt (according to the location in the PIE table) that is both flagged and enabled. In the PIE table, interrupts with the lowest-numbered channel in the lowest-numbered group have the highest priority.
There two scenarios where nesting would be necessary in an application.
- Simple Nesting - Highest priority interrupts need to be branched to even if the CPU is already servicing another interrupt
- Changing Priority - The application needs to change the priority order of two (or more) interrupts from what is set in the PIE table
How is interrupt nesting implemented in software for each of the scenarios and interrupt use cases?