此问题我已经解决了,分享一下:
void Can_IRQHandler(void)
{
if(TRUE == CAN_Irq**Get(CanRxIrq**))
{
CAN_Irq**Clr(CanRxIrq**);
CAN_IrqCmd(CanRxIrqEn, FALSE);
CAN_Receive(&stcRxFrame);
u8RxFlag = TRUE;
}
if(TRUE == CAN_Irq**Get(CanBusErrorIrq**)) /*当总线短路时,进入此中断*/
{
CAN_Irq**Clr(CanBusErrorIrq**);
}
}
|