Failed to request PPS GPIO on Nvidia Jetson Orin Nano Dev board

Issue Overview

Users of the Nvidia Jetson Orin Nano Dev board are experiencing difficulties when attempting to configure and use the Pulse Per Second (PPS) GPIO functionality. The specific problem occurs when connecting a GNSS module’s PPS pin to the Jetson Orin Nano Devkit and configuring the device tree. Users encounter an error message indicating a failure to request the PPS GPIO, which prevents proper functionality of the PPS feature.

The error message appears in the system logs as follows:

[    4.404332] pps-gpio pps: failed to request PPS GPIO
[    4.409427] pps-gpio: probe of pps failed with error -22

This issue affects users trying to implement precise timing applications or those requiring accurate synchronization with GPS/GNSS modules.

Possible Causes

  1. Incorrect GPIO Configuration: The default configuration of the GPIO pin (GPIO09) on the 40-pin header may not be suitable for PPS functionality.

  2. Device Tree Misconfiguration: The device tree overlay might not be correctly set up to enable the PPS GPIO functionality.

  3. Kernel Module Loading Order: The order in which kernel modules are loaded could affect the initialization of the PPS GPIO driver.

  4. Hardware Connectivity Issues: Improper physical connection between the GNSS module’s PPS pin and the Jetson Orin Nano Devkit could lead to communication failures.

  5. Conflicting Driver Usage: Another driver might be attempting to use the same GPIO pin, causing a resource conflict.

Troubleshooting Steps, Solutions & Fixes

  1. Verify GPIO Configuration:

    • Check the current GPIO configuration using the following command:
      sudo cat /sys/kernel/debug/gpio | grep PAC.06
      
    • Ensure that the output shows the correct GPIO (PAC.06) is available.
  2. Review Pinmux Configuration:

    • Examine the pinmux spreadsheet for the Orin Nano/NX.
    • Verify that GPIO09 is configured as an input, which should be suitable for PPS signals.
  3. Modify Kernel Configuration:

    • Change the PPS GPIO module from built-in to loadable in the kernel’s defconfig file:
      diff --git a/kernel/kernel-5.10/arch/arm64/configs/defconfig b/kernel/kernel-5.10/arch/arm64/configs/defconfig
      index ce9f3e0a7..2c735f855 100644
      --- a/kernel/kernel-5.10/arch/arm64/configs/defconfig
      +++ b/kernel/kernel-5.10/arch/arm64/configs/defconfig
      @@ -752,7 +752,7 @@ CONFIG_SPI_SPIDEV=m
       CONFIG_SPI_TLE62X0=m
       CONFIG_SPMI=m
       CONFIG_PPS_DEBUG=y
      -CONFIG_PPS_CLIENT_GPIO=y
      +CONFIG_PPS_CLIENT_GPIO=m
       CONFIG_PINCTRL_TEGRA186_DPAUX=y
       CONFIG_PINCTRL_TEGRA234_DPAUX=y
       CONFIG_PINCTRL_SINGLE=y
      
    • This change allows the module to be loaded separately, potentially resolving dependency issues.
  4. Rebuild and Flash the Kernel:

    • After modifying the kernel configuration, rebuild the kernel and flash it to the Jetson Orin Nano Dev board.
  5. Verify PPS Functionality:

    • After applying the changes and rebooting, check the system logs for PPS initialization:
      sudo dmesg | grep pps
      
    • Look for output similar to:
      [    1.595449] pps_core: LinuxPPS API ver. 1 registered
      [    1.600411] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
      [   13.202710] pps_core: source pps.-1 got cdev (245:0)
      [   13.202716] pps pps0: new PPS source pps.-1
      [   13.218508] pps pps0: Registered IRQ 297 as PPS source
      
    • This output indicates successful PPS GPIO initialization.
  6. Debug PPS GPIO Setup:

    • If issues persist, investigate the pps_gpio_setup() function in the pps-gpio.c file to understand why the pin request is failing.
  7. Check for Conflicting Drivers:

    • Ensure no other drivers are attempting to use the same GPIO pin.
    • Review the device tree and kernel configuration for any potential conflicts.
  8. Verify Physical Connections:

    • Double-check the wiring between the GNSS module’s PPS pin and the Jetson Orin Nano Devkit.
    • Ensure proper grounding and signal integrity.

By following these steps, users should be able to resolve the PPS GPIO request failure on the Nvidia Jetson Orin Nano Dev board and successfully implement PPS functionality for precise timing applications.

Similar Posts

Leave a Reply

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