- 28
- 0
- 约4.2千字
- 约 10页
- 2017-09-05 发布于河南
- 举报
arm中断设置过程(Arm interrupt setting process)
arm中断设置过程(Arm interrupt setting process)
Interrupt initialization
1. set pin interrupt mode (such as setting the key 1 corresponding eint8 should be set to GPGCON[1:0]=10
2. set the interrupt trigger mode (such as eint8 ban filter, should be set to EXTINT1[3:0]=0000)
3. remove the corresponding interrupt flag (rEINTPEND to the corresponding bit 1, namely rEINTPEND |= (18)
4. EINTMASK set the corresponding bit, enable the interrupt
5. will be assigned to the first address of the interrupt handler interrupt entrance address (such as rISR_EINT8_23 = key_handler (U32), the key_hangdler (bit) interrupt service program),
Interrupt handling function
1. clear interrupt flag (ClearPending (BIT_EINT8_23))
2. judge interrupt
3. make the corresponding treatment
Specific examples are as follows
Mini2440 button 1 press the buzzer sound, press the button 2 light LED1
/*************************************************
Function name: this is a template based experiment
Parameter: no
Description: do the basic experiment, the template can be called directly
Return: no
Argument: no
Autor Date: Daniel
**************************************************/
#define GLOBAL_CLK 1
#include stdlib.h
#include string.h
#include def.h
#include option.h
#include 2440addr.h
#include 2440lib.h
#include 2440slib.h
#include mmu.h
#include profile.h
#include memtest.h
//int Wait_key (void);
Void key_init (void);
//void Led1_run (void);
//void Led1_init (void);
Static void __irq key_handler (void);
Void beep_init (void);
Void beep_run (void);
Void Led1_run (void);
Void Led1_init (void);
/*************************************************
Function name: delay
Parameter: Times
Description: delay function
Return: void
Argument: void
Autor date:
**************************************************/
Void delay (int times)
{
Int i, j;
For (i=0; itimes; i++)
For (j=0; j400; j++);
}
/*************************************************
Function name: Main
Parameter: void
Main function: Description
Return: void
Argume
您可能关注的文档
- 595数码管(595 digital tube).doc
- 6_set_multiset_特殊容器_迭代器(6_set_multiset_ special container _ iterator).doc
- 6个小细节呵护口腔健康(6 small details to protect your mouth health).doc
- 6《余角和补角》的教学设计(The teaching design of 6 and the supplementary angle).doc
- 6年磨剑——我的策划观点(6 years of grinding sword -- my view of planning).doc
- 6年重复的题(6 years of repetition).doc
- 6struts html标签库(6struts HTML标签库).doc
- 6种有效的领导风格引领卓越绩效(6 effective leadership styles lead performance excellence).doc
- 6级万能公式(Universal formula of 6 stages).doc
- 6级人防覆土2米等效静荷载多少(What is the equivalent static load of 6 meters covered with air defense 2 meters).doc
- 小学六年级英语词汇全(精讲精析+分类汇总+易错突破).docx
- 二年级下册成语 分类详解+易错辨析+实用练习(规范版).docx
- 二年级下册成语 分类详解+易错辨析+实用练习(完整版) 精华版.docx
- 二年级下册成语 分类详解+易错辨析+实用练习(完整版).docx
- 二年级下册成语 分类详解+易错辨析+实用练习(完整版)规范.docx
- 二年级下册成语 分类详解+易错辨析+实用练习(完整版)汇编.docx
- 二年级下册成语 分类详解+易错辨析+实用练习(完整版)全.docx
- 二年级下册成语 分类详解+易错辨析+实用练习(完整版)实用.docx
- 二年级下册成语 分类详解+易错辨析+实用练习(完整版)实用版.docx
- 二年级下册成语 分类详解+易错辨析+实用练习.docx
最近下载
- 2025年中国高压开关柜市场调查研究及行业投资潜力预测报告.docx
- 学区集体2026年工作计划.docx VIP
- 2019年上半年事业单位联考《职业能力倾向测验》D类真题.doc VIP
- 2025年中国蓄能器截止阀行业发展潜力预测及投资战略研究报告.docx
- 六年级上册拔尖数学试卷.docx VIP
- 广州市“房地一体”农村宅基地和集体建设用地权籍调查技术培训ppt1103.pptx VIP
- TCNAS53-2025抗肿瘤药物静脉给药技术学习解读课件附送标准全文word版.pptx
- 职业能力倾向测验-2019年上半年事业单位联考《职业能力倾向测验》D类真题.docx VIP
- 中国铁路运输设备行业发展前景及投资战略咨询报告.docx
- 训诂学 全套课件.PPT VIP
原创力文档

文档评论(0)