在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
芯片精品文章合集(500篇!) 创芯人才网--重磅上线啦!
查看: 1674|回复: 0

外部中断调试错误,谁能帮改下,不胜感激

[复制链接]
发表于 2009-3-16 21:09:02 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
源程序如下:
#include "def.h"
#include "option.h"
#include "2440addr.h"
#include "2440lib.h"
static void __irq Eint0_ISR(void)
{
    ClearPending(BIT_EINT0);
    Uart_Printf("EINT0  is occurred.\n");
}
static void __irq Eint2_ISR(void)
{
    ClearPending(BIT_EINT2);
    Uart_Printf("EINT2 is occurred.\n");
}
static void __irq Eint11_19_ISR(void)
{
    if(rEINTPEND & (1<<11))
    {  
Uart_Printf("EINT11 is occurred.\n");
rEINTPEND=(1<<11);
    ClearPending(BIT_EINT8_23);
    }
    else if(rEINTPEND & (1<<19))
    {
Uart_Printf("EINT19 is occurred.\n");
rEINTPEND=(1<<19);
    ClearPending(BIT_EINT8_23);
    }
    else
    {
Uart_Printf("others ENTs are occurred\n");
rEINTPEND=0xffffff;
    ClearPending(BIT_EINT8_23);
    }
}

void xmain(void)
{
ChangeClockDivider(3,1);
ChangeMPllValue(127,2,1);  //405MHZ

Isr_Init();
Uart_Init(0, 115200);
Uart_Select(0);
Uart_Printf("the main is running\n");

rGPFCON = (rGPFCON & ~((3<<4)|(3)))|(1<<5)|(1<<1);  //GPF0/2 = EINT0/2
    rGPGCON = (rGPGCON & ~((3<<22)|(3<<6)))|(1<<23)|(1<<7); //GPG3/11 = EINT11/19

rEXTINT0 = (rEXTINT0 & ~(7<<8))|(2<<8); //EINT0/2=falling edge triggered
rEXTINT0 = (rEXTINT0 & ~(7<<0))|(2<<0);
rEXTINT1 = (rEXTINT1 & ~(7<<12))|(0x2<<12); //EINT11=falling edge triggered
rEXTINT2 = (rEXTINT2 & ~(7<<12))|(0x2<<12); //EINT19=falling edge triggered

    pISR_EINT0=(U32)Eint0_ISR;
    pISR_EINT2=(U32)Eint2_ISR;
    pISR_EINT8_23=(U32)Eint11_19_ISR;


rEINTPEND = 0xffffff;
    rSRCPND |= BIT_EINT0|BIT_EINT2|BIT_EINT8_23; //to clear the previous pending states
    rINTPND |= BIT_EINT0|BIT_EINT2|BIT_EINT8_23;
   
    rEINTMASK=~( (1<<11)|(1<<19) );
    rINTMSK=~(BIT_EINT0|BIT_EINT2|BIT_EINT8_23);
   
    while(1)
    {
    Uart_Printf("the main is running\n");
    Delay(100000);
    }
}

出现错误如下:
runDummy_isr error, interrupt number: 0, INTMSK = 0xffffffda

我分析了错误原因可能是可能就是CPSR程序状态寄存器的ISQ中断位没开,但是我的库函数文件里没有开启那个位的函数。我不会改,谁能帮我改一下,或者谁有好用的带中断的程序给我一个,我是S3C2440的芯片开发板不胜感激!!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-6-27 03:00 , Processed in 0.112602 second(s), 10 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表