DSBOX-NX2 (Rev. 1.1) CANBus Interface Tutorial
1- The pinout of I/O connector
2- Example of an CANBus application
3- Examples of can-utils tools
Hardware: DSBOX-NX2 (Rev. 1.1)
OS: JetPack 4.5 (L4T-32.5)
This blog post is suitable for:
• NVIDIA Jetson Xavier NX SOM with DSBOARD-NX2 (Rev. 1.1) Carrier Board
• DSBOX-NX2 (Rev. 1.1)
In this blog post, we will test the CANBus interface of DSBOX-NX2.
First, let's look at the I/O connector. On the connector, there are 2 pins for CAN Bus and 1 pin for isolated ground. When using CAN Bus always double check which ground pin you are using. You must use digital ground for CAN Bus applications.
To test CAN Bus functionality, we used USB-CAN adapter. Connect that adapter to the USB port of the host PC and install its driver software if necessary. To the other side of the adapter, connect your device’s CAN pins.
On next step, activate CAN drivers and activate CAN interface with “ip link” command. On host side, be sure that you are using same bitrate with your device.
sudo busybox devmem 0xc303000 32 0x0000c400sudo busybox devmem 0xc303008 32 0x0000c450sudo modprobe cansudo modprobe can-rawsudo modprobe mttcansudo ip link set can0 up type can bitrate 500000
Lastly, you can use can-utils tools to communicate.
Use cangen to write random data:
cansend can0 123#1122334455667788
Use cansend to write data:
Use candump to listen bus:
Thank you for reading our blog post.
If you want to get updated on new blog posts, product launches and discounts, you can fill out the form and sign up for our newsletter. By signing up, you can reach various blog posts about AI, deep learning, machine vision, high-speed cameras, and industrial interfaces.
You will receive a "free shipping" code for next purchase immediately.