How can I enable the CAN BUS on my NVIDIA Jetson devkit while using ZED X or ZED X One GMSL2 cameras?

When you install the Stereolabs GMSL2 driver on an NVIDIA Jetson devkit to work with ZED X or ZED X One cameras, the default device tree is modified to remap and enable the GPIO signals required to driver the GMSL2 capture card.

If your application relies on enabled CAN BUS, you cannot use NVIDIA's Jetson-IO tool to configure the GPIO ports and enable the CAN BUS. This is because it would overwrite the device tree configuration set by the Stereolabs GMSL2 driver installer, which would stop the GMSL2 capture card from working.

You can manually enable the CAN BUS by using the following commands:

sudo apt-get install busybox
sudo busybox devmem 0x0c303018 w 0x458 # CAN 0 din
sudo busybox devmem 0x0c303010 w 0x400 # CAN 0 dout
sudo busybox devmem 0x0c303008 w 0x458 # CAN 1 din
sudo busybox devmem 0x0c303000 w 0x400 # CAN 1 dout

For more information, please refer to the official NVIDIA documentation.