目录
5.4.10 向量地址寄存器 0-15(VICVectAddr0-15 - 0xFFFF F100-13C).................................42
5.4.11 默认向量地址寄存器(VICDefVectAddr - 0xFFFF F034)...........................................43
5.4.12 向量地址寄存器(VICVectAddr - 0xFFFF F030).........................................................43
5.4.13 保护使能寄存器(VICProtection - 0xFFFF F020) .......................................................43
5.5 中断源.........................................................................................................................................43
5.6 伪中断.........................................................................................................................................45
5.6.1 伪中断的详述和个案..........................................................................................................46
5.6.2 解决方案..............................................................................................................................47
5.6.3 方案 1:在写 CPSR 来禁止 IRQ 过程中检测接收到的 IRQ...........................................47
5.6.4 方案 2:分别使用两条写 CPSR 的指令来禁能 IRQ 和 FIQ ...........................................47
5.6.5 方案 3:在 IRQ 处理程序的开始重新使能 FIQ...............................................................47
5.7 VIC 使用事项 ..............................................................................................................................48
第 6 章 管脚配置..................................................................................................................................49
6.1 LPC2101/2102/2103 的管脚配置................................................................................................49
6.2 LPC2101/02/03 的管脚描述........................................................................................................51
第 7 章 管脚连接模块..........................................................................................................................55
7.1 特性.............................................................................................................................................55
7.2 应用.............................................................................................................................................55
7.3 描述.............................................................................................................................................55
7.4 寄存器描述 .................................................................................................................................55
7.4.1 管脚功能选择寄存器 0(PINSEL0 - 0xE002 C000) ......................................................55
7.4.2 管脚功能选择寄存器 1(PINSEL1 - 0xE002 C004) ......................................................57
7.4.3 管脚功能选择寄存器值......................................................................................................59
第 8 章 通用输入/输出口(GPIO)........................................................................................................60
8.1 特性.............................................................................................................................................60
8.2 应用.............................................................................................................................................60
8.3 管脚描述.....................................................................................................................................60
8.4 寄存器描述 .................................................................................................................................60
8.4.1 GPIO 端口 0 方向寄存器(IODIR, 端口 0:IO0DIR - 0xE002 8008;FIODIR, 端口 0:
FIO0DIR – 0x3FFF C000) ..........................................................................................................62
8.4.2 高速 GPIO 端口 0 屏蔽寄存器 (FIOMASK, 端口 0:FIO0MASK – 0x3FFF C010) ....63
8.4.3 GPIO 端口 0 管脚值寄存器(IOPIN, 端口 0:IO0PIN - 0xE002 8000;FIOPIN, 端口 0:
FIO0PIN - 0x3FFF C014) ...........................................................................................................64
8.4.4 GPIO 端口 0 输出置位寄存器(IOSET,端口 0:IO0SET - 0xE002 8004;FIOSET,端口 0:
FIO0SET - 0x3FFF C018)...........................................................................................................65
8.4.5 GPIO 端口 0 输出清零寄存器(IOCLR,端口 0:IO0CLR – 0xE002 800C;FIOCLR,端口
0:FIO0CLR – 0x3FFF C01C)......................................................................................................66
8.5 GPIO 使用注意事项....................................................................................................................67
8.5.1 例 1:顺序访问 IOSET 和 IOCLR 寄存器对同一个 GPIO 管脚/位的影响....................67
8.5.2 例 2:使 GPIO 管脚上输出瞬时的 0 和 1.........................................................................67
8.5.3 写 IOSET/IOCLR .vs. IOPIN ..............................................................................................68
8.5.4 当使用遗留和增强型 GPIO 寄存器时输出信号频率需要考虑的事项...........................68