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

  1. Hardware configuration issues:

    • Incorrect wiring or connection between the Jetson Orin Nano and the CAN transceiver (SN65HVD230)
    • Faulty CAN transceiver or connection issues
  2. Software configuration problems:

    • Improper driver initialization or configuration
    • Incorrect CAN bus parameters (e.g., bitrate, sampling point)
  3. Kernel module issues:

    • Incompatibility between the loaded CAN kernel modules and the hardware
    • Outdated or buggy kernel modules
  4. Pin multiplexing (pinmux) configuration errors:

    • Incorrect register settings for CAN pins
  5. Power supply issues:

    • Insufficient power supply to the CAN transceiver
  6. Termination resistor problems:

    • Missing or incorrect termination resistors on the CAN bus
  7. Firmware or BIOS issues:

    • Outdated or incompatible firmware affecting CAN controller functionality

Troubleshooting Steps, Solutions & Fixes

  1. 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
  2. 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
      
  3. 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
      
  4. 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
      
  5. Test CAN communication:

    • Try sending a message:
      cansend can0 601#40.60.40.00.01.00.00.02
      
    • Monitor CAN traffic:
      candump -x any
      
  6. 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
  7. Verify termination resistors:

    • Ensure proper 120Ω termination resistors are in place at both ends of the CAN bus
  8. Update Jetson software:

    • Check for and apply any available updates for the Jetson Orin Nano, including NVIDIA JetPack and L4T (Linux for Tegra) updates
  9. Examine kernel logs:

    • Look for CAN-related errors or warnings:
      dmesg | grep -i can
      
  10. Test with different bitrates:

    • Try configuring the CAN bus with different bitrates (e.g., 250000, 1000000) to rule out timing issues
  11. Use oscilloscope for signal analysis:

    • If available, use an oscilloscope to examine the CAN_H and CAN_L signals for proper differential signaling
  12. Consult NVIDIA documentation:

    • Review the official NVIDIA Jetson Linux Developer Guide for any CAN-specific troubleshooting steps or known issues
  13. Consider alternative CAN hardware:

    • If possible, test with a different CAN transceiver to rule out hardware-specific issues
  14. 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.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *