Request for Simplified Sample Code for FlexCAN and CAN FD on RT1170EVKB Board for MCUXpresso IDE

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

Request for Simplified Sample Code for FlexCAN and CAN FD on RT1170EVKB Board for MCUXpresso IDE

456 Views
Govind89
Contributor I
 
I am a beginner with the RT1170 controller. We have an RT1170EVKB board and need a simple sample source code for FlexCAN and CAN FD for the MCUXpresso IDE. The provided examples are difficult for me to understand. Could you please provide simple source code? This will help me study and better understand the default sample code.
 

Thank you

0 Kudos
Reply
3 Replies

440 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

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)

Gavin_Jia_0-1718357423500.png

Import the SDK in MCUXpressoIDE and then import the demos you need:

Gavin_Jia_1-1718357528800.png

Or use Keil/IAR to open the extracted project.

 

Best regards,
Gavin

 

0 Kudos
Reply

426 Views
Govind89
Contributor I

Thank you for your response. I have already reviewed the examples provided. However, could you please supply basic beginner-level source code for CAN?

0 Kudos
Reply

386 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

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

Gavin_Jia_0-1718617216043.png