arm中断设置过程(Arm interrupt setting process).docVIP

  • 28
  • 0
  • 约4.2千字
  • 约 10页
  • 2017-09-05 发布于河南
  • 举报

arm中断设置过程(Arm interrupt setting process).doc

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

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档