11.4.2 Natural Order (Hardware) Priority
When vectored interrupts are enabled and more than one interrupt with the same user specified priority level is requested, the priority conflict is resolved by using a method called “Natural Order Priority”. Natural order priority is a fixed priority scheme that is based on the IVT.
| Vector Number | Interrupt source | Vector Number (cont.) | Interrupt source (cont.) |
|---|---|---|---|
| 0x0 | Software Interrupt | 0x2B | U1 |
| 0x1 | HLVD (High/Low-Voltage Detect) | 0x2C | U2RX |
| 0x2 | OSF (Oscillator Fail) | 0x2D | U2TX |
| 0x3 | CSW (Clock Switching) | 0x2E | U2E |
| 0x4 | NVM | 0x2F | U2 |
| 0x5 | SCAN | 0x30 | I2C1RX |
| 0x6 | CRC (Cyclic Redundancy Check) | 0x31 | I2C1TX |
| 0x7 | IOC (Interrupt-On-Change) | 0x32 | I2C1 |
| 0x8 | INT0 | 0x33 | I2C1E |
| 0x9 | ADT (ADC Threshold Interrupt) | 0x34 | SPI1RX |
| 0xA | AD (ADC Conversion Complete) | 0x35 | SPI1TX |
| 0xB | ACT (Active Clock Tuning) | 0x36 | SPI1 |
| 0xC | CLB0 (Configurable Logic Block) | 0x37 | - |
| 0xD | CLB1 | 0x38 | TU16A (Universal Timer 16A) |
| 0xE | CLB2 | 0x39 | TU16B (Universal Timer 16B) |
| 0xF | CLB3 | 0x3A | TMR1 |
| 0x10 | CLC1 (Configurable Logic Cell) | 0x3B | TMR1G |
| 0x11 | CLC2 | 0x3C | TMR3 |
| 0x12 | CLC3 | 0x3D | TMR3G |
| 0x13 | CLC4 | 0x3E | TMR2 |
| 0x14 | CLC5 | 0x3F | TMR4 |
| 0x15 | CLC6 | 0x40 | CWG1 (Complementary Waveform Generator) |
| 0x16 | CLC7 | 0x41 | NCO1 (Numerically Controlled Oscillator) |
| 0x17 | CLC8 | 0x42 | CCP1 |
| 0x18 | DMA1SCNT (Direct Memory Access) | 0x43 | TMR0 |
| 0x19 | DMA1DCNT | 0x44 | PWM1R |
| 0x1A | DMA1OR | 0x45 | PWM1G |
| 0x1B | DMA1A | 0x46 | PWM2R |
| 0x1C | DMA2SCNT | 0x47 | PWM2G |
| 0x1D | DMA2DCNT | 0x48 | CM1 (Comparator) |
| 0x1E | DMA2OR | 0x49 | CM2 |
| 0x1F | DMA2A | 0x4A-0x4F | - |
| 0x20 | DMA3SCNT | 0x50 | INT1 |
| 0x21 | DMA3DCNT | 0x51 | INT2 |
| 0x22 | DMA3OR | 0x52-0x57 | - |
| 0x23 | DMA3A | 0x58 | IOCSR (Interrupt-On-Change Signal Routing Ports) |
| 0x24 | DMA4SCNT | 0x59 | ZCD1 (Zero-Cross Detection) |
| 0x25 | DMA4DCNT | 0x5A | - |
| 0x26 | DMA4OR | 0x5B | - |
| 0x27 | DMA4A | 0x5C | VDDIO2LVDFIF |
| 0x28 | U1RX | 0x5D | VDDIO2LVDRIF |
| 0x29 | U1TX | 0x5E | VDDIO2PORFIF |
| 0x2A | U1E | 0x5F | VDDIO2PORRIF |
The natural order priority scheme goes from high-to-low with increasing vector numbers, with 0 being the highest priority and decreasing from there.
For example, when two concurrently occurring interrupt sources that are both designated high priority, using the IPRx register will be resolved using the natural order priority (i.e., the interrupt with a lower corresponding vector number will preempt the interrupt with the higher vector number).
The ability for the user to assign every interrupt source to high- or low-priority levels means that the user program can give an interrupt with a low natural priority, a higher overall priority level.
