首页 > 解决方案 > 使用 dt-blob.dts 配置 GPIO 引脚时,哪个 pin@pxx 对应于 40 引脚接头上的 #12?

问题描述

我的 Raspberry Pi 3B 运行 Jessie-Lite。我想将物理引脚 12/BCM 引脚 18/接线 Pi 引脚 1 配置为输出,设置为低。

在 Stretch 上,这可以通过 config.txt gpio=18=op,dl 轻松完成

在以前的版本中,这显然是通过编辑 dt-blob.dts 文件来完成的(https://www.raspberrypi.org/documentation/configuration/pin-configuration.md

但是,在pins_3b1 或pins_3b2 (Pi 3 B) 部分,我找不到与我的目标管脚对应的参考(物理管脚12/BCM 管脚18/接线Pi 管脚1)。没有 pin@p12 或 pin@p18。有一个 pin@p1 但在 videocore {} 部分内。

谢谢你。

标签: raspberry-pi3gpio

解决方案


[来自https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=237796&p=1453560#p1453560]

dt-blob 并不意味着列出所有引脚 - 只是那些具有特定功能且需要非默认值的引脚。如果要将 dt-blob 中的 GPIO18 初始化为低电平输出,则需要添加如下内容:

pin@p18 { function = "output"; startup_state = "active"; termination = "no_pulling"; polarity = "active_low"; };

推荐阅读