AnsweredAssumed Answered

Always loopbacking the CAN send messages

Question asked by Dileep Divakaran on Jun 2, 2019
Latest reply on Jun 12, 2019 by Dileep Divakaran

Hi,

 

I am working with CAN interface in FRDM KW36 board. The basic functionalities of CAN( TX and RX ) is working. But whenever I send the message to the CAN is loop-backing. I disabled the loop-back configuration, but still it is loop-backing.I don'k know why its behaving like. Please help me to figure out the issue.

 

 

here is my initialization code snippet.

 

flexcan_config_t flexcan_config;

FLEXCAN_GetDefaultConfig(&flexcan_config);
flexcan_config.enableLoopBack = false;
flexcan_config.baudRate = CAN_BITRATE;
flexcan_config.enableSelfWakeup = true;
flexcan_config.clkSrc = kFLEXCAN_ClkSrcPeri;


if (can_initialised)
      FLEXCAN_Deinit(DEVICE_CAN);

 

FLEXCAN_Init(CAN0, &flexcan_config, CAN_CLK_FREQ);

FLEXCAN_TransferCreateHandle(DEVICE_CAN, &can_handle, __dal_can_driver_callback, NULL);
FLEXCAN_SetTxMbConfig(DEVICE_CAN, TX_MESSAGE_BUFFER_NUM_CAN, true);
FLEXCAN_SetRxFifoGlobalMask(DEVICE_CAN, FLEXCAN_RX_MB_STD_MASK(0, 0, 0));
FLEXCAN_SetRxFifoConfig(DEVICE_CAN, &rx_fifo_config, true);

Outcomes