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.

[参考译文] AM3356:如何在 AM335x Sitara 上输出高阻抗信号?

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1207230/am3356-how-to-output-a-high-z-signal-on-am335x-sitara

器件型号:AM3356

我需要为 gpio57输出高阻态信号。

假设 gpio57控制输出信号,以下代码是否会输出 HI-Z (在 Sitara AM3356处理器上)?

我假设没有 PU/PD。

GPIO_DIRECTION_OUTPUT (57、0);
GPIO_Direction_input (57);

Martin Roth

Motorola Solutions

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

    尊敬的 Martin:

    我个人没有在任何内核驱动程序中使用 gpiod_* API,但读取内核 GPIO 驱动程序时,只需要 GPIO_direction_input()就可以不驱动 GPIO 引脚。 不需要首先将引脚设置为0。

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

    感谢您的回答。

    还有一个问题。

    复位后、 AM335x Sitara 的所有引脚都设置 为 GPIO 输入(模式7)。  这是否意味着复位后默认为高阻态?

    再次感谢您的回答。

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

    尊敬的 Martin:

    复位后、所有 GPIO 引脚默认处于输入模式、输出被禁用、因此是的、默认情况下这些引脚为高阻态