MPC 5777M CAN ISR function

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC 5777M CAN ISR function

573 Views
yalamandadosaky
Contributor V

Hi All , I am writing CAN Driver for mpc5777m , that is MCAN driver.I am unable to come out of interrupt routine which handles the interrupts bit (TC) Transmission completed or Receive buffer is full. For this I am enabled the

 

For Trasmission

    M_CAN_1.TXBTIE.B.TIE = 1;                 // Tx Buffer Transmission Interrupt Enable

     M_CAN_1.IE.B.TCE = 1;                      // Transmission Completed Interrupt Enable

ISR function

void MCAN_ISR(void)

{

if (M_CAN_1.IR.B.TC == 1)                //Is interrupt because transmission completed
    {
        M_CAN_1.IR.R = 0x200;      // clear interrupt flag.

------   doing something----

     }

}

Control is not coming out when even TC is 0 i.e it is inside ISR function always.

Labels (1)
Tags (1)
0 Kudos
0 Replies