AnsweredAssumed Answered

MQX + KSDK  +FLEXCAN

Question asked by Prof Programmer on Feb 21, 2016
Latest reply on Feb 29, 2016 by xiangjun.rong

Hello.

I used MK60DN512.

1) How to get date from CAN in interrupt?

2)i need code ..

void canCom1_MbHandler(void)
{
FLEXCAN_DRV_IRQHandler(canCom1_IDX);
if (FLEXCAN_DRV_GetReceiveStatus(canCom1_IDX) == kStatus_FLEXCAN_Succe) {
    FLEXCAN_DRV_RxFifo(canCom1_IDX, &data);
    globalVar= data.data[0];
}

if (FLEXCAN_DRV_GetTransmitStatus (canCom1_IDX) == kStatus_FLEXCAN_Success) {
}

}

 

this code is correct?

Outcomes