SPI Clock Signal Not Present on Jetson Orin Nano Dev Board

Issue Overview

Users are experiencing an issue with the SPI interface on the NVIDIA Jetson Orin Nano Developer Kit. Specifically, when attempting to write data to /dev/spidev0.0 using spi-tools, no clock signal is detected on the SPI0_SCK pin when measured with an oscilloscope. This problem persists even after configuring the pinmux settings.

Possible Causes

  1. Incorrect pinmux configuration
  2. SPI driver not properly loaded or initialized
  3. Hardware issue with the SPI interface
  4. Software bug in the Jetson Linux SDK
  5. Misconfiguration in device tree or boot loader settings

Troubleshooting Steps, Solutions & Fixes

  1. Verify Jetson-IO availability:
    For Jetson Linux 36.3, Jetson-IO should be available. Run the following command:

    sudo /opt/nvidia/jetson-io/jetson-io.py
    

    Use this tool to configure the SPI pinmux settings if available.

  2. Manual pinmux configuration:
    If Jetson-IO is not available, ensure the pinmux is correctly configured:

    • Generate the appropriate dtsi file
    • Replace the following files with the generated dtsi:
      • bootloader/tegra234-mb1-bct-gpio-p3767-dp-a03.dtsi
      • bootloader/generic/BCT/tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi
      • bootloader/generic/BCT/tegra234-mb1-bct-padvoltage-p3767-dp-a03.dtsi
    • Flash the bootloader using:
      ./flash.sh -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit nvme0n1p1
      
  3. Verify SPI driver loading:
    Check if the SPI driver is properly loaded:

    lsmod | grep spi
    

    If not present, load the driver manually:

    sudo modprobe spidev
    
  4. Perform SPI loopback test:
    Short the MISO and MOSI pins, then run the following commands:

    wget https://raw.githubusercontent.com/torvalds/linux/v5.15/tools/spi/spidev_test.c
    gcc -o spidev_test spidev_test.c
    sudo ./spidev_test -D /dev/spidev0.0 -v -p "HelloWorld123456789abcdef"
    

    This test will help determine if the SPI interface is functioning correctly.

  5. Check dmesg output:
    Examine the kernel log for any SPI-related errors or messages:

    dmesg | grep -i spi
    
  6. Verify device tree:
    Ensure that the SPI controller is properly defined in the device tree:

    dtc -I fs /sys/firmware/devicetree/base | grep -i spi -A 10
    
  7. Test GPIO functionality:
    To isolate whether the issue is specific to SPI or a general pin problem:

    • Export the SPI0_SCK pin as GPIO
    • Set it as an output
    • Toggle the pin and verify with an oscilloscope
  8. Update Jetson Linux:
    If possible, try updating to the latest Jetson Linux version, as the issue may have been resolved in a newer release.

  9. Contact NVIDIA Support:
    If the issue persists after trying these steps, it may be necessary to contact NVIDIA support for further assistance, as there could be a hardware issue or a bug in the current SDK version.

Remember to reboot the system after making any changes to pinmux or device tree configurations to ensure the new settings take effect[1].

Similar Posts

Leave a Reply

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