哪位用过ECAN的中断,我想实现在中断里读数据,但是接收中断一直进不去,哪位帮忙看下,小弟先行谢过了以下是我对中断的配置
InitPieCtrl();
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable();
EALLOW;
PieVectTable.ECAN0INTB = &REXCANB;
EDIS;
IER |= M_INT9;
PieCtrlRegs.PIEIER9.bit.INTx7 = 1;
EINT;
ERTM;
ECanbRegs.CANMIM.all = 0xFFFFFFFF;
下面是中断程序
interrupt void REXCANB(void)
{
ECanbMboxes.MBOX0.MDL.all = ECanbMboxes.MBOX16.MDL.all;
ECanbMboxes.MBOX0.MDH.all = ECanbMboxes.MBOX16.MDH.all;
ECanbRegs.CANTRS.all = 0x00000001;
while(ECanbRegs.CANTA.all != 0x00000001 ) {}
ECanbRegs.CANTA.all = 0x00000001;
} |