Always loopbacking the CAN send messages

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Always loopbacking the CAN send messages

1,120 Views
dileep_divakara
Contributor I

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);

0 Kudos
Reply
2 Replies

988 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Dileep Divakaran,

Please check the configuration of CAN_MCR[SRXDIS].

SRXDIS.png

CAN_MCR[SRXDIS].png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

988 Views
dileep_divakara
Contributor I

Thanks Robin Shen.

It worked. Now I am able to disable the CAN loop-back

0 Kudos
Reply