Configure the GPIO output to transition from high level to low level ,the falling edge is very slow

Configure the GPIO output to transition from high level to low level ,the falling edge is very slow

How to resolve the slow falling edge of GPIO,please help to check if it is dts configuration problem?

thanks。

the blue wave is GPIO falling edge

This is dts file

tegra234-mb1-bct-pinmux-p3701-0000-a04.zip (4.8 KB)

Not all GPIOs have this issue. The figure below shows the GPIO details.

*** Please note that this reply is generated by LLM automatically ***

The issue of a slow falling edge on a GPIO output can be caused by several factors, including hardware, software, or configuration issues. To troubleshoot this problem on the Jetson AGX Orin, let’s consider the following steps:

  1. Hardware Configuration: Ensure that the GPIO pin is properly configured in the Jetson Orin’s pinmux table. You can refer to the Generating the Pinmux dtsi Files documentation to verify the correct configuration. In your case, you mentioned SOC_GPIO08, which is GPIO3_PB.00. Double-check that the pin is set to the correct mode (e.g., GPIO) and that the E_IO_HV field is disabled.

  2. Software Configuration: Verify that the GPIO pin is properly configured in the device tree source (dts) file. You can check the dts file for the Jetson Orin to ensure that the GPIO pin is set to the correct mode and that the gpio-hog property is not set to “output-high” or “output-low”, which could cause the slow falling edge.

  3. Pinmux Configuration: Ensure that the pinmux configuration is correct. You can use the cat /sys/kernel/debug/gpio command to verify the pinmux configuration. Check that the Pin Direction is set to Bidirectional and that the E_IO_HV field is disabled.

  4. GPIO Driver Configuration: Verify that the GPIO driver is properly configured. You can check the GPIO driver configuration in the kernel source code or in the device tree source file.

  5. RC Filter: If the above steps do not resolve the issue, it’s possible that the slow falling edge is caused by an RC filter on the GPIO pin. You can try adding a pull-down resistor to the GPIO pin to speed up the falling edge.

  6. Check for Interference: If the above steps do not resolve the issue, it’s possible that the slow falling edge is caused by electromagnetic interference (EMI) or other external factors. You can try shielding the GPIO pin or using a different GPIO pin to see if the issue persists.

To compare the configuration with other devices, you can refer to the documentation for other Jetson devices, such as the Jetson Nano or Jetson Xavier. However, keep in mind that the pinmux configuration and GPIO driver configuration may differ between devices.

In terms of dts configuration, you can check the following properties:

  • gpio-hog: Ensure that this property is not set to “output-high” or “output-low”, which could cause the slow falling edge.
  • pinmux: Verify that the pinmux configuration is correct and that the E_IO_HV field is disabled.
  • pin-direction: Ensure that the pin direction is set to Bidirectional.

Here’s an example of a dts configuration for a GPIO pin:

&gpio {
    gpio@0 {
        gpio-hog;
        gpios = <&gpio 8 0>;
        output-high;
    };
};

In this example, the gpio-hog property is set to output-high, which could cause the slow falling edge. You can try removing this property or setting it to a different value to see if it resolves the issue.

In summary, to resolve the slow falling edge of the GPIO output on the Jetson AGX Orin, you should:

  • Verify the hardware configuration and ensure that the GPIO pin is properly configured in the pinmux table.
  • Check the software configuration and ensure that the GPIO pin is properly configured in the device tree source file.
  • Verify the pinmux configuration and ensure that the E_IO_HV field is disabled.
  • Check the GPIO driver configuration and ensure that it is properly configured.
  • Try adding a pull-down resistor to the GPIO pin to speed up the falling edge.
  • Check for interference and try shielding the GPIO pin or using a different GPIO pin.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi hebingfeng,

Are you using the devkit or custom board for AGX Orin?
What’s the Jetpack version in use?

As there’re many pins with similar issue, maybe we can check PP.04 first.
It is PIN22 of 40 pins header(J30).
image

How do you configure this pin from pinmux spreadsheet?

GPIO signals on the devkit pass through level-shifting circuits.I can’t measure the signals output from the module directly ,AGX orin covers the signal measurement points.

We found the problem at the front-end of the shift register on our self-designed carrier board

we use jetpack 6.2,

the excel file below is our

pinmux

You can simply measure it from 40 pins header on the devkit.

Do you mean the issue is specific to your custom carrier board?

Sorry that I don’t see any file updated here.
You can simply screenshot the part for the configuration of PP.04(GPIO17) in pinmux spreadsheet

Could you please help provide the GPIO control commands?

I use this command :“sudo gpioset --mode=wait gpiochip0 96=1”. but i cannot measure the signals from pin22 of the header.

below are our pin mux

This is our GPIO dtsi

tegra234-mb1-bct-gpio-p3701-0000-a04.zip (1.6 KB)

PIN22 of 40 pins header is PP.04.
Please simply run the following command to control it.

# gpioset --mode=wait `gpiofind "PP.04"`=1
# gpioset --mode=wait `gpiofind "PP.04"`=0

Please configure Drive 0 or Drive 1 for Req. Initial State. (rather than N/A)

For Jetpack 6.2, you need to apply the following change for this use case.
40hdr - SPI1 gpio padctl register bit[10] effect by gpiod tools in JP6 - #20 by KevinFFF
Or you can simply update to Jetpack 6.2.2(R36.5) which should include the change.

we tried 4 modes, the pin must be configured in pull-down mode . I don’t know why