Hi,
I am trying to send and receive CAN packets between my MKV11Z64 and a custom CAN device. I disabled ID filtering, so I am receiving every packet coming from the CAN line. But the problem is I also receive the packets that I transmitted. I just want to receive the packets sent from the other device.
I attached the file that contains my CAN configurations. The echo mode is already disabled by the way.
Solved! Go to Solution.
Hi Abdullah,
Please check the value of CANx_MCR[SRXDIS]
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Abdullah,
Please check the value of CANx_MCR[SRXDIS]
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Robin,
Thank you for your answer. I set the SRXDIS bit to 1 as you suggested. Below is the snippet for reference who finds this post. I needed to do it in FLEXCAN_Init() function in the fsl_flexcan.c file. Otherwise, it didn't work outside of this function.
mcrTemp |= (1 << 17); //disable self reception (CANx_MCR SRXDIS=1)
/* Save MCR Configuation. */
base->MCR = mcrTemp;