AnsweredAssumed Answered

MPC 5777M CAN ISR function

Question asked by yalamanda dosakyala on Dec 1, 2016

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.

Outcomes