This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] SK-AM62A-LP:gpioset 无法在 SDK 10.01中使用

Guru**** 2458880 points
Other Parts Discussed in Thread: AM62A7

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1480135/sk-am62a-lp-the-gpioset-could-not-use-in-sdk-10-01

器件型号:SK-AM62A-LP
主题中讨论的其他器件:AM62A7

工具与软件:

尊敬的 TI:

现在我在 am62a7中使用了 SDK10_01_00_05。
但我发现我无法使用 gpioset 控制 GPIO。 当我使用 gpioset -c /dev/gpiochip1 7=1时、它会挂起并且我使用示波器来检查它没有被拉高。


在/sys/class 中、没有 GPIO 文件。  

我如何控制用户空间中的 GPIO?

谢谢!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    您对 GPIO 进行了哪些器件树更改?

    您可以关注如下所示的 Thread: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1268671/sk-am62-using-the-gpios-in-the-40-pin-user-expansion-port/4804378

    请注意、这适用于 AM62x、而不是 AM62A。

    此致、

    Anshu

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。



    我在 DTS 中添加一些 GPIO 配置。 当我使用 sdk9.2时,这种更改效果很好,但在 SDK 10.01中,我发现我可以在用户空间中使用 gpioset。
    谢谢!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    SDK 10.0+中包含的 libgpiod 库(而不是 TI 代码)发生了变化。 您可以在设备树中为 GPIO 命名并调用该名称、也可以在命令中添加一个--unquoted 参数。

    选项1:

    将设备树更改为包括线路名称。 请参阅下面的示例。

    &main_pmx0 {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x009c, PIN_INPUT, 7) /* (V25) GPMC0_WAIT1.GPIO0_38 */
        >;
    };
    
    &main_gpio0 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&main_gpio0_pins_default>;
        gpio-line-names ="","","","","","","","","","", //GPIO0_0->9
                        "","","","","","","","","","", //GPIO0_10->19
                        "","","","","","","","","","", //GPIO0_20->29
                        "","","","","","","","","TEST_GPIO",""; //GPIO0_30->39
    };
    
    

    使用"gpioset TEST_GPIO=1"或0。

    选项2:

    请勿更改设备树并使用"gpioset --unquoted -c 1 7=1"或0。

    此致、

    Anshu