With Jetpack6.0, GPIO08 and 09 cannot consistently pull up or down

In the process of testing Jetpack6.0 version, it is found that the use of the test tool in the link can not control the high and low level of GPIO08 and GPIO09 output.
The program used is the full test program linked below: Control GPIO using the new Linux user space GPIO API

                        can1_stb_pbb0 {
                                nvidia,pins = "can1_stb_pbb0";
                                nvidia,function = "rsvd0";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                //nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };

                        can1_en_pbb1 {
                                nvidia,pins = "can1_en_pbb1";
                                nvidia,function = "rsvd0";
                                //nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                //nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };

After changing nvidia,tristate = <TEGRA_PIN_ENABLE> to nvidia,tristate = <TEGRA_PIN_DISABLE>, you can set the level of the output.

A new problem was encountered, when nvidia,pull = <TEGRA_PIN_PULL_DOWN> or nvidia,pull = <TEGRA_PIN_PULL_NONE>, the output level could not be kept high all the time, the output high level was about 3 seconds, and then the low level would be returned.

When nvidia,pull = <TEGRA_PIN_PULL_UP>, the output level is high by default and cannot be pulled down continuously.

The test program is as follows:
gpio_test.zip (1.7 KB)

Here’s how to use it:

nvidia@tegra-ubuntu:~$ sudo ./gpio_test -w 9 -v 1 /dev/gpiochip1
[sudo] password for nvidia: 
Write value 1 to GPIO at offset 9 (OUTPUT mode) on chip /dev/gpiochip1
nvidia@tegra-ubuntu:~$ sudo ./gpio_test -w 8 -v 1 /dev/gpiochip1
Write value 1 to GPIO at offset 8 (OUTPUT mode) on chip /dev/gpiochip1

The test method is to use the multimeter to measure the voltage between the corresponding pin and the GND after setting the value through the above command.

Have other developers encountered this problem, or what are the solutions?

  1. 任何對pin的狀態的調整都請透過pinmux spreadsheet修改,不要直接調整device tree
  2. user space library對GPIO的操作都是function/program return之後就失效了,這是正常的
    你直接用gpiod的話有一個--mode=wait的選項,要按下ENTER之後程式才會結束,在那之前電壓的變化都會持續,麻煩用這個方法測試

修改的pinmux的问题,而不是device tree,

测试发现,在程序的wait过程中,电平能够持续保持,感谢您的解答。

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.