I am using CAN module of MC9S12XHZ512 microcontroller, I successfully archive transmitting of data from my microcontroller, but problem is that I am able to receive data only one time after that my controller get hang, I think that I have not clear my CAN receiver interrupt flag, can anyone tell me where I can get CAN receiver interrupt flag in datasheet, I post my interrupt code for CAN below. Do MC9S12XHZ512 compiler support sprintf function.
#pragma CODE_SEG __NEAR_SEG NON_BANKED
interrupt void Vcan1RxISR(void)
unsigned char RxBuffer,u8Length=8;
unsigned int R,temp;
R = CAN1RXDSR0;
PORTA = 0xFF;
CAN1RFLG_RXF = 1;