Interrupt Controller
Introduction
The interrupt controller is responsible for centrally managing interrupt requests from peripherals and internal modules, routing them to the corresponding CPU, and coordinating priority arbitration to ensure that the real-time system can reliably respond to events.
The chip series covers a variety of heterogeneous multi-core designs. Each model integrates one or more processor cores from the following architectures based on specific requirements. Each architecture possesses its own interrupt management system, and each CPU utilizes an interrupt controller compatible with its respective architecture.
ARM Cortex-M: Nested Vectored Interrupt Controller (NVIC)
ARM Cortex-A: Generic Interrupt Controller (GIC)
Xtensa HiFi 5 DSP: DSP Interrupt Controller
The following table illustrates the mapping between each CPU and its corresponding interrupt controller.
Processor |
Interrupt Controller Type |
|---|---|
KM4 |
|
KM0 |
Processor |
Interrupt Controller Type |
|---|---|
KM4 |
|
KR4 |
Processor |
Interrupt Controller Type |
|---|---|
KM4 |
|
KR4 |
Processor |
Interrupt Controller Type |
|---|---|
KM4 |
|
KR4 |
|
DSP |
Processor |
Interrupt Controller Type |
|---|---|
KM4 |
|
KR4 |
|
DSP |
Processor |
Interrupt Controller Type |
|---|---|
CA32 |
|
KM4 |
|
KM0 |
Processor |
Interrupt Controller Type |
|---|---|
KM4TZ |
|
KM4NS |
Interrupt Index List
The following table shows the interrupt sources and interrupt index assignments for each CPU. When writing an interrupt service routine, look up the corresponding interrupt index for the target CPU to register it.
Note
An empty cell indicates that the interrupt does not exist for that CPU.
Function |
KM0 Index |
KM4 Index |
|---|---|---|
WIFI_FISR_FESR_IRQ |
0 |
0 |
WIFI_FTSR_MAILBOX |
1 |
1 |
WL_DMA |
2 |
2 |
WL_PROTOCOL |
3 |
3 |
BT_SCB |
4 |
4 |
SYS_ILLEGAL_WRITE |
5 |
|
KM4_WAKE_IRQ |
5 |
|
BT_WAKE_HOST |
6 |
6 |
RXI300 |
7 |
7 |
IPC_KM0 |
8 |
|
IPC_KM4 |
8 |
|
IWDG |
9 |
9 |
Timer0 |
10 |
10 |
Timer1 |
11 |
11 |
Timer2 |
12 |
12 |
Timer3 |
13 |
13 |
Timer4 |
14 |
14 |
Timer5 |
15 |
15 |
Timer6 |
16 |
16 |
Timer7 |
17 |
17 |
Timer8 |
18 |
18 |
Timer9 |
19 |
19 |
Timer10 |
20 |
20 |
Timer11 |
21 |
21 |
pmc_timer0 |
22 |
22 |
pmc_timer1 |
23 |
23 |
UART0 |
24 |
24 |
UART1 |
25 |
25 |
UART2_BT |
26 |
26 |
UART_LOG |
27 |
|
UART_LOG |
27 |
|
UART_LOG |
||
GPIOA |
28 |
28 |
GPIOB |
29 |
29 |
I2C0 |
30 |
30 |
I2C1 |
31 |
31 |
CTOUCH |
32 |
32 |
GDMA0_Channel0 |
33 |
33 |
GDMA0_Channel1 |
34 |
34 |
GDMA0_Channel2 |
35 |
35 |
GDMA0_Channel3 |
36 |
36 |
GDMA0_Channel4 |
37 |
37 |
GDMA0_Channel5 |
38 |
38 |
GDMA0_Channel6 |
39 |
39 |
GDMA0_Channel7 |
40 |
40 |
PPE |
41 |
41 |
SPI0 |
42 |
42 |
SPI1 |
43 |
43 |
SPORT0 |
44 |
44 |
SPORT1 |
45 |
45 |
RTC |
46 |
46 |
ADC |
47 |
47 |
ADC_COMP |
48 |
48 |
BOR |
49 |
49 |
PWR_DOWN |
50 |
50 |
SPI_FLASH |
51 |
51 |
Keyscan |
52 |
52 |
RSIP |
53 |
53 |
AES |
54 |
54 |
SHA |
55 |
55 |
PSRAMC |
56 |
56 |
TRNG |
57 |
57 |
AES_S |
58 |
58 |
SHA_S |
59 |
59 |
AON_TIM |
60 |
60 |
AON_WAKEPIN |
61 |
61 |
LEDC |
62 |
62 |
IR |
63 |
63 |
SDIO |
64 |
64 |
KM0_WDG |
65 |
|
KM4_NS_WDG |
65 |
|
KM4_S_WDG |
66 |
|
QSPI_INT |
67 |
|
USB_INT |
66 |
68 |
OCP_INT |
69 |
Function |
KR4 Index |
KM4 Index |
|---|---|---|
WIFI_FISR_FESR_IRQ |
0 |
0 |
WIFI_FTSR_MAILBOX |
1 |
1 |
WL_DMA |
2 |
2 |
WL_PROTOCOL |
3 |
3 |
BT_SCB |
4 |
4 |
NP_WAKE_IRQ |
5 |
5 |
DSP_WAKE_IRQ |
6 |
6 |
BT_WAKE_HOST |
7 |
7 |
RXI300 |
8 |
8 |
SYS_ILLEGAL_WRITE |
9 |
9 |
IPC_KR4 |
10 |
|
IPC_KM4 |
10 |
|
IPC_DSP |
||
IWDG |
11 |
11 |
KM4_NS_WDG_RST |
12 |
|
KM4_NS_WDG |
12 |
|
KM4_S_WDG_RST |
13 |
|
KM4_S_WDG |
13 |
|
KR4_WDG_RST |
14 |
|
KR4_WDG |
14 |
|
DSP_WDG_RST |
15 |
15 |
DSP_WDG |
||
Timer0 |
16 |
16 |
Timer1 |
17 |
17 |
Timer2 |
18 |
18 |
Timer3 |
19 |
19 |
Timer4 |
20 |
20 |
Timer5 |
21 |
21 |
Timer6 |
22 |
22 |
Timer7 |
23 |
23 |
Timer8 |
24 |
24 |
Timer9 |
25 |
25 |
Timer10 |
26 |
26 |
Timer11 |
27 |
27 |
Timer12 |
28 |
28 |
Timer13 |
29 |
29 |
Timer14 |
30 |
30 |
UART0 |
31 |
31 |
UART1 |
32 |
32 |
UART2 |
33 |
33 |
UART3_BT |
34 |
34 |
UART_LOG |
35 |
35 |
GPIOA |
36 |
36 |
GPIOB |
37 |
37 |
I2C0 |
38 |
38 |
I2C1 |
39 |
39 |
CTOUCH |
40 |
40 |
GDMA0_Channel0 |
41 |
41 |
GDMA0_Channel1 |
42 |
42 |
GDMA0_Channel2 |
43 |
43 |
GDMA0_Channel3 |
44 |
44 |
GDMA0_Channel4 |
45 |
45 |
GDMA0_Channel5 |
46 |
46 |
GDMA0_Channel6 |
47 |
47 |
GDMA0_Channel7 |
48 |
48 |
SPI0 |
49 |
49 |
SPI1 |
50 |
50 |
SPORT0 |
51 |
51 |
SPORT1 |
52 |
52 |
RTC |
53 |
53 |
ADC |
54 |
54 |
ADC_COMP |
55 |
55 |
BOR |
56 |
56 |
PWR_DOWN |
57 |
57 |
SPI_FLASH |
58 |
58 |
Thermal |
59 |
59 |
RSIP |
60 |
60 |
AES |
61 |
61 |
SHA |
62 |
62 |
ECDSA |
63 |
63 |
PSRAMC |
64 |
64 |
TRNG |
65 |
65 |
LEDC |
66 |
66 |
AES_S |
67 |
67 |
SHA_S |
68 |
68 |
AON_TIM |
69 |
69 |
AON_WAKEPIN |
70 |
70 |
DSP_ERROR |
71 |
71 |
DSP_FATAL_ERROR |
72 |
72 |
VAD |
73 |
73 |
Zigbee |
74 |
74 |
DSP_NMI |
Function |
KR4 Index |
KM4 Index |
|---|---|---|
WIFI_FISR_FESR_IRQ |
0 |
0 |
WIFI_FTSR_MAILBOX |
1 |
1 |
WL_DMA |
2 |
2 |
WL_PROTOCOL |
3 |
3 |
BT_SCB |
4 |
4 |
NP_WAKE_IRQ |
5 |
5 |
DSP_WAKE_IRQ |
6 |
6 |
BT_WAKE_HOST |
7 |
7 |
RXI300 |
8 |
8 |
SYS_ILLEGAL_WRITE |
9 |
9 |
IPC_KR4 |
10 |
|
IPC_KM4 |
10 |
|
IPC_DSP |
||
IWDG |
11 |
11 |
KM4_NS_WDG_RST |
12 |
|
KM4_NS_WDG |
12 |
|
KM4_S_WDG_RST |
13 |
|
KM4_S_WDG |
13 |
|
KR4_WDG_RST |
14 |
|
KR4_WDG |
14 |
|
DSP_WDG_RST |
15 |
15 |
DSP_WDG |
||
Timer0 |
16 |
16 |
Timer1 |
17 |
17 |
Timer2 |
18 |
18 |
Timer3 |
19 |
19 |
Timer4 |
20 |
20 |
Timer5 |
21 |
21 |
Timer6 |
22 |
22 |
Timer7 |
23 |
23 |
Timer8 |
24 |
24 |
Timer9 |
25 |
25 |
Timer10 |
26 |
26 |
Timer11 |
27 |
27 |
Timer12 |
28 |
28 |
Timer13 |
29 |
29 |
Timer14 |
30 |
30 |
UART0 |
31 |
31 |
UART1 |
32 |
32 |
UART2 |
33 |
33 |
UART3_BT |
34 |
34 |
UART_LOG |
35 |
35 |
GPIOA |
36 |
36 |
GPIOB |
37 |
37 |
I2C0 |
38 |
38 |
I2C1 |
39 |
39 |
CTOUCH |
40 |
40 |
GDMA0_Channel0 |
41 |
41 |
GDMA0_Channel1 |
42 |
42 |
GDMA0_Channel2 |
43 |
43 |
GDMA0_Channel3 |
44 |
44 |
GDMA0_Channel4 |
45 |
45 |
GDMA0_Channel5 |
46 |
46 |
GDMA0_Channel6 |
47 |
47 |
GDMA0_Channel7 |
48 |
48 |
SPI0 |
49 |
49 |
SPI1 |
50 |
50 |
SPORT0 |
51 |
51 |
SPORT1 |
52 |
52 |
RTC |
53 |
53 |
ADC |
54 |
54 |
ADC_COMP |
55 |
55 |
BOR |
56 |
56 |
PWR_DOWN |
57 |
57 |
SPI_FLASH |
58 |
58 |
Thermal |
59 |
59 |
RSIP |
60 |
60 |
AES |
61 |
61 |
SHA |
62 |
62 |
ECDSA |
63 |
63 |
PSRAMC |
64 |
64 |
TRNG |
65 |
65 |
LEDC |
66 |
66 |
AES_S |
67 |
67 |
SHA_S |
68 |
68 |
AON_TIM |
69 |
69 |
AON_WAKEPIN |
70 |
70 |
DSP_ERROR |
71 |
71 |
DSP_FATAL_ERROR |
72 |
72 |
VAD |
73 |
73 |
Zigbee |
74 |
74 |
DSP_NMI |
Function |
KR4 Index |
KM4 Index |
DSP Index |
DSP_INT_LEVEL |
|---|---|---|---|---|
WIFI_FISR_FESR_IRQ |
0 |
0 |
||
WIFI_FTSR_MAILBOX |
1 |
1 |
||
WL_DMA |
2 |
2 |
9 |
1 |
WL_PROTOCOL |
3 |
3 |
||
BT_SCB |
4 |
4 |
||
NP_WAKE_IRQ |
5 |
5 |
||
DSP_WAKE_IRQ |
6 |
6 |
||
BT_WAKE_HOST |
7 |
7 |
||
RXI300 |
8 |
8 |
||
SYS_ILLEGAL_WRITE |
9 |
9 |
||
IPC_KR4 |
10 |
|||
IPC_KM4 |
10 |
|||
IPC_DSP |
7 |
2 |
||
IWDG |
11 |
11 |
||
KM4_NS_WDG_RST |
12 |
|||
KM4_NS_WDG |
12 |
|||
KM4_S_WDG_RST |
13 |
|||
KM4_S_WDG |
13 |
|||
KR4_WDG_RST |
14 |
|||
KR4_WDG |
14 |
|||
DSP_WDG_RST |
15 |
15 |
||
DSP_WDG |
8 |
4 |
||
Timer0 |
16 |
16 |
||
Timer1 |
17 |
17 |
||
Timer2 |
18 |
18 |
||
Timer3 |
19 |
19 |
||
Timer4 |
20 |
20 |
||
Timer5 |
21 |
21 |
||
Timer6 |
22 |
22 |
||
Timer7 |
23 |
23 |
10 |
1 |
Timer8 |
24 |
24 |
||
Timer9 |
25 |
25 |
||
Timer10 |
26 |
26 |
11 |
2 |
Timer11 |
27 |
27 |
12 |
2 |
Timer12 |
28 |
28 |
13 |
2 |
Timer13 |
29 |
29 |
14 |
3 |
Timer14 |
30 |
30 |
15 |
3 |
UART0 |
31 |
31 |
||
UART1 |
32 |
32 |
||
UART2 |
33 |
33 |
||
UART3_BT |
34 |
34 |
||
UART_LOG |
35 |
35 |
||
GPIOA |
36 |
36 |
16 |
1 |
GPIOB |
37 |
37 |
17 |
2 |
I2C0 |
38 |
38 |
||
I2C1 |
39 |
39 |
||
CTOUCH |
40 |
40 |
18 |
1 |
GDMA0_Channel0 |
41 |
41 |
19 |
4 |
GDMA0_Channel1 |
42 |
42 |
20 |
4 |
GDMA0_Channel2 |
43 |
43 |
21 |
1 |
GDMA0_Channel3 |
44 |
44 |
22 |
1 |
GDMA0_Channel4 |
45 |
45 |
||
GDMA0_Channel5 |
46 |
46 |
||
GDMA0_Channel6 |
47 |
47 |
||
GDMA0_Channel7 |
48 |
48 |
||
SPI0 |
49 |
49 |
||
SPI1 |
50 |
50 |
||
SPORT0 |
51 |
51 |
23 |
3 |
SPORT1 |
52 |
52 |
24 |
3 |
RTC |
53 |
53 |
||
ADC |
54 |
54 |
||
ADC_COMP |
55 |
55 |
||
BOR |
56 |
56 |
||
PWR_DOWN |
57 |
57 |
||
SPI_FLASH |
58 |
58 |
||
Thermal |
59 |
59 |
||
RSIP |
60 |
60 |
||
AES |
61 |
61 |
||
SHA |
62 |
62 |
||
ECDSA |
63 |
63 |
||
PSRAMC |
64 |
64 |
||
TRNG |
65 |
65 |
||
LEDC |
66 |
66 |
||
AES_S |
67 |
67 |
||
SHA_S |
68 |
68 |
||
AON_TIM |
69 |
69 |
||
AON_WAKEPIN |
70 |
70 |
||
DSP_ERROR |
71 |
71 |
||
DSP_FATAL_ERROR |
72 |
72 |
||
VAD |
73 |
73 |
25 |
3 |
Zigbee |
74 |
74 |
26 |
4 |
DSP_NMI |
28 |
Note
DSP_INT_LEVEL indicates the interrupt priority of each function in the DSP. The interrupt priorities are fixed in hardware and cannot be modified.
Function |
KR4 Index |
KM4 Index |
DSP Index |
DSP_INT_LEVEL |
|---|---|---|---|---|
WIFI_FISR_FESR_IRQ |
0 |
0 |
||
WIFI_FTSR_MAILBOX |
1 |
1 |
||
WL_DMA |
2 |
2 |
9 |
1 |
WL_PROTOCOL |
3 |
3 |
||
BT_SCB |
4 |
4 |
||
NP_WAKE_IRQ |
5 |
5 |
||
DSP_WAKE_IRQ |
6 |
6 |
||
BT_WAKE_HOST |
7 |
7 |
||
RXI300 |
8 |
8 |
||
SYS_ILLEGAL_WRITE |
9 |
9 |
||
IPC_KR4 |
10 |
|||
IPC_KM4 |
10 |
|||
IPC_DSP |
7 |
2 |
||
IWDG |
11 |
11 |
||
KM4_NS_WDG_RST |
12 |
|||
KM4_NS_WDG |
12 |
|||
KM4_S_WDG_RST |
13 |
|||
KM4_S_WDG |
13 |
|||
KR4_WDG_RST |
14 |
|||
KR4_WDG |
14 |
|||
DSP_WDG_RST |
15 |
15 |
||
DSP_WDG |
8 |
4 |
||
Timer0 |
16 |
16 |
||
Timer1 |
17 |
17 |
||
Timer2 |
18 |
18 |
||
Timer3 |
19 |
19 |
||
Timer4 |
20 |
20 |
||
Timer5 |
21 |
21 |
||
Timer6 |
22 |
22 |
||
Timer7 |
23 |
23 |
10 |
1 |
Timer8 |
24 |
24 |
||
Timer9 |
25 |
25 |
||
Timer10 |
26 |
26 |
11 |
2 |
Timer11 |
27 |
27 |
12 |
2 |
Timer12 |
28 |
28 |
13 |
2 |
Timer13 |
29 |
29 |
14 |
3 |
Timer14 |
30 |
30 |
15 |
3 |
UART0 |
31 |
31 |
||
UART1 |
32 |
32 |
||
UART2 |
33 |
33 |
||
UART3_BT |
34 |
34 |
||
UART_LOG |
35 |
35 |
||
GPIOA |
36 |
36 |
16 |
1 |
GPIOB |
37 |
37 |
17 |
2 |
I2C0 |
38 |
38 |
||
I2C1 |
39 |
39 |
||
CTOUCH |
40 |
40 |
18 |
1 |
GDMA0_Channel0 |
41 |
41 |
19 |
4 |
GDMA0_Channel1 |
42 |
42 |
20 |
4 |
GDMA0_Channel2 |
43 |
43 |
21 |
1 |
GDMA0_Channel3 |
44 |
44 |
22 |
1 |
GDMA0_Channel4 |
45 |
45 |
||
GDMA0_Channel5 |
46 |
46 |
||
GDMA0_Channel6 |
47 |
47 |
||
GDMA0_Channel7 |
48 |
48 |
||
SPI0 |
49 |
49 |
||
SPI1 |
50 |
50 |
||
SPORT0 |
51 |
51 |
23 |
3 |
SPORT1 |
52 |
52 |
24 |
3 |
RTC |
53 |
53 |
||
ADC |
54 |
54 |
||
ADC_COMP |
55 |
55 |
||
BOR |
56 |
56 |
||
PWR_DOWN |
57 |
57 |
||
SPI_FLASH |
58 |
58 |
||
Thermal |
59 |
59 |
||
RSIP |
60 |
60 |
||
AES |
61 |
61 |
||
SHA |
62 |
62 |
||
ECDSA |
63 |
63 |
||
PSRAMC |
64 |
64 |
||
TRNG |
65 |
65 |
||
LEDC |
66 |
66 |
||
AES_S |
67 |
67 |
||
SHA_S |
68 |
68 |
||
AON_TIM |
69 |
69 |
||
AON_WAKEPIN |
70 |
70 |
||
DSP_ERROR |
71 |
71 |
||
DSP_FATAL_ERROR |
72 |
72 |
||
VAD |
73 |
73 |
25 |
3 |
Zigbee |
74 |
74 |
26 |
4 |
DSP_NMI |
28 |
Note
DSP_INT_LEVEL indicates the interrupt priority of each function in the DSP. The interrupt priorities are fixed in hardware and cannot be modified.
Function |
KM0 Index |
KM4 Index |
CA32 Index |
|---|---|---|---|
IPC_IRQ |
0 |
||
RXI300_IRQ |
1 |
||
WIFI_FISR_FESR_IRQ |
2 |
||
WIFI_FTSR_MAILBOX_IRQ |
3 |
||
AON_TIM |
4 |
79 |
95 |
NP_WAKE_IRQ |
5 |
||
AP_WAKE_IRQ |
6 |
20 |
|
IWDG |
7 |
||
Timer0 |
0 |
0 |
|
Timer1 |
1 |
1 |
|
Timer2 |
10 |
2 |
2 |
Timer3 |
11 |
3 |
3 |
Timer4 |
12 |
4 |
4 |
Timer5 |
13 |
5 |
5 |
Timer6 |
14 |
6 |
6 |
Timer7 |
15 |
7 |
7 |
UART_LOG |
16 |
8 |
8 |
GPIOA |
17 |
9 |
9 |
GPIOB |
18 |
10 |
10 |
GPIOC |
19 |
11 |
11 |
RTC |
20 |
12 |
12 |
CTOUCH |
21 |
13 |
13 |
ADC |
22 |
14 |
14 |
ADC_COMP |
23 |
15 |
15 |
BOR |
24 |
16 |
16 |
PWR_DOWN |
25 |
17 |
17 |
VADBT_OR_VADPC |
26 |
18 |
18 |
SPI_FLASH |
27 |
19 |
19 |
DEBUG_TIMER |
28 |
20 |
|
Thermal |
29 |
21 |
21 |
I2C0 |
30 |
22 |
22 |
RSIP |
31 |
23 |
23 |
IPC_NP |
24 |
||
IPC_AP |
24 |
||
GDMA0_Channel0 |
25 |
25 |
|
GDMA0_Channel1 |
26 |
26 |
|
GDMA0_Channel2 |
8 |
27 |
27 |
GDMA0_Channel3 |
9 |
28 |
28 |
GDMA0_Channel4 |
29 |
29 |
|
GDMA0_Channel5 |
30 |
30 |
|
GDMA0_Channel6 |
31 |
31 |
|
GDMA0_Channel7 |
32 |
32 |
|
LCDC |
33 |
33 |
|
WL_DMA |
36 |
34 |
34 |
WL_PROTOCOL |
37 |
35 |
35 |
AES |
36 |
36 |
|
SHA |
37 |
37 |
|
SDIO_HOST |
38 |
38 |
|
USB_OTG |
39 |
39 |
|
SPI0 |
40 |
40 |
|
SPI1 |
41 |
41 |
|
RSVD |
42 |
42 |
|
RSA |
43 |
43 |
|
ECDSA |
44 |
44 |
|
ED25519 |
45 |
45 |
|
PSRAMC |
46 |
46 |
|
DDR |
47 |
47 |
|
RXI300_HP |
48 |
48 |
|
IR |
49 |
49 |
|
UART0 |
50 |
50 |
|
UART1 |
51 |
51 |
|
UART2 |
52 |
52 |
|
UART3_BT |
53 |
53 |
|
TRNG |
54 |
54 |
|
I2C1 |
42 |
55 |
55 |
I2C2 |
43 |
56 |
56 |
Timer8 |
57 |
57 |
|
Timer9 |
58 |
58 |
|
KM4_S_WDG |
59 |
59 |
|
KM4_NS_WDG |
60 |
60 |
|
CA32_S_WDG |
61 |
61 |
|
CA32_NS_WDG |
62 |
62 |
|
SPORT0 |
63 |
63 |
|
SPORT1 |
64 |
64 |
|
SPORT2 |
65 |
65 |
|
SPORT3 |
66 |
66 |
|
BT_SCB |
67 |
67 |
|
LEDC |
68 |
68 |
|
PMUIRQ0 |
69 |
||
MIPI_DSI |
69 |
70 |
|
AXIERIRQ |
71 |
||
AES_S |
70 |
72 |
|
SHA_S |
71 |
73 |
|
AON_WAKEPIN |
32 |
72 |
74 |
Zigbee |
73 |
75 |
|
BT_WAKE_HOST |
33 |
74 |
76 |
nFIQOUT0_OR_nIRQOUT0 |
34 |
||
nFIQOUT1_OR_nIRQOUT1 |
35 |
||
CTIIRQ |
77 |
||
Timer10 |
38 |
75 |
78 |
Timer11 |
39 |
76 |
79 |
Timer12 |
40 |
77 |
80 |
Timer13 |
41 |
78 |
81 |
Function |
KM4NS Index |
KM4TZ Index |
|---|---|---|
WIFI_FISR_FESR_IRQ |
0 |
0 |
WIFI_FTSR_MAILBOX_IRQ |
1 |
1 |
WL_DMA |
2 |
2 |
WL_PROTOCOL |
3 |
3 |
AP_WAKE_IRQ |
4 |
4 |
IPC_CPU1 |
5 |
|
IPC_CPU0 |
5 |
|
IPC_BT_CPU |
||
IWDG |
6 |
6 |
Timer0 |
7 |
7 |
Timer1 |
8 |
8 |
Timer2 |
9 |
9 |
Timer3 |
10 |
10 |
Timer4 |
11 |
11 |
Timer5 |
12 |
12 |
Timer6 |
13 |
13 |
Timer7 |
14 |
14 |
Timer8 |
15 |
15 |
COEX_MAILBOX |
16 |
16 |
rsvd |
17 |
17 |
pmc_timer0 |
18 |
18 |
pmc_timer1 |
19 |
19 |
UART0 |
20 |
20 |
UART1 |
21 |
21 |
UART2 |
22 |
22 |
UART3 |
23 |
23 |
UART_LOG |
24 |
|
UART_LOG |
24 |
|
UART_LOG |
||
GPIOA |
25 |
25 |
GPIOB |
26 |
26 |
GPIOC |
27 |
27 |
I2C0 |
28 |
28 |
I2C1 |
29 |
29 |
GDMA0_Channel0 |
30 |
30 |
GDMA0_Channel1 |
31 |
31 |
GDMA0_Channel2 |
32 |
32 |
GDMA0_Channel3 |
33 |
33 |
GDMA0_Channel4 |
34 |
34 |
GDMA0_Channel5 |
35 |
35 |
GDMA0_Channel6 |
36 |
36 |
GDMA0_Channel7 |
37 |
37 |
SPI0 |
38 |
38 |
SPI1 |
39 |
39 |
SPORT0 |
40 |
40 |
RTC |
41 |
41 |
ADC |
42 |
42 |
ADC_COMP |
43 |
43 |
CAPTOUCH |
44 |
44 |
THERMAL |
45 |
45 |
BOR |
46 |
46 |
PWR_DOWN |
47 |
47 |
RMII |
48 |
48 |
LCDC |
49 |
49 |
MJPEG |
50 |
50 |
PPE |
51 |
51 |
PKE |
52 |
52 |
TRNG |
53 |
53 |
AON_TIM |
54 |
54 |
AON_WAKEPIN |
55 |
55 |
SDIO_WIFI |
56 |
56 |
SDIO_BT |
57 |
57 |
SDIO_HOST |
58 |
58 |
USB |
59 |
59 |
CAN0 |
60 |
60 |
CAN1 |
61 |
61 |
IR |
62 |
62 |
RXI300 |
63 |
63 |
PSRAMC |
64 |
64 |
SPI_FLASH |
65 |
65 |
RSIP |
66 |
66 |
AES |
67 |
67 |
SHA |
68 |
68 |
AES_S |
||
SHA_S |
||
CPU1_WDG |
69 |
|
CPU0_NS_WDG |
69 |
|
CPU0_S_WDG |
70 |
|
OCP |
71 |
|
SPIC_ECC |
72 |
|
UVC_DEC |
73 |
|
RTC_DET |
74 |
|
BT_MAILBOX |
70 |
75 |
BT_SCB |
71 |
76 |
BT_WAKE_HOST |
72 |
77 |
CPU1_WDG_RST |
78 |
Nested Vectored Interrupt Controller (NVIC)
The Nested Vectored Interrupt Controller (NVIC) is the interrupt controller for ARM Cortex-M series processors. It is tightly integrated with the processor core to enable low-latency interrupt handling.
NVIC Features:
Unified exception management: Processor exceptions (such as HardFault and SysTick) and peripheral interrupts share the same NVIC management mechanism for unified registration and response.
Nested interrupts: Supports priority-based nested interrupt handling. A higher-priority interrupt can preempt an active lower-priority interrupt service routine.
Vectored interrupts: When an interrupt occurs, the hardware directly jumps to the corresponding ISR entry in the vector table without requiring software polling to identify the interrupt source.
Hardware priority masking: The
BASEPRIregister (an ARM Cortex-M core special register, accessible via the CMSIS library) can be used to mask all interrupts below a specified priority.Vector table relocation: The vector table can be relocated to a custom address via the vector table offset register
VTOR(an SCB register in the core).
The NVIC features for each ARM Cortex-M series CPU are as follows:
KM4 NVIC support:
80 vectored interrupts
8 programmable interrupt priority levels. Values range from 0 to 7; a smaller value indicates a higher priority.
Secure and Non-secure NVICs
KM0 NVIC support:
80 vectored interrupts
4 programmable interrupt priority levels. Values range from 0 to 3; a smaller value indicates a higher priority.
KM4 NVIC support:
80 vectored interrupts
8 programmable interrupt priority levels. Values range from 0 to 7; a smaller value indicates a higher priority.
Secure and Non-secure NVICs
KM4 NVIC support:
80 vectored interrupts
8 programmable interrupt priority levels. Values range from 0 to 7; a smaller value indicates a higher priority.
KM4 NVIC support:
80 vectored interrupts
8 programmable interrupt priority levels. Values range from 0 to 7; a smaller value indicates a higher priority.
Secure and Non-secure NVICs
KM4 NVIC support:
80 vectored interrupts
8 programmable interrupt priority levels. Values range from 0 to 7; a smaller value indicates a higher priority.
KM4 NVIC support:
80 vectored interrupts
8 programmable interrupt priority levels. Values range from 0 to 7; a smaller value indicates a higher priority.
Secure and Non-secure NVICs
KM0 NVIC support:
36 vectored interrupts
4 programmable interrupt priority levels. Values range from 0 to 3; a smaller value indicates a higher priority.
KM4TZ NVIC support:
80 vectored interrupts
8 programmable interrupt priority levels. Values range from 0 to 7; a smaller value indicates a higher priority.
Secure and Non-secure NVICs
KM4NS NVIC support:
80 vectored interrupts
8 programmable interrupt priority levels. Values range from 0 to 7; a smaller value indicates a higher priority.
Note
For more information on interrupt and NVIC programming, refer to the official technical manual: Arm® Cortex®-M55 Processor Technical Reference Manual.
Generic Interrupt Controller (GIC)
The Generic Interrupt Controller (GIC) is the interrupt controller used by ARM Cortex-A series processors. The GIC collects and arbitrates interrupts from interrupt sources and distributes them to the corresponding CPU.
GIC Architecture Components:
Distributor: A global module responsible for managing the priority and enable state of all interrupt sources, and distributing interrupts to the target CPU interfaces.
CPU Interface: A per-CPU interface responsible for delivering interrupt signals to the CPU and handling interrupt acknowledgment and end-of-interrupt (EOI) operations.
Peripheral interrupt inputs: Peripherals send interrupt signals into the Distributor via dedicated interrupt request lines (IRQ lines). This is the signal interface between the GIC and on-chip peripherals (not an internal GIC module).
GIC Features:
Interrupt masking: Interrupt enable and disable can be controlled by priority or on a per-source basis.
Priority ordering: Supports configurable interrupt priorities; a smaller value indicates a higher priority.
Interrupt distribution: Interrupts can be routed to one or more target CPUs.
Interrupt state tracking: The hardware maintains the pending and active state for each interrupt.
Software Generated Interrupts (SGI): Supports sending software interrupts to target CPUs by writing a register, commonly used for inter-core communication.
Security Extensions: Supports TrustZone security partitioning to isolate secure and non-secure interrupt management.
Virtualization Extensions: Supports virtual interrupt injection in Hypervisor scenarios.
Multi-core support: Interrupts can be distributed to any processing unit in a multi-core system.
Interrupt preemption: Supports higher-priority interrupts preempting a lower-priority interrupt currently being handled.
The above are general GIC features. The following are the specific configuration parameters for the CA32 CPU in this chip. The GIC divides interrupts into three categories: Software Generated Interrupts (SGI), triggered by software register writes for inter-core communication; Private Peripheral Interrupts (PPI), exclusive to each CPU such as the core timer; and Shared Peripheral Interrupts (SPI), shared by all CPUs and corresponding to on-chip peripheral IRQs.
CA32 GIC support:
16 Software Generated Interrupts (SGI): for inter-core software-triggered interrupts.
16 Private Peripheral Interrupts (PPI): private to each CPU, such as generic timer interrupts.
Up to 96 Shared Peripheral Interrupts (SPI): peripheral interrupts shared by all CPUs.
32 programmable interrupt priority levels.
Note
All interrupts for CA32 must be routed to the CPU through the GIC. Although the CA32 processor retains the legacy nFIQ/nIRQ input pins, no interrupt sources in this chip are connected to these pins. Therefore, even if GIC interrupt bypass takes effect (for example, after a reset), no external interrupt will bypass the GIC to directly trigger CA32 via nFIQ/nIRQ.
Note
The GIC in CA32 is compliant with version 2.0 of the ARM Generic Interrupt Controller (GIC) Architecture Specification.
The following documents provide more details about the GIC:
Platform-Level Interrupt Controller (PLIC)
The RISC-V Platform-Level Interrupt Controller (PLIC) is an interrupt controller designed specifically for RISC-V systems. The PLIC multiplexes various device interrupts onto the KR4’s external interrupt line and provides hardware interrupt priority support.
Note
In the PLIC, a larger value indicates a higher priority (the opposite of NVIC/GIC). The SDK abstracts this difference.
The SDK’s ISR framework automatically handles the explicit claim-complete operation required by the PLIC when processing external interrupts.
The PLIC can generate three types of interrupts with the following characteristics:
External Interrupts
Interrupt sources fed into the PLIC are called global interrupts, also referred to as PLIC interrupts.
Each interrupt source (e.g., an I/O interrupt) has its own:
Priority register. A larger value indicates a higher priority.
Enable register per interrupt target.
Interrupt identifier (ID), starting from 1 (0 is reserved).
Each interrupt target (e.g., a CPU) has its own:
Threshold register.
Enable register per interrupt source.
An interrupt is triggered when the maximum priority is strictly greater than the corresponding interrupt threshold.
The PLIC uses a “claim-complete” handshake mechanism to handle interrupts: the CPU reads the
claimregister (an MMIO read operation) to obtain the highest-priority interrupt ID (claim), and after handling it, writes that ID back to thecompleteregister (complete).The PLIC supports both level-sensitive and pulse-sensitive interrupt signal types, and the pending behavior differs in the claim-complete flow:
For level-sensitive interrupts: as long as the interrupt source is cleared before the complete signal is issued, the interrupt handler runs only once. If the interrupt source remains asserted after the complete signal is issued, the interrupt will become pending again.
For pulse-sensitive interrupts: regardless of how many pulses the PLIC detects before the complete signal is issued, the interrupt pending is only triggered once.
Timer Interrupts
Triggered when the timer count value exceeds the value set in the
MTIMECMPregister.
Software Interrupts
Triggered when
0x1is written to theMSIPaddress.
KR4 PLIC support:
80 interrupt sources. All interrupts are level-sensitive.
7 programmable interrupt priority levels with hardware priority masking.
Note
The KR4 PLIC pending bit behavior differs from the standard RISC-V specification as follows:
Standard PLIC: When an interrupt is triggered, the pending bit is set regardless of the enable bit state. A pending interrupt will be handled once re-enabled.
KR4 modification: A trigger signal sets the pending bit only when the corresponding interrupt’s enable bit is already set. A signal that arrives while the enable bit is not set does not produce a pending entry, and will not be handled even after the enable bit is re-asserted.
Note
For more information on interrupt and PLIC programming, refer to the RISC-V privileged architecture proposal.
DSP Interrupt Controller (XEA2)
The HiFi 5 DSP uses the Xtensa Interrupt Architecture 2 (XEA2) as its interrupt controller. XEA2 is the standard interrupt architecture defined by Tensilica for the Xtensa processor family.
Note
The XEA2 priority model uses a larger value to indicate a higher priority (the opposite of NVIC/GIC), and interrupt source priorities are fixed in hardware and cannot be modified by software (refer to the DSP_INT_LEVEL column in the Interrupt Index List).
HiFi 5 DSP Interrupt Controller Features:
32 asynchronous interrupts: Generated by external and internal sources, covering interrupt priorities from normal level (Level-1) up to high priority and Non-Maskable Interrupt (NMI), as well as internal interrupt sources such as timers.
Multi-level priorities and NMI: Supports multiple interrupt priority levels (up to six in the XEA2 standard, four on this chip’s DSP) and an optional Non-Maskable Interrupt (NMI). The interrupt priority of each function is fixed in hardware and cannot be modified.
iDMA interrupts: The integrated DMA engine can be configured to interrupt the DSP upon completion of a specific descriptor or when an error occurs.
Timer Interrupts: Two internal timer interrupts, generated by comparing trigger values in special registers against a 32-bit cycle counter.
Interrupt vectors: High-priority and non-maskable interrupts each have a dedicated interrupt vector per level.
Performance Monitor Interrupts: The performance monitor sends a level-sensitive signal (from the debug module) to the processor to trigger an interrupt when a performance counter overflows.
Supports multiple interrupt types:
External Level Interrupts: Level-sensitive interrupt signals input to the processor.
External Edge Interrupts: Edge-triggered interrupt signals input to the processor.
Internal Interrupts: Interrupts generated by the processor’s internal logic (e.g., timers and debug interrupts).
Non-Maskable Interrupt (NMI): An external edge-triggered interrupt signal input to the processor with an implicitly infinite priority.
Write Error Interrupts: Interrupts generated when a PIF write response encounters an error.