AnsweredAssumed Answered

CAN reciever interrupt flage problem

Question asked by KDN NANDU on Jan 1, 2015
Latest reply on Jan 3, 2015 by KDN NANDU

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[8],u8Length=8;

   

    unsigned int R,temp;

   

    LCD_Cmd(0x80);

 

     R = CAN1RXDSR0;

    

       

    

         Convert(R);

         LCD_Data(D);

         delay();

         LCD_Data(C);

         delay();

         LCD_Data(B);

         delay();;

         LCD_Data(A);

         delay();

                       

      PORTA = 0xFF;

    

        

      CAN1RFLG_RXF = 1;

}

Outcomes