Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: BeagleBone Black and GPIO issues



> On Oct 11, 2024, at 3:57 PM, Dr. Nicola Mingotti <nmingotti%gmail.com@localhost> wrote:
> 
> gpio1 21 set out USR0
> gpio1 22 set out USR1
> gpio1 23 set out USR2

Are you looking at the BBB documentation with respect to the gpio controllers?

NetBSD (for me at least) probes them in a different order so that what the documentation says is gpio1 is actually the gpio0 kernel and vice versa; the other two are probed in the correct order.  You can see this if you look at the kernel boot messages and compare the details of the addresses, but it is easy to miss.

Thus, in this case you should be using gpio0, not gpio1, to access the LEDs; the pin numbers are OK within each device.

I think if you swap gpio0 and gpio1 in what you are doing all will be fine.  It looked like your attempt to access gpio3 worked, which is expected because NetBSD sees the same device as the docs list to be gpio3.

Cheers,
Brook



Home | Main Index | Thread Index | Old Index