內核透過 CONFIG_IRQ_* 這組巨集來安排 64 個外部中斷的優先級,因此必須在 config.h 中把它們逐一補上。編號 60 到 63 這四個中斷是保留的,不需要定義。
// 中斷優先級控制
#define CONFIG_IRQ_SPI_ERROR 7
#define CONFIG_IRQ_DMA1_ERROR 7
#define CONFIG_IRQ_DMA2_ERROR 7
#define CONFIG_IRQ_PPI0_ERROR 7
#define CONFIG_IRQ_PPI1_ERROR 7
#define CONFIG_IRQ_UART_ERROR 7
#define CONFIG_IRQ_RESERVED_ERROR 7
#define CONFIG_IRQ_IMDMA_ERROR 7
#define CONFIG_IRQ_SPORT0_ERROR 7
#define CONFIG_IRQ_SPORT1_ERROR 7
#define CONFIG_IRQ_PLL_WAKEUP 7
#define CONFIG_IRQ_DMA1_WRRD0 8
#define CONFIG_IRQ_DMA1_WRRD1 8
#define CONFIG_IRQ_DMA1_0 8
#define CONFIG_IRQ_DMA1_1 8
#define CONFIG_IRQ_DMA1_2 8
#define CONFIG_IRQ_DMA1_3 8
#define CONFIG_IRQ_DMA1_4 8
#define CONFIG_IRQ_DMA1_5 8
#define CONFIG_IRQ_DMA1_6 8
#define CONFIG_IRQ_DMA1_7 8
#define CONFIG_IRQ_DMA1_8 8
#define CONFIG_IRQ_DMA1_9 8
#define CONFIG_IRQ_DMA1_10 8
#define CONFIG_IRQ_DMA1_11 8
#define CONFIG_IRQ_DMA2_WRRD0 9
#define CONFIG_IRQ_DMA2_WRRD1 9
#define CONFIG_IRQ_DMA2_0 9
#define CONFIG_IRQ_DMA2_1 9
#define CONFIG_IRQ_DMA2_2 9
#define CONFIG_IRQ_DMA2_3 9
#define CONFIG_IRQ_DMA2_4 9
#define CONFIG_IRQ_DMA2_5 9
#define CONFIG_IRQ_DMA2_6 9
#define CONFIG_IRQ_DMA2_7 9
#define CONFIG_IRQ_DMA2_8 9
#define CONFIG_IRQ_DMA2_9 9
#define CONFIG_IRQ_DMA2_10 9
#define CONFIG_IRQ_DMA2_11 9
#define CONFIG_IRQ_TIMER0 10
#define CONFIG_IRQ_TIMER1 10
#define CONFIG_IRQ_TIMER2 10
#define CONFIG_IRQ_TIMER3 10
#define CONFIG_IRQ_TIMER4 10
#define CONFIG_IRQ_TIMER5 10
#define CONFIG_IRQ_TIMER6 10
#define CONFIG_IRQ_TIMER7 10
#define CONFIG_IRQ_TIMER8 10
#define CONFIG_IRQ_TIMER9 10
#define CONFIG_IRQ_TIMER10 10
#define CONFIG_IRQ_TIMER11 10
#define CONFIG_IRQ_PROG0_INTA 11
#define CONFIG_IRQ_PROG1_INTA 11
#define CONFIG_IRQ_PROG2_INTA 11
#define CONFIG_IRQ_PROG0_INTB 11
#define CONFIG_IRQ_PROG1_INTB 11
#define CONFIG_IRQ_PROG2_INTB 11
#define CONFIG_IRQ_IMDMA_WRRD0 12
#define CONFIG_IRQ_IMDMA_WRRD1 12
#define CONFIG_IRQ_WDTIMER 13
從分層可以看出設計意圖:各類錯誤中斷統一壓在 7,兩組 DMA 通道分別佔 8 與 9,十二個計時器共用 10,程式化中斷排 11,IMDMA 為 12,看門狗則給到最高的 13。數值越大代表優先級越高。