CN106294231A - 一种基于精简8051 mcu的外部中断控制方法 - Google Patents
一种基于精简8051 mcu的外部中断控制方法 Download PDFInfo
- Publication number
- CN106294231A CN106294231A CN201610829748.1A CN201610829748A CN106294231A CN 106294231 A CN106294231 A CN 106294231A CN 201610829748 A CN201610829748 A CN 201610829748A CN 106294231 A CN106294231 A CN 106294231A
- Authority
- CN
- China
- Prior art keywords
- mcu
- isr
- processing module
- interruption processing
- external
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 16
- 230000000630 rising effect Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
- G06F13/24—Handling requests for interconnection or transfer for access to input/output bus using interrupt
- G06F13/26—Handling requests for interconnection or transfer for access to input/output bus using interrupt with priority control
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
本发明公开了一种基于精简8051 MCU的外部中断控制方法,包括微处理器内核R8051 Core、MCU调试模块Debug System和中断处理模块ISR,所述微处理器内核R8051 Core分别连接MCU调试模块Debug System和中断处理模块ISR,各种外部设备通过SFR总线和内核集成在一起,外部设备产生的中断请求将统一发送到中断处理模块ISR进行仲裁处理。本发明使得MCU外部中断支持全管脚,用户可以通过软件配置相应的寄存器,使能对应的管脚,解决了脚位不同带来的移植困难,降低开发成本,同时,每个管脚均支持事件触发模式的选择,分别可以使用低电平触发、下降沿触发、上升沿触发和跳变触发,应用场景变得灵活丰富,采用通用的RTL代码设计能够缩短芯片开发周期,减少验证工作量。
Description
技术领域
本发明涉及一控制方法,具体是一种基于精简8051MCU的外部中断控制方法。
背景技术
外部中断是MCU常见的功能,用于相应外部事件,经典8051的外部中断只具备两个输入管脚,不同芯片厂家的脚位配置也不尽相同,当推出一款全新的MCU时,时常因脚位的不匹配不得不修改底板或重新开发,无形中增加了客户的成本,从而给芯片的推广带来不必要的阻力。另外,经典的外部事件触发模式只有两种,分别是低电平和下降沿,使得应用场景变得不够灵活可配,当遇到其他情况类型的事件,则必须通过增加外围器件来实现。
发明内容
本发明的目的在于提供一种基于精简8051MCU的外部中断控制方法,以解决上述背景技术中提出的问题。
为实现上述目的,本发明提供如下技术方案:
一种基于精简8051MCU的外部中断控制方法,包括微处理器内核R8051Core、MCU调试模块Debug System和中断处理模块ISR,所述微处理器内核R8051Core分别连接MCU调试模块Debug System和中断处理模块ISR,各种外部设备通过SFR总线和内核集成在一起,外部设备产生的中断请求将统一发送到中断处理模块ISR进行仲裁处理,然后生成对应的中断向量送给微处理器内核R8051Core。
作为本发明再进一步的方案:所述中断处理模块ISR还连接外部中断模块Extint。
与现有技术相比,本发明的有益效果是:本发明使得MCU外部中断支持全管脚,用户可以通过软件配置相应的寄存器,使能对应的管脚,解决了脚位不同带来的移植困难,降低开发成本。同时,每个管脚均支持事件触发模式的选择,分别可以使用低电平触发、下降沿触发、上升沿触发和跳变触发(即同时支持上升沿和下降沿),应用场景变得灵活丰富。另外,随着产品的更新迭代,采用通用的RTL代码设计能够缩短芯片开发周期,减少验证工作量。
附图说明
图1为基于精简8051MCU的外部中断控制中MCU结构框图;
图2为基于精简8051MCU的外部中断控制器中外部中断设计框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参阅图1~2,本发明实施例中,一种基于精简8051MCU的外部中断控制方法,包括微处理器内核R8051Core、MCU调试模块Debug System和中断处理模块ISR,所述微处理器内核R8051Core分别连接MCU调试模块Debug System和中断处理模块ISR,各种外部设备通过SFR总线和内核集成在一起,外部设备产生的中断请求将统一发送到中断处理模块ISR进行仲裁处理,然后生成对应的中断向量送给微处理器内核R8051Core;所述中断处理模块ISR还连接外部中断模块Extint。
本发明的工作原理是:图1是MCU系统架构,R8051Core是微处理器内核,DebugSystem是MCU调试模块,供程序调试使用,ISR是中断处理模块。各种外部设备通过SFR总线,和内核集成在一起,其中Extint是外部中断模块,Per 1、Per 2等表示其他外部设备,而外部设备产生的中断请求将统一发送到ISR中断处理模块进行仲裁处理,然后生成对应的中断向量送给R8051Core。P3~P0表示MCU的IO口,系统通过这些IO口输入事件(即低电平、上升沿或下降沿),而Extint外部中断模块接收这些输入事件,并通过电路生成外部中断请求信号,送给ISR中断处理模块。每一组IO口会生成一个中断请求,这里有4组,所有会生成4个不同的中断请求信号,ISR会根据规定优先级,接收不同的中断请求信号,生成对应的中断向量送给CPU内核,CPU在接收到中断向量和中断请求之后,会跳转至对应的程序地址执行中断子程序。
本发明中缩写英文名词解释见下表:
图2是外部中断模块的逻辑框图,ext0~ext3分别是处理来自P0~P3的外部事件的子模块,然后生成4个中断请求信号送给ISR。每个子模块根据对应端口,处理此端口所有管脚的外部事件,然后将每一组管脚做或运算,等到当前组的中断请求,信号通过mode信号来选择不同的触发模式,当发生外部事件时,中断标志位if将被置位,若此时打开中断使能ien,则将会生成对应管脚的中断请求信号。
触发方式mode译码表如下:
对于本领域技术人员而言,显然本发明不限于上述示范性实施例的细节,而且在不背离本发明的精神或基本特征的情况下,能够以其他的具体形式实现本发明。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本发明的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化囊括在本发明内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。
此外,应当理解,虽然本说明书按照实施方式加以描述,但并非每个实施方式仅包含一个独立的技术方案,说明书的这种叙述方式仅仅是为清楚起见,本领域技术人员应当将说明书作为一个整体,各实施例中的技术方案也可以经适当组合,形成本领域技术人员可以理解的其他实施方式。
Claims (2)
1.一种基于精简8051 MCU的外部中断控制方法,包括微处理器内核R8051 Core、MCU调试模块Debug System和中断处理模块ISR,其特征在于,所述微处理器内核R8051 Core分别连接MCU调试模块Debug System和中断处理模块ISR,各种外部设备通过SFR总线和内核集成在一起,外部设备产生的中断请求将统一发送到中断处理模块ISR进行仲裁处理,然后生成对应的中断向量送给微处理器内核R8051 Core。
2.根据权利要求1所述的基于精简8051 MCU的外部中断控制器,其特征在于,所述中断处理模块ISR还连接外部中断模块Extint。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610829748.1A CN106294231A (zh) | 2016-09-18 | 2016-09-18 | 一种基于精简8051 mcu的外部中断控制方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610829748.1A CN106294231A (zh) | 2016-09-18 | 2016-09-18 | 一种基于精简8051 mcu的外部中断控制方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106294231A true CN106294231A (zh) | 2017-01-04 |
Family
ID=57712327
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610829748.1A Pending CN106294231A (zh) | 2016-09-18 | 2016-09-18 | 一种基于精简8051 mcu的外部中断控制方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106294231A (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107239614A (zh) * | 2017-06-05 | 2017-10-10 | 芯海科技(深圳)股份有限公司 | 一种外部事件触发断点的芯片仿真方法 |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6021458A (en) * | 1998-01-21 | 2000-02-01 | Intel Corporation | Method and apparatus for handling multiple level-triggered and edge-triggered interrupts |
US20100077120A1 (en) * | 2008-09-25 | 2010-03-25 | Mediatek Inc. | Embedded system and interruption handling method |
-
2016
- 2016-09-18 CN CN201610829748.1A patent/CN106294231A/zh active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6021458A (en) * | 1998-01-21 | 2000-02-01 | Intel Corporation | Method and apparatus for handling multiple level-triggered and edge-triggered interrupts |
US20100077120A1 (en) * | 2008-09-25 | 2010-03-25 | Mediatek Inc. | Embedded system and interruption handling method |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107239614A (zh) * | 2017-06-05 | 2017-10-10 | 芯海科技(深圳)股份有限公司 | 一种外部事件触发断点的芯片仿真方法 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Li et al. | Reverse engineering circuits using behavioral pattern mining | |
CN107436762B (zh) | 一种寄存器代码文件生成方法、装置和电子设备 | |
CN110603528A (zh) | 调试系统和方法 | |
US10102050B2 (en) | System and method for generating cross-core breakpoints in a multi-core microcontroller | |
US6175913B1 (en) | Data processing unit with debug capabilities using a memory protection unit | |
CN106294231A (zh) | 一种基于精简8051 mcu的外部中断控制方法 | |
CN104461603B (zh) | 一种信息处理方法及电子设备 | |
Ramesh et al. | A toolset for modelling and verification of GALS systems | |
CN205485799U (zh) | 一种可复用sas、sata信号的硬盘背板 | |
CN206322157U (zh) | 一种基于精简8051mcu的外部中断控制器 | |
Lin et al. | SCBench: A benchmark design suite for SystemC verification and validation | |
CN107229793B (zh) | 一种高级可扩展接口总线平台的测试方法及装置 | |
US20150286584A1 (en) | Method and apparatus for providing memory protection | |
US9721053B2 (en) | Method and system for printed circuit board layout | |
US8099694B1 (en) | Interactive tool for contemporaneous design of integrated circuits having different device packages | |
EP3764270A1 (en) | Subsystem-based soc integration | |
Rajani et al. | Connectivity verification of zynq UltraScale+ MPSoC with TTC and WDT interrupts | |
Dalay | Accelerating system performance using SOPC builder | |
Yeh et al. | Enabling TLM-2.0 interface on QEMU and SystemC-based virtual platform | |
KR100638476B1 (ko) | 버추얼 플랫폼 기반의 시스템 온 칩 개발 환경 및 개발 방법 | |
CN107590089A (zh) | 基本输入输出系统对pci‑e通道的控制方法 | |
Díaz et al. | Virtual Platform of FPGA based MPSoC for Power Electronics Applications: OS simulation | |
Dawson et al. | Buses and bus standards | |
Mingyan et al. | Parterre: an application-general SoC platform | |
Biswell et al. | MICROPROGRAMMED BRANCH DRIVER (MBD) FOR A PDP-11 COMPUTER. |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170104 |
|
RJ01 | Rejection of invention patent application after publication |