AnsweredAssumed Answered

S32K146 CAN receive problem

Question asked by 张 舜毅 on Jan 14, 2020
Latest reply on Feb 24, 2020 by 张 舜毅
  • My CAN initializes:

CAN_Init(&can3_pal_instance, &can3_pal_Config);
CanSetRate(canNum, rate);
/* Configure Rx message buffer with index 1 to receive frames with ID 2 */
CAN_ConfigRxBuff(&can3_pal_instance, eCAN2_RX_BOX, &RcvInfo, RX_MSG_ID);//eCAN2_RX_BOX =5,RX_MSG_ID =2
//CAN_Receive(&can3_pal_instance, eCAN2_RX_BOX, &canRxInfo);
CAN_InstallEventCallback(&can3_pal_instance, (can_callback_t)Can2_RxCallBack, NULL);

CAN_Receive(&can3_pal_instance, eCAN2_RX_BOX, &canRxInfo);


void Can2_RxCallBack(uint8_t instance, can_event_t eventType, uint32_t buffIdx, void *driverState)
   case CAN_EVENT_RX_COMPLETE://The program didn't go in here






  • The function is called in one period(2ms)

CAN_Receive(&can3_pal_instance, eCAN2_RX_BOX, &canRxMsg);



  • I want to configure my CAN to be an ID that CAN receive any extended frame data, but my CAN receive function has not received any data. Is there any problem with the initialization of CAN?How to improve it?

  • I have used all three CAN of S32K146, but until now I still don't know how to configure the MB of S32K146, could you explain it to me?Maybe my question has something to do with it.CAN receive and send mailboxes must be separate or CAN use the same.