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.

[参考译文] Linux/am5728:在 u-boot 中设置 GPIO 输出值的问题

Guru**** 2551110 points


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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/603494/linux-am5728-the-problem-about-setting-gpio-output-value-in-u-boot

器件型号:AM5728

工具/软件:Linux

您好!

在我的定制板上、我想将 GPIO3_12设置为输出引脚和输出高电平。 基于 SDK ti-processor-sdk-linux-am57xx-evm-03.01.00.06、我修改了\board\ti\am57xx\mux_data.h:

   const struct pad_conf_entry core_padconf_array_Essential x15[]={

   …

   {VIN1A_D8、(M14 | PIN_OUTPLUP)}、   // vin1a_D8.gpio3_12 *

   …

   }

在 board.c 文件中、我添加了以下代码:

   GPIO_REQUEST (108、"PR2_mii0_rst");
   GPIO_DIRECT_OUTPUT (108、1);
   GPIO_SET_VALUE (108、1);

然后我启动 u-boot、结果是它不起作用。 当我使用"GPIO 状态-A"时、GPIO3_12为"输入、0"。

为什么? 如何正确修改它?

谢谢。

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

    对我来说没关系。 是否可以转储寄存器值0x4A003514进行确认(使用 MD 命令)?
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我已经解决了这个问题、代码"GPIO_REQUEST (108、"PR2_mii0_rst")"中的数字108不正确、应该是76。 此处使用宏 GPIO_TO_Pin 更容易。
    谢谢!