当前位置:网站首页>关于ARM2440中断源个数的一点想法[通俗易懂]
关于ARM2440中断源个数的一点想法[通俗易懂]
2022-08-04 09:44:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
S3c2440支持多达36个内部中断源和24个外部中断源,分别使用内部终端屏蔽寄存器INTMSK和外部中断寄存器MSK进行屏蔽控制。其中,外部中断源通过GPIO以复用的方式成为内部中断源的一部分。
但是我们清楚,INTMSK是一个32位的寄存器,最多只能支持32中断,它是如何对应这么多中断的呢?
首先我们先看INTMSK对应的位。 INTERRUPT MASK (INTMSK) REGISTER (Continued) INT_ADC [31] 0 = Service available, 1 = Masked 1 INT_RTC [30] 0 = Service available, 1 = Masked 1 INT_SPI1 [29] 0 = Service available, 1 = Masked 1 INT_UART0 [28] 0 = Service available, 1 = Masked 1 INT_IIC [27] 0 = Service available, 1 = Masked 1 INT_USBH [26] 0 = Service available, 1 = Masked 1 INT_USBD [25] 0 = Service available, 1 = Masked 1 INT_NFCON [24] 0 = Service available, 1 = Masked 1 INT_UART1 [23] 0 = Service available, 1 = Masked 1 INT_SPI0 [22] 0 = Service available, 1 = Masked 1 INT_SDI [21] 0 = Service available, 1 = Masked 1 INT_DMA3 [20] 0 = Service available, 1 = Masked 1 INT_DMA2 [19] 0 = Service available, 1 = Masked 1 INT_DMA1 [18] 0 = Service available, 1 = Masked 1 INT_DMA0 [17] 0 = Service available, 1 = Masked 1 INT_LCD [16] 0 = Service available, 1 = Masked 1 INT_UART2 [15] 0 = Service available, 1 = Masked 1 INT_TIMER4 [14] 0 = Service available, 1 = Masked 1 INT_TIMER3 [13] 0 = Service available, 1 = Masked 1 INT_TIMER2 [12] 0 = Service available, 1 = Masked 1 INT_TIMER1 [11] 0 = Service available, 1 = Masked 1 INT_TIMER0 [10] 0 = Service available, 1 = Masked 1 INT_WDT_AC97 [9] 0 = Service available, 1 = Masked 1 INT_TICK [8] 0 = Service available, 1 = Masked 1 nBATT_FLT [7] 0 = Service available, 1 = Masked 1 INT_CAM [6] 0 = Service available, 1 = Masked 1 EINT8_23 [5] 0 = Service available, 1 = Masked 1 EINT4_7 [4] 0 = Service available, 1 = Masked 1 EINT3 [3] 0 = Service available, 1 = Masked 1 EINT2 [2] 0 = Service available, 1 = Masked 1 EINT1 [1] 0 = Service available, 1 = Masked 1 EINT0 [0] 0 = Service available, 1 = Masked 1
我们发现INTMSK的第5,6位对应了EINT4_7, EINT8_23,20个外部中断,也就是所,这20个GPIO引脚只能触发这两个中断。 但是当中断到来时,我们如果判断是由哪一个GPIO引脚触发的呢?这个时候我们可以通过查询EINTMASK来判断中断源。 EINTMASK Bit Description EINT23 [23] 0 = enable interrupt 1= masked EINT22 [22] 0 = enable interrupt 1= masked EINT21 [21] 0 = enable interrupt 1= masked EINT20 [20] 0 = enable interrupt 1= masked EINT19 [19] 0 = enable interrupt 1= masked EINT18 [18] 0 = enable interrupt 1= masked EINT17 [17] 0 = enable interrupt 1= masked EINT16 [16] 0 = enable interrupt 1= masked EINT15 [15] 0 = enable interrupt 1= masked EINT14 [14] 0 = enable interrupt 1= masked EINT13 [13] 0 = enable interrupt 1= masked EINT12 [12] 0 = enable interrupt 1= masked EINT11 [11] 0 = enable interrupt 1= masked EINT10 [10] 0 = enable interrupt 1= masked EINT9 [9] 0 = enable interrupt 1= masked EINT8 [8] 0 = enable interrupt 1= masked EINT7 [7] 0 = enable interrupt 1= masked EINT6 [6] 0 = enable interrupt 1= masked EINT5 [5] 0 = enable interrupt 1= masked EINT4 [4] 0 = enable interrupt 1= masked Reserved [3:0] Reserved 但是还有一个疑问,不是说60个中断源吗?除去24个外部中断源应该还有60-24 -(32-6)=10个内部中断源啊。他们在哪呢?
其实这里涉及到了子中断源的概念。 Sub Sources Descriptions Source INT_AC97 AC97 interrupt INT_WDT_AC97 INT_WDT Watchdoc interrupt INT_WDT_AC97 INT_CAM_P P-port capture interrupt in camera interface INT_CAM INT_CAM_C C-port capture interrupt in camera interface INT_CAM INT_ADC_S ADC interrupt INT_ADC INT_TC Touch screen interrupt (pen up/down) INT_ADC INT_ERR2 UART2 error interrupt INT_UART2 INT_TXD2 UART2 transmit interrupt INT_UART2 INT_RXD2 UART2 receive interrupt INT_UART2 INT_ERR1 UART1 error interrupt INT_UART1 INT_TXD1 UART1 transmit interrupt I NT_UART1 INT_RXD1 UART1 receive interrupt INT_UART1 INT_ERR0 UART0 error interrupt INT_UART0 INT_TXD0 UART0 transmit interrupt INT_UART0 INT_RXD0 UART0 receive interrupt NT_UART0
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/107101.html原文链接:https://javaforall.cn
边栏推荐
- [Cloud Residency Co-Creation] HCSD Celebrity Live Streaming – Employment Guide
- 一文带你了解 ESLint
- How to restore the Youxuan database with only data files
- Shell编程的条件语句
- No module named 'flask_misaka' has been resolved [BUG solution]
- VRRP + MSTP configuration, huawei eNSP experiment 】 【
- TiFlash 源码阅读(五) DeltaTree 存储引擎设计及实现分析 - Part 2
- 张朝阳对话俞敏洪:谈宇宙、谈焦虑、谈创业、谈退休、谈人生
- PD 源码分析- Checker: region 健康卫士
- HTB-Nibbles
猜你喜欢
Redis 内存满了怎么办?这样置才正确!
DOM简述
加降息与BTC流动性事件策略研究
外包干了四年,秋招终于上岸了
Apache APISIX 2.15 版本发布,为插件增加更多灵活性
JSP基本语法
Detailed explanation of MSTP protocol configuration on Layer 3 switches [Huawei eNSP experiment]
usb设备复合g_webcam摄像头码流传输功能以及g_serial串口功能
PD 源码分析- Checker: region 健康卫士
v-model原理,在“radio”、“checkbox”、“select”、修饰符
随机推荐
超宽带UWB实时精准定位,短距离无缝交互应用,物联网厘米级精度方案
pyvista 的介绍与使用
无线Mesh自组网方案,CV5200无线模组应用,支持高清数据远距离传输
Detailed explanation of telnet remote login aaa mode [Huawei eNSP]
密码字典生成工具pydictor/john
TCP协议 - 三次握手 - 四次挥手-内核参数调优
一文带你了解 ESLint
学习在php中分析switch与ifelse的执行效率
sqlilabs less-40
MySQL binlog都有哪些模式?
tcp连接的细节
rk3399-339 usb设备复合 总体流程
TiCDC迁移-TiDB到MySQL测试
Cloud function to achieve automatic website check-in configuration details [Web function/Nodejs/cookie]
[Cloud Residency Co-Creation] HCSD Celebrity Live Streaming – Employment Guide
LeetCode简单题之最好的扑克手牌
Qt:小的任务管理器(task)
LeetCode 54. 螺旋矩阵 蛇形矩阵式输出字符串
Win11不识别蓝牙适配器的解决方法
Win11怎么进行左右键对调?