共2条
1/1 1 跳转至页
44B0 44B0中断有问题,高手请进
问
买了个44B0开发板,能够跑起来,但一开中断,就跳到了HaltUndef,程序如下,请指点迷津。
void Isr_Init(void)
{
int i;
pISR_UNDEF=(unsigned)HaltUndef;
pISR_SWI =(unsigned)HaltSwi;
pISR_PABORT=(unsigned)HaltPabort;
pISR_DABORT=(unsigned)HaltDabort;
pISR_EINT4567=(unsigned)HaltEINT4567;
//_RAM_STARTADDRESS=0X0C000000
for(i=_RAM_STARTADDRESS;i<(_RAM_STARTADDRESS+0x20);i+=4)
{
*((volatile unsigned *)i)=0xEA000000+0x1FFE;//the ISR startaddress is 0x8000
}
rINTCON=0x1; // Vectored Int. IRQ enable,FIQ disable
//rINTCON=0x5; // Non-vectored,IRQ enable,FIQ disable
rINTMOD=0x0; // All=IRQ mode
rINTMSK=0x7ffffff;//All interrupt is masked.
rINTMSK=rINTMSK&(~BIT_GLOBAL)&(~BIT_EINT4567); // enable enit4567
EnableInterrupt();
}
void HaltEINT4567()
{ int32 i;
rI_ISPC=BIT_EINT4567;
//while(1);
/* while(1)
{ for(i=0;i<2660000;i++)
rPDATC&=0xfff1;
for(i=0;i<2660000;i++)
rPDATC|=0xe;
}*/
}
void HaltUndef(void)
{
Uart_Printf("Undefined instruction exception!!!\n");
while(1);
}
一触发外部4567中断,就跳到void HaltUndef(void),但如我在中断加一个死循环,就没有问题,从中断跳出来,会有什么问题呢?请给指点一下。谢了 答 1: ...void __irq ISR_EINT4567 (void) 答 2: to sjnh这么做是NON-VECTOR还是VECTOR中断?
void Isr_Init(void)
{
int i;
pISR_UNDEF=(unsigned)HaltUndef;
pISR_SWI =(unsigned)HaltSwi;
pISR_PABORT=(unsigned)HaltPabort;
pISR_DABORT=(unsigned)HaltDabort;
pISR_EINT4567=(unsigned)HaltEINT4567;
//_RAM_STARTADDRESS=0X0C000000
for(i=_RAM_STARTADDRESS;i<(_RAM_STARTADDRESS+0x20);i+=4)
{
*((volatile unsigned *)i)=0xEA000000+0x1FFE;//the ISR startaddress is 0x8000
}
rINTCON=0x1; // Vectored Int. IRQ enable,FIQ disable
//rINTCON=0x5; // Non-vectored,IRQ enable,FIQ disable
rINTMOD=0x0; // All=IRQ mode
rINTMSK=0x7ffffff;//All interrupt is masked.
rINTMSK=rINTMSK&(~BIT_GLOBAL)&(~BIT_EINT4567); // enable enit4567
EnableInterrupt();
}
void HaltEINT4567()
{ int32 i;
rI_ISPC=BIT_EINT4567;
//while(1);
/* while(1)
{ for(i=0;i<2660000;i++)
rPDATC&=0xfff1;
for(i=0;i<2660000;i++)
rPDATC|=0xe;
}*/
}
void HaltUndef(void)
{
Uart_Printf("Undefined instruction exception!!!\n");
while(1);
}
一触发外部4567中断,就跳到void HaltUndef(void),但如我在中断加一个死循环,就没有问题,从中断跳出来,会有什么问题呢?请给指点一下。谢了 答 1: ...void __irq ISR_EINT4567 (void) 答 2: to sjnh这么做是NON-VECTOR还是VECTOR中断?
共2条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |