周工及各位前辈,我在使用arm2100实验板做向量中断实验是,出现了下面的一个症状,如果将主程序的while(1);这句里面加一条别的语句,例如while(1){IO0SET=0x03c00000;};结果就不能跳转到相应的中断处理程序,请众位帮忙。具体的程序如下:
#include "config.h"
#define LED1CON (1<<22) #define LED4CON (1<<25)
void __irq IRQ_Eint0(void) { uint32 i;
i = IO0SET; if( (i&LED1CON)==0 ) { IO0SET = LED1CON; } else { IO0CLR = LED1CON; } EXTINT = 0x01; VICVectAddr = 0x00; }
void __irq IRQ_Eint3(void) { uint32 i;
i = IO0SET;
if( (i&LED4CON)==0 ) { IO0SET = LED4CON; } else { IO0CLR = LED4CON; } EXTINT = 0x08; VICVectAddr = 0x00; }
/
int main(void) { PINSEL0 = 0x00000000; PINSEL1 = 0x00000301;
IO0DIR = LED1CON|LED4CON|0x03c00000;
EXTMODE = 0x0F; EXTPOLAR = 0x00; VICIntSelect = 0x00000000; VICVectCntl0 = 0x20|14; VICVectAddr0 = (int)IRQ_Eint0; VICVectCntl1 = 0x20|17; VICVectAddr1 = (int)IRQ_Eint3; EXTINT = 0x09; VICIntEnable = (1<<14)|(1<<17); while(1); {IO0CLR=0x03c00000;}; //问题就出在这里
return(0); } |