Jetson Orin Nano CAN Bus Communication Issue
Issue Overview
Users are experiencing difficulties with CAN bus communication on the Jetson Orin Nano developer kit. The specific problem is that the CAN bus only functions correctly in loopback mode, but fails to transmit or receive data when loopback mode is disabled. This issue occurs during the setup and testing of CAN bus functionality, impacting the ability to communicate with external CAN devices.
Key observations:
- CAN bus works successfully in loopback mode
- Data cannot be sent out when loopback mode is disabled
- External CAN analyzer can receive data from Jetson in loopback mode, but cannot transmit to it
- In non-loopback mode, the external analyzer cannot receive any data from the Jetson
This problem significantly limits the practical use of the CAN bus interface on the Jetson Orin Nano, as it prevents normal bidirectional communication with other CAN devices.
Possible Causes
-
Hardware configuration issues:
- Incorrect wiring or connection between the Jetson Orin Nano and the CAN transceiver (SN65HVD230)
- Faulty CAN transceiver or connection issues
-
Software configuration problems:
- Improper driver initialization or configuration
- Incorrect CAN bus parameters (e.g., bitrate, sampling point)
-
Kernel module issues:
- Incompatibility between the loaded CAN kernel modules and the hardware
- Outdated or buggy kernel modules
-
Pin multiplexing (pinmux) configuration errors:
- Incorrect register settings for CAN pins
-
Power supply issues:
- Insufficient power supply to the CAN transceiver
-
Termination resistor problems:
- Missing or incorrect termination resistors on the CAN bus
-
Firmware or BIOS issues:
- Outdated or incompatible firmware affecting CAN controller functionality
Troubleshooting Steps, Solutions & Fixes
-
Verify hardware connections:
- Double-check the wiring between the Jetson Orin Nano and the SN65HVD230 CAN board
- Ensure proper grounding and power supply to the CAN transceiver
-
Confirm pinmux settings:
- Verify the correct pinmux register settings using the following commands:
sudo busybox devmem 0x0c303018 w 0xc458 sudo busybox devmem 0x0c303010 w 0xc400
- Verify the correct pinmux register settings using the following commands:
-
Load and verify CAN kernel modules:
- Ensure all necessary modules are loaded:
sudo modprobe can sudo modprobe can_raw sudo modprobe can_dev sudo modprobe mttcan
- Check if modules are loaded correctly:
lsmod | grep can
- Ensure all necessary modules are loaded:
-
Configure CAN interface without loopback:
- Set up the CAN interface with loopback mode off:
sudo ip link set can0 type can bitrate 500000 loopback off sudo ip link set can0 up
- Set up the CAN interface with loopback mode off:
-
Test CAN communication:
- Try sending a message:
cansend can0 601#40.60.40.00.01.00.00.02
- Monitor CAN traffic:
candump -x any
- Try sending a message:
-
Check CAN controller configuration:
- Examine the mttcan_controller_config settings:
sudo cat /sys/kernel/debug/mttcan/mttcan0/register_dump
- Look for the "ctrlmode" value and ensure it’s set to 0 for normal operation
- Examine the mttcan_controller_config settings:
-
Verify termination resistors:
- Ensure proper 120Ω termination resistors are in place at both ends of the CAN bus
-
Update Jetson software:
- Check for and apply any available updates for the Jetson Orin Nano, including NVIDIA JetPack and L4T (Linux for Tegra) updates
-
Examine kernel logs:
- Look for CAN-related errors or warnings:
dmesg | grep -i can
- Look for CAN-related errors or warnings:
-
Test with different bitrates:
- Try configuring the CAN bus with different bitrates (e.g., 250000, 1000000) to rule out timing issues
-
Use oscilloscope for signal analysis:
- If available, use an oscilloscope to examine the CAN_H and CAN_L signals for proper differential signaling
-
Consult NVIDIA documentation:
- Review the official NVIDIA Jetson Linux Developer Guide for any CAN-specific troubleshooting steps or known issues
-
Consider alternative CAN hardware:
- If possible, test with a different CAN transceiver to rule out hardware-specific issues
-
Seek community support:
- Post detailed information about your setup, including hardware connections, software versions, and troubleshooting steps taken, on the NVIDIA Developer Forums for additional assistance
If the issue persists after trying these steps, it may indicate a more complex problem requiring further investigation or possibly a hardware defect. In such cases, contacting NVIDIA support directly or seeking assistance from experienced Jetson developers might be necessary.