I need to test CAN bus on jetson Xavier NX, Any information to use CAN on this board will help!
Thanks in advance
As I know, Jetson Xavier NX devkit does not have CAN interface on the board.
If you need that indeed, you may find the 3rd party carrier boards to support it.
NX has one CAN controller interface exposed at port J17 which is a 4 pin header with address
You can connect other boards CAN nodes to this but for that attach an external transceiver to the NX node and use basic commands to make interface up like how it’s done for other Jetson boards.
Let me know if you need more help.
J17 is there!
Board specification doc has J17, but user guide does not.
Noted, will check and get it included in user guide.
Can you elaberote on what exactly you mean by basic commands to make interface up.
- Insert CAN BUS subsystem support module.
- Insert Raw CAN protocol module (CAN-ID filtering)
- Real CAN interface support (for our case, it is: mttcan)
modprobe mttcan (dependent module is can_dev: can driver with netlink support)
- CAN interface settings
ex: ip link set can0 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on
ip link set up can0
- use cansend and candump to send/receive msgs
Okay i will test it out
I followed your steps but I am getting errors:
can: controller area network core (rev 20120528 abi 9)
can: raw protocol (rev 20120528)
mttcan: c31000.mttcan: unable to set CAN_CLK parent
mttcan: c31000.mttcan: probe failed
Can you please try to change kernel dtb getting flashed for Jakku with below changes:
Change only these fields in mttcan node.
pll_source = “pllc”;
clocks = <0x4 0x11c 0x4 0xa 0x4 0x9 0x4 0x13a>;
clock-names = “can_core”, “can_host”, “can”, “pllc”;
Let me know if you face any issues further.
Okay I will try that out
Hi, @shgarg, CAN bus is up now. Thanks for your suggestion.
@shgarg, I faced an issue while testing the CAN interface,
So CAN device on my board has a frequency of 34MHz and the slave device that I am using has a frequency of 40MHz. Hence the data exchange was not taking place.
Is there a way to change this frequency of CAN on board??
Let’s keep one issue one topic, please help to open a new topic. Thanks