Thank you
Hi @Govind89 ,
Thanks for your interest in NXP MIMXRT series!
Example demos for both FlexCAN and CANFD are present in the SDK. You can build and download the SDK here:Select Board | MCUXpresso SDK Builder (nxp.com)
Import the SDK in MCUXpressoIDE and then import the demos you need:
Or use Keil/IAR to open the extracted project.
Best regards,
Gavin
Thank you for your response. I have already reviewed the examples provided. However, could you please supply basic beginner-level source code for CAN?
Hi @Govind89 ,
The FlexCAN routines provided with the SDK, include two types, one is self-sending and self-receiving loopback, and the other is sending/receiving data frames from the CAN bus. If you are referring to the second type and need to build a CAN bus network, it is best to have a CAN protocol analyzer. This will allow you to see the data transmitted on the CAN bus.
A transmitting node on the CAN bus, if it sends a data frame out and there is no answer on the bus, it will continue to send the same data frame until the error accumulates to 255 and the bus freezes the node. So it is recommended to debug the CAN code and configure a CAN protocol analyzer that will make the CAN bus node send a data frame and always get an answer frame.
Starting with the simplest loopback should be a nice start.
Best regards,
Gavin