请教为何进不了IRQ中断,中断IRQ不响应,程序不会跳转到 LDR PC, [PC, #-0x0FF0] ; 检查VICIRQStatus 有中断产生(00000400),中断是SPI0
我的配置程序如下.
void InitSet(void)
{
unsigned long setbit;
VICSoftInt = 0x0;
setbit = 0x08480;
VICProtection = 0x00; //0:VIC 寄存器可在用户模式或特权模式下访问。
//1:VIC 寄存器只能在特权模式下访问。
VICVectCntl0 = 0x20 | VECTOR_INIT_SPI0;
VICVectCntl1 = 0x20 | VECTOR_INIT_UART1;
VICVectCntl2 = 0x20 | VECTOR_INIT_EINT1;
/*
VICVectCntl3 = 0x20 | INIT_TIMER0;
VICVectCntl4 = 0x20 | VECTOR_INIT_USB;
VICVectCntl5 = 0x20 | INITx;
VICVectCntl6 = 0x20 | INITx;
VICVectCntl7 = 0x20 | INITx;
VICVectCntl8 = 0x20 | INITx;
VICVectCntl9 = 0x20 | INITx;
VICVectCntl10 = 0x20 | INITx;
VICVectCntl11 = 0x20 | INITx;
VICVectCntl12 = 0x20 | INITx;
VICVectCntl13 = 0x20 | INITx;
VICVectCntl14 = 0x20 | INITx;
VICVectCntl15 = 0x20 | INITx;
*/
VICVectAddr0 = (unsigned long)Isr_Spi0;
VICVectAddr1 = (unsigned long)Isr_Uart1;
VICVectAddr2 = (unsigned long)Isr_EINT1;
/*
VICVectAddr3 = ;
VICVectAddr4 = ;
VICVectAddr5 = ;
VICVectAddr6 = ;
VICVectAddr7 = ;
VICVectAddr8 = ;
VICVectAddr9 = ;
VICVectAddr10 = ;
VICVectAddr11 = ;
VICVectAddr12 = ;
VICVectAddr13 = ;
VICVectAddr14 = ;
VICVectAddr15 = ;
VICVectAddr15 = ;
*/
VICDefVectAddr= (unsigned long)Isr_Def;
VICVectAddr = 0;
VICIntSelect = 0x00; //中断类型选择 全选择 IRQ 中断
VICIntEnable = setbit; //开中断
}
|
|