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 Interrupt0x40U2RX
0x1HLVD (High/Low-Voltage Detect)0x41U2TX
0x2OSF (Oscillator Fail)0x42U2E
0x3CSW (Clock Switching)0x43U2
0x4TU16A (Universal Timer 16A)0x44TMR5
0x5CLC1 (Configurable Logic Cell)0x45TMR5G
0x6CAN (CAN general)0x46CCP2
0x7IOC (Interrupt-On-Change)0x47SCAN
0x8INT00x48U3RX
0x9ZCD (Zero-Cross Detection)0x49U3TX
0xAAD (ADC Conversion Complete)0x4AU3E
0xBACT (Active Clock Tuning)0x4BU3
0xCCM1 (Comparator)0x4C
0xDSMT1 (Signal Measurement Timer)0x4DCLC4
0xESMT1PRA0x4EPWM4RINT
0xFSMT1PWA0x4FPWM4GINT
0x10ADT/ADCH1 (ADC Context 1)0x50INT2
0x11ADCH2 (ADC Context 2)0x51CLC5
0x12ADCH3 (ADC Context 3)0x52CWG2 (Complementary Waveform Generator)
0x13ADCH4 (ADC Context 4)0x53NCO2
0x14DMA1SCNT (Direct Memory Access)0x54DMA3SCNT
0x15DMA1DCNT0x55DMA3DCNT
0x16DMA1OR0x56DMA3OR
0x17DMA1A0x57DMA3A
0x18SPI1RX (Serial Peripheral Interface)0x58CCP3
0x19SPI1TX0x59CLC6
0x1ASPI10x5ACWG3
0x1BTMR20x5BTMR4
0x1CTMR10x5CDMA4SCNT
0x1DTMR1G0x5DDMA4DCNT
0x1ECCP1 (Capture/Compare/PWM)0x5EDMA4OR
0x1FTMR00x5FDMA4A
0x20U1RX0x60U4RX
0x21U1TX0x61U4TX
0x22U1E0x62U4E
0x23U10x63U4
0x24CANRX (CAN receive)0x64DMA5SCNT
0x25CANTX (CAN transmit)0x65DMA5DCNT
0x26PWM1RINT0x66DMA5OR
0x27PWM1GINT0x67DMA5A
0x28SPI2RX0x68U5RX
0x29SPI2TX0x69U5TX
0x2ASPI20x6AU5E
0x2BTU16B (Universal Timer 16B)0x6BU5
0x2CTMR30x6CDMA6SCNT
0x2DTMR3G0x6DDMA6DCNT
0x2EPWM2RINT0x6EDMA6OR
0x2FPWM2GINT0x6FDMA6A
0x30INT10x70
0x31CLC20x71CLC7
0x32CWG1 (Complementary Waveform Generator)0x72CM2
0x33NCO1 (Numerically Controlled Oscillator)0x73NCO3
0x34DMA2SCNT0x74DMA7SCNT
0x35DMA2DCNT0x75DMA7DCNT
0x36DMA2OR0x76DMA7OR
0x37DMA2A0x77DMA7A
0x38I2C1RX0x78NVM
0x39I2C1TX0x79CLC8
0x3AI2C10x7ACRC (Cyclic Redundancy Check)
0x3BI2C1E0x7BTMR6
0x3C0x7CDMA8SCNT
0x3DCLC30x7DDMA8DCNT
0x3EPWM3RINT0x7EDMA8OR
0x3FPWM3GINT0x7FDMA8A
0x80 - 0x8F

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.