CAN的接受发送都没有问题,但是错误好像总是进不去,不知道什么原因,请哪位高手帮忙看看,主题程序如下
#pragma CODE_SEG __NEAR_SEG NON_BANKED
void interrupt 38 CAN0RXINT(void)
{
PORTA=0x00;
CAN0RFLG = 0x01; //Clear RXF
}
#pragma CODE_SEG DEFAULT
#pragma CODE_SEG __NEAR_SEG NON_BANKED
void interrupt 37 CAN0ERR(void)
{
PORTA=0xff;
CAN0RFLG=0x02;
}
#pragma CODE_SEG DEFAULT
void main(void)
{
Initdev();
DDRB=0xFF;
PORTB=0x00;
DDRA=0xFF;
PORTA=0xFF;
CAN0RFLG=0x03;
EnableInterrupts;
for(;;);
} |