MPC 5777M CAN ISR function

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC 5777M CAN ISR function

1,101件の閲覧回数
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.

ラベル(1)
タグ(1)
0 件の賞賛
返信
0 返答(返信)