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.

Table 11-2. Interrupt Vector Priority Table
Vector

Number

Interrupt

source

Vector

Number

(cont.)

Interrupt

source

(cont.)

0x0Software Interrupt0x2BU1
0x1HLVD (High/Low-Voltage Detect)0x2CU2RX
0x2OSF (Oscillator Fail)0x2DU2TX
0x3CSW (Clock Switching)0x2EU2E
0x4NVM0x2FU2
0x5SCAN0x30I2C1RX
0x6CRC (Cyclic Redundancy Check)0x31I2C1TX
0x7IOC (Interrupt-On-Change)0x32I2C1
0x8INT00x33I2C1E
0x9ADT (ADC Threshold Interrupt)0x34SPI1RX
0xAAD (ADC Conversion Complete)0x35SPI1TX
0xBACT (Active Clock Tuning)0x36SPI1
0xCCLB0 (Configurable Logic Block)0x37-
0xDCLB10x38TU16A (Universal Timer 16A)
0xECLB20x39TU16B (Universal Timer 16B)
0xFCLB30x3ATMR1
0x10CLC1 (Configurable Logic Cell)0x3BTMR1G
0x11CLC20x3CTMR3
0x12CLC30x3DTMR3G
0x13CLC40x3ETMR2
0x14CLC50x3FTMR4
0x15CLC60x40CWG1 (Complementary Waveform Generator)
0x16CLC70x41NCO1 (Numerically Controlled Oscillator)
0x17CLC80x42CCP1
0x18DMA1SCNT (Direct Memory Access)0x43TMR0
0x19DMA1DCNT0x44PWM1R
0x1ADMA1OR0x45PWM1G
0x1BDMA1A0x46PWM2R
0x1CDMA2SCNT0x47PWM2G
0x1DDMA2DCNT0x48CM1 (Comparator)
0x1EDMA2OR0x49CM2
0x1FDMA2A0x4A-0x4F-
0x20DMA3SCNT0x50INT1
0x21DMA3DCNT0x51INT2
0x22DMA3OR0x52-0x57-
0x23DMA3A0x58IOCSR (Interrupt-On-Change Signal Routing Ports)
0x24DMA4SCNT0x59ZCD1 (Zero-Cross Detection)
0x25DMA4DCNT0x5A-
0x26DMA4OR0x5B-
0x27DMA4A0x5CVDDIO2LVDFIF
0x28U1RX0x5DVDDIO2LVDRIF
0x29U1TX0x5EVDDIO2PORFIF
0x2AU1E0x5FVDDIO2PORRIF

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.