AnsweredAssumed Answered

S32K146 CAN problem

Question asked by 张 舜毅 on Jan 12, 2020
Latest reply on Jan 14, 2020 by Alexandru Nan

can initialize:

 

PINS_DRV_SetMuxModeSel(PORTC, ePIN_17, PORT_MUX_ALT3); 
PINS_DRV_SetMuxModeSel(PORTC, ePIN_16, PORT_MUX_ALT3); 
CAN_Init(&can3_pal_instance, &can3_pal_Config0);
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);

 

Send function:

/* Configure TX buffer with index TX_MAILBOX*/
CAN_ConfigTxBuff(&can3_pal_instance, eCAN2_TX_BOX, &buffCfg);

status = CAN_Send(&can3_pal_instance, eCAN2_TX_BOX, &sendMsg);

 

Receive function:

/* Start receiving data in RX_MAILBOX. */
CAN_Receive(&can1_pal_instance, eCAN0_RX_BOX, &canRxMsg);

 

My hardware is:

 

 

 

hello SDK:

when I use CAN_h\CAN_l frequently, the program always enters "DefaultISR", or CAN receive buffer cannot enter "FLEXCAN_MB_IDLE", which is always busy.Therefore, the original CAN was sent normally, but now CAN CAN no longer restore the original sending state.Can can resume working only through software reset or power-on reset.Why is that?How to solve this problem?

 

Outcomes