Skip to content

Commit 6c6dff9

Browse files
author
liduanjun
committed
update
1 parent 9628c07 commit 6c6dff9

File tree

6 files changed

+54
-9
lines changed

6 files changed

+54
-9
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# GIC - Generic Interrupt Controller 通用中断控制器
2+
3+
## GIC 的作用
4+
5+
* 管理中断源
6+
* 控制中断行为
7+
* 将中断信号路由至多个处理器
8+
9+
当GIC具有安全扩展时,它可以接收FIQ - Fast Interrupt Request
10+
11+
## GIC 的特性
12+
13+
* 支持三种类型的中断
14+
* SGI - Software Generated Interrupt
15+
* PPI - Private Peripheral Interrupt
16+
* SPI - Share Peripheral Interrupt
17+
* 通过编程来配置中断
18+
* 中断的安全状态
19+
* 中断的优先级
20+
* 可用或禁用中断
21+
* 处理器接收中断
22+
* 中断的状态
23+
* Inactive
24+
* Pending
25+
* Active
26+
* Active and Pending
27+
* ![Interrupt Handling State Machine](resource/images/InterruptHandlingStateMachine.png)
28+
* 中断的分发
29+
* 1-N : 适合 SPI - Share Peripheral Interrupt
30+
* N-N : 适合 SGI - Software-Generated Interrupt
31+
* 模式组
32+
* 多组中断
33+
* 多组寄存器
34+
35+
## GIC Block
36+
37+
![GICBlock](resource/images/GICBlock.png)
38+
39+
## Distributor Block
40+
41+
![DistributorBlock](resource/images/DistributorBlock.png)
42+
43+
## CPU interface
44+
45+
![CPUInterface](resource/images/CPUInterface.png)

4.驱动/ARM体系结构与结构技术/备课/Day5/KeyInterrupt.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,20 @@ typedef struct {
4444
## 按键中断的核心代码-GIC设置
4545
```
4646
/*
47-
* GIC interrupt controller:
48-
* */
47+
* GIC interrupt controller:
48+
*/
4949
50-
// Enables the corresponding interrupt SPI25, SPI26 -- Key_2, Key_3
51-
ICDISER.ICDISER1 |= (0x1 << 25) | (0x1 << 26);
50+
// Enables the corresponding interrupt SPI25, SPI26 -- Key_2, Key_3
51+
ICDISER.ICDISER1 |= (0x1 << 25) | (0x1 << 26);
5252
53-
CPU0.ICCICR |= 0x1; //Global enable for signaling of interrupts
53+
CPU0.ICCICR |= 0x1; //Global enable for signaling of interrupts
5454
55-
CPU0.ICCPMR = 0xFF; //The priority mask level.Priority filter. threshold
55+
CPU0.ICCPMR = 0xFF; //The priority mask level.Priority filter. threshold
5656
57-
ICDDCR = 1; //Bit1: GIC monitors the peripheral interrupt signals and
58-
// forwards pending interrupts to the CPU interfaces2
57+
ICDDCR = 1; //Bit1: GIC monitors the peripheral interrupt signals and
58+
// forwards pending interrupts to the CPU interfaces2
5959
60-
ICDIPTR.ICDIPTR14 = 0x01010101; //SPI25 SPI26 interrupts are sent to processor 0
60+
ICDIPTR.ICDIPTR14 = 0x01010101; //SPI25 SPI26 interrupts are sent to processor 0
6161
```
6262

6363
* ICDISER.ICDISER1
Loading
Loading
Loading

0 commit comments

Comments
 (0)