MY CAN code is not working , anyone have any idea
CAN1TIER = 0x07;
//CAN1TFLG =CAN1TFLG_TXE0_MASK;
CAN1TFLG = 0x01;
CAN1TXTBPR = 0x01;
CAN1TXDLR = 0x08;
CAN1TXIDR3 = 0x00;
CAN1TXIDR2 = 0x00;
CAN1TXIDR1 = 0x00;
CAN1TXIDR0 = 0xFF; //SID
CAN1TXDSR0 = 0xFF; //DATA
CAN1TXDSR1 = 0xFF;
CAN1TXDSR2 = 0xFF;
CAN1TXDSR3 = 0x00;
CAN1TXDSR4 = 0x00;
CAN1TXDSR5 = 0x00;
CAN1TXDSR6 = 0x00;
CAN1TXDSR7 = 0x00;
Well, from that portion of code it is not possible to find out why it's not working.
The most probably CAN initializtion is not correctly done, or maybe (Tx/Rx) interrupts have no definition.
From the link below you can download S12X pack of example in which two are for the CAN. You can use that as a reference:
Regards,
iggi