How to set up CANFD Communication in I.MX93 MPU

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

How to set up CANFD Communication in I.MX93 MPU

1,336 Views
Kunal_Gettobyte
Contributor III

I Have got, FRDM I.MX93 Evaluation Board and i want to do CAN FD Communication With it. 
But I am not getting idea and resource's from where I should start and what chronology steps to follow for achieving it.

A chronological step on what thing's to follow would be good to have, as there are so many resource's but in a very scattered way.

 

 

0 Kudos
Reply
17 Replies

1,275 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

 

I would suggest you refer to UM12181:  FRDM i.MX 93 User Manual to idenify CAN-FD pins/connectors , power requirements an jumper settings.

For software,  please refer to MCUXpresso SDK for EVK-IMX93

 

Regards

Daniel

0 Kudos
Reply

1,259 Views
kual_gettobyte
Contributor III

For software MCUExpresso SDK??

I.MX93 is an MPU, so dont we will be using Linux BSP and all at command line for running it's peripheral's.

 

 

0 Kudos
Reply

1,247 Views
danielchen
NXP TechSupport
NXP TechSupport

Yes, you can use Linux BSP and all at command line,  CANDF runs on Cortex A55 core. 

If you use MCUXpresso SDK,  the CAN runs on Cortex M33 core

 

Regards

Daniel

0 Kudos
Reply

1,192 Views
Kunal_Gettobyte
Contributor III

Hi Daniel,

 

Any kind if update you can give!

 

 

0 Kudos
Reply

1,151 Views
danielchen
NXP TechSupport
NXP TechSupport

HI 

I noticed the flexcan2 is enabled by default in device tree

danielchen_0-1749995809887.png

 

could you please verify it at runtime?

dmesg | grep -i can

 

 

0 Kudos
Reply

1,073 Views
Kunal_Gettobyte
Contributor III

When i run command: dmesg | grep -i can, i got following response:

Kunal_Gettobyte_0-1750051145267.png

 

and when i run the command ip link show, i get this response:

Kunal_Gettobyte_1-1750051211888.png

 

so am not able to get?? what is happening here??

CAN0 is initialized by default?? Which CAN Instance is loaded in device tree??

 

My major objective is to run CAN on I.MX93. I want to know what all are the different way's possible to run that and which all software module's/environment i have to set.

 

 

 

Tags (2)
0 Kudos
Reply

1,070 Views
danielchen
NXP TechSupport
NXP TechSupport

yes, can0 is the first enabled instance from Linux perspective.   It is CAN2 interface initialized from IMX93's perspective

You need two boards to test CAN feature,  one for transmitting , and the other for receiving.   

First you need to setup the interface on the two boards.

  $sudo ip link set can0 type can bitrate 500000
  $sudo ip link set can0 up

 

in two terminals 

  • Terminal 1 (listen for CAN messages):    $candump can0

  • Terminal 2 (send a test message):           $cansend can0 1234#abcd

you should see the message appear in terminal 1

0 Kudos
Reply

1,061 Views
Kunal_Gettobyte
Contributor III

So it mean's my CAN peripheral instance from I.MX 93 (FlexCAN2) is their in flashed device tree blob by default

and CAN Interface from Linux perspective(CAN0) is detected and they are mapped to P12 Connector CAN Pin's. 

 

Kindly acknowledge on this understanding!!!

 

But still am not able to get how can i see Device Tree file??

The path which you told to see device tree: kernel-source/arch/arm64/boot/dts/freescale/imx93-11x11-drmd.dts.

 

I need to be run/locate this path via host PC inside Yocto build environment, for I.MX 93??

I need to setup Yocto Build and environment to see device tree?? Correct? Because if i locate this folder via serial terminal or HDMI Screen GUI terminal, i always get no such file or directory: 

 

0 Kudos
Reply

1,054 Views
danielchen
NXP TechSupport
NXP TechSupport

Yes

You can setup an Yocto environment, and build  imx93 frdm bsp according to UG10195

danielchen_0-1750057602422.png

 

0 Kudos
Reply

1,068 Views
Kunal_Gettobyte
Contributor III

So Instead of 2 board's, if i use some CAN Analyzer Tool, Like CAN Innomaker tool. That should also work!??

 

0 Kudos
Reply

1,063 Views
danielchen
NXP TechSupport
NXP TechSupport

CAN analyzer tool should also work

0 Kudos
Reply

1,139 Views
Kunal_Gettobyte
Contributor III

Couple of Question's:

  1. FlexCAN2 of which ARM Cortex?? This FlexCAN2 has pin's out at P12 connector?? Correct!?
  2. Did you run this command: dmesg | grep -i can over Serial Debugging port or normal Linux user space (connecting HDMI screen to I.MX93 and then opening it via GUI terminal window).

 

Also if i want to see DTS file, how can i see?? as with the FRDM Demo Package's their are only DTB file's.

0 Kudos
Reply

1,111 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi @kual_gettobyte :

 

The device tree for imx93 frdm is located under folder

kernel-source/arch/arm64/boot/dts/freescale/imx93-11x11-drmd.dts.

danielchen_0-1750041472344.png

status = "okay"  means this device is enabled by default

0 Kudos
Reply

1,099 Views
Kunal_Gettobyte
Contributor III

Okay, I will just check and update here once again.

 

But just want to clarify couple of more things. This Flexcan2 is headed via P12 connector pins, viq its Pin 8 and 10 respectively? And this flexcan2 is with ARM Cortex A processor?

 

 

0 Kudos
Reply

1,081 Views
danielchen
NXP TechSupport
NXP TechSupport

Yes, from schematics,  pin 8 and pin 10 are connected to CAN_H and Can_L, and Cortex-A can access CAN2 interface.

danielchen_0-1750050543029.png

 

0 Kudos
Reply

1,101 Views
Kunal_Gettobyte
Contributor III

Okay, I check and update here. 

 

Just one more thing for clarification, this flexcan2 pins are mapped to P12 onboard connector..? CANH and CANL pins of this flexcan2 is headed via P12 Pin 8 and Pin 10 pins correct? And it is with coretx a core?

0 Kudos
Reply

1,227 Views
kual_gettobyte
Contributor III

Hi, So the onboard P12 Connector which has CAN Pins is with which processor attached??

 

And I started using FRDM I.MX93, with Linux OS and Yocto. And while i was analyzing device tree, i found that CAN Module is not loaded with by-default device tree loaded in I.MX93 MPU.

 

So how should i enable CAN Module in device tree for I.MX93??

Tags (2)
0 Kudos
Reply