songtao0728 发表于 2011-3-1 17:04:34

mini2440 裸机测试外部中断进不了中断

本实验平台为mini2440,用的是K1按键(对应开发板上的引脚为GPG0),为什么用ADS调试的时候,在中断处设置断点,然后全速,这时按下按键,为什么进不了中断,请了解的同志帮下忙,搞了一下午没弄出来~~

#include "def.h"
#include "option.h"
#include "2440addr.h"   
#include "2440lib.h"
#include "2440slib.h"
//================================


/************************************************/
void __irq Key_ISR(void)
{
rSRCPND = 0x20;      //请求EINT8-23源挂起
rINTPND = 0x20;      //请求EINT8-23中断挂起

if(rEINTPEND&(1<<8))
    {
        rEINTPEND |= 1<< 8;
        }   

}

/************************************************/

int Main()
{

rGPGCON = rGPGCON & (~(3<<0)) | (2<<0) ;                //GPG0 set EINT


rEXTINT1 &= ~(7|(7<<0));       
rEXTINT1 |= (0|(0<<0));        //set eint8 falling edge int

rEINTPEND |= (1<<8);                //clear eint 8
rEINTMASK &= ~(1<<8);        //enable eint8
       
rSRCPND = 0x20;      //请求EINT8-23源挂起
rINTPND = 0x20;      //请求EINT8-23中断挂起
rINTMSK = ~0x20;      //EINT8_23可服务

pISR_EINT8_23 = (U32)Key_ISR; //中断入口函数       
while(1);
return 0;
}

songtao0728 发表于 2011-3-2 10:02:19

在线等待,可以加我MSN,资料里面有~~

kfxy128 发表于 2011-3-23 21:59:05

回复【1楼】songtao0728
-----------------------------------------------------------------------

你加一个MMU的源文件,还有就是你把BIN文件下载到什么地方了;
点击此处下载 ourdev_624898FKJY06.rar(文件大小:110K) (原文件名:key_interrupt.rar)

issaclam 发表于 2011-8-25 19:16:14

看看····顺便学习·····

LK9286 发表于 2012-1-12 00:36:34

搞定了么?
页: [1]
查看完整版本: mini2440 裸机测试外部中断进不了中断