How to set up CANFD Communication in I.MX93 MPU

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to set up CANFD Communication in I.MX93 MPU

1,560件の閲覧回数
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 件の賞賛
返信
17 返答(返信)

1,499件の閲覧回数
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 件の賞賛
返信

1,483件の閲覧回数
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 件の賞賛
返信

1,471件の閲覧回数
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 件の賞賛
返信

1,416件の閲覧回数
Kunal_Gettobyte
Contributor III

Hi Daniel,

 

Any kind if update you can give!

 

 

0 件の賞賛
返信

1,375件の閲覧回数
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 件の賞賛
返信

1,297件の閲覧回数
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.

 

 

 

タグ(2)
0 件の賞賛
返信

1,294件の閲覧回数
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 件の賞賛
返信

1,285件の閲覧回数
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 件の賞賛
返信

1,278件の閲覧回数
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 件の賞賛
返信

1,292件の閲覧回数
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 件の賞賛
返信

1,287件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

CAN analyzer tool should also work

0 件の賞賛
返信

1,363件の閲覧回数
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 件の賞賛
返信

1,335件の閲覧回数
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 件の賞賛
返信

1,323件の閲覧回数
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 件の賞賛
返信

1,305件の閲覧回数
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 件の賞賛
返信

1,325件の閲覧回数
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 件の賞賛
返信

1,451件の閲覧回数
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??

タグ(2)
0 件の賞賛
返信