已经快把我折磨死。。系统是这样的:FPGA送中断信号值外部接口XINT1,DSP响应中断,现在可以在接口上用示波器观察到电平由高变低,但是程序就是进不了中断,求各位大神指教啊。。
void main(void)
{
InitSysCtrl();
InitGpio();
InitPieCtrl();
DINT
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable();
EALLOW;
PieVectTable.XINT1= &local_XINT1_ISR;
EDIS;
EALLOW;
XIntruptRegs.XINT1CR.bit.ENABLE=1;
XIntruptRegs.XINT1CR.bit.POLARITY=0;
EDIS;
IER = M_INT1;
PieCtrlRegs.PIEIER1.all = 1;
EnableInterrupts();
while(1);
}
void EnableInterrupts()
{
PieCtrlRegs.PIECTRL.bit.ENPIE = 1;
PieCtrlRegs.PIEACK.all = 0xFFFF;
EINT;
ERTM;
}
interrupt void local_XINT1_ISR(void)
{
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
KeyVal = *Key_Addr;
asm (" ESTOP0");
for(;;);
}
|