Jetpack6 Control GPIO

Continuing the discussion from How to toggle GPIO pins in Orin nano jetpack 6.0 dynamically:
你好,目前我们手上有一套Orin NX 16G官方套件,刷的是R36.3的系统,现在想测试gpio,通过以上方式并没有控制到gpio,没有量到高低电平的转换。


请问是控制方式有问题吗?
期待得到答复,谢谢!

Hi kepts,

Do you mean that you are using the devkit rather than custom carrier board for Orin NX?

Which GPIO would you like to control? PN.01?
If so, please run the following command instead and measure the signal.

$ sudo su
# gpioset --mode=wait `gpiofind "PN.0`"`=0
# gpioset --mode=wait `gpiofind "PN.0`"`=1

Have you configured this pinmux for this GPIO before use?

感谢回复!

是的,但其实devkit和custom carrier board都尝试过了,我们自己的定制板在R35.4.1系统上确认过可以控制GPIO,但在R36.3上通过上述方法就控制不了。devkit也一样,控制不到。

我们想要控制到PQ.05、PP.06、PCC.00、PCC.02、PG.06、PEE.02、PN.01、PH.00。

$ sudo su
# gpioset --mode=wait `gpiofind "PN.01"`=0
# gpioset --mode=wait `gpiofind "PN.01"`=1

通过上述命令,电平没有发生变化,一直是初始值。

devkit通过jetson-io没有找到可以配置为GPIO的选项,在40pin座子上的几个GPIO没有默认设为GPIO吗?
image
我们自己的定制板有先配置tegra234-mb1-bct-gpio-p3767-hdmi-a03.dtsi,我们目的是想PQ.05、PP.06、PCC.00、PCC.02默认为输入,PG.06、PEE.02、PN.01、PH.00默认为输出,并可以进行测试。
tegra234-mb1-bct-gpio-p3767-hdmi-a03.dtsi.txt (3.5 KB)
是否还需要进行其它配置或操作呢?
因为R35.4.1的系统非常容易就控制到GPIO了,现在R36.3不确定方法是否正确。

Jetson-IO is used to enable the PIN to be used as other functions like CAN, SPI, I2C…etc.

Have you configured them from pinmux spreadsheet before use?

Starting from JP6, you have to configure the pins (which you want to control) as Output or Bi-directional before use.
Many pins are configured as input in pinmux spreadsheet by default.

你好,已经在 tegra234-mb1-bct-gpio-p3767-hdmi-a03.dtsi这里配置了,这个文件是没错的吧?
但是仍然控制不到。

And also tegra234-mb1-bct-pinmux-p3767-hdmi-a03.dtsi.
I would suggest you configure it in pinmux spreadsheet and generate the pinmux/gpio dtsi.

How do you configure them in pinmux spreadsheet?
Do you also modify the board config before flash to apply the change?

你好,这是PG.06、PEE.02、PN.01、PH.00的pinmux配置。

soc_gpio19_pg6 {
		nvidia,pins = "soc_gpio19_pg6";
		nvidia,function = "rsvd1";
		nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
		nvidia,tristate = <TEGRA_PIN_ENABLE>;
		nvidia,enable-input = <TEGRA_PIN_ENABLE>;
		nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};

ao_retention_n_pee2 {
		nvidia,pins = "ao_retention_n_pee2";
		nvidia,function = "rsvd2";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_ENABLE>;
		nvidia,enable-input = <TEGRA_PIN_ENABLE>;
		nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
		nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};

soc_gpio39_pn1 {
		nvidia,pins = "soc_gpio39_pn1";
		nvidia,function = "rsvd1";
		nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
		nvidia,tristate = <TEGRA_PIN_ENABLE>;
		nvidia,enable-input = <TEGRA_PIN_ENABLE>;
		nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};

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

Please configure them as Output/Drive 0 in pinmux spreadsheet if you want to control them through gpiod.

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