Set GPIO at boot on Raspberry Pi
Karl Denninger
karl at denninger.net
Sun Dec 20 17:20:56 UTC 2015
On 12/20/2015 11:02, Toby wrote:
> Hi all
>
> Is there a way to set GPIOs at boot? I'd like to set GPIO 28 to out and
> high before usb devices are probed, in order to be able to use my usb
> disk. If I have it plugged in during boot, I can't get it to work. It
> works though if I boot the pi, then plug in the disk and then set the
> pin to high.
>
> Thanks,
> Toby
I've had good luck setting the state FIRST, then the pin config to
desired (in this case, OUT.)
I have this general problem with driving a relay board, in that the
jackwads that designed the board set it up to be active LOW, so if you
set the config first you chatter the outputs, and FreeBSD's GPIO config
rejects "active low" config as a setting.
The pins should come up configured as inputs so the peripheral shouldn't
be upset about that.
--
Karl Denninger
karl at denninger.net <mailto:karl at denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2996 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20151220/abeb5c48/attachment.bin>
More information about the freebsd-arm
mailing list