Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: BeagleBone Black and GPIO issues
On Sat-12-Oct-2024 00:37, Brook Milligan wrote:
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
Hi Brook,
I am using this table, from my notes, i used it for many years with
different OS (debian & freebsd) it is reliable AFAICanSay.
It is taken from a book, author and page are written near the table.
I have a bigger table with all the pin possible functions, but, to be
honest, i did not used that today
https://www.dropbox.com/scl/fi/tvg05eeomy1g5rftzd15u/table-pin-bbb.png?rlkey=3fsr7j20oyhik7r518fqbt83v&st=g6tsvikr&dl=0
Comparison of dmesg
===== RELEASE =============
[ 1.000000] tigpio0 at tisysc4: GPIO (gpio@4804c000)
[ 1.000000] gpio0 at tigpio0: 32 pins
[ 1.000000] tigpio0: interrupting on INTC irq 98
[ 1.000000] tigpio1 at tisysc8: GPIO (gpio@44e07000)
[ 1.000000] gpio1 at tigpio1: 32 pins
[ 1.000000] tigpio1: interrupting on INTC irq 96
[ 1.000000] tigpio2 at tisysc40: GPIO (gpio@481ac000)
[ 1.000000] gpio2 at tigpio2: 32 pins
[ 1.000000] tigpio2: interrupting on INTC irq 32
[ 1.000000] tigpio3 at tisysc41: GPIO (gpio@481ae000)
[ 1.000000] gpio3 at tigpio3: 32 pins
[ 1.000000] tigpio3: interrupting on INTC irq 62
==========================
==== CURRENT =============
[ 1.000000] tigpio0 at tisysc6: GPIO (gpio@44e07000)
[ 1.000000] gpio0 at tigpio0: 32 pins
[ 1.000000] tigpio0: interrupting on INTC irq 96
[ 1.000000] tigpio1 at tisysc13: GPIO (gpio@4804c000)
[ 1.000000] gpio1 at tigpio1: 32 pins
[ 1.000000] tigpio1: interrupting on INTC irq 98
[ 1.000000] tigpio2 at tisysc39: GPIO (gpio@481ac000)
[ 1.000000] gpio2 at tigpio2: 32 pins
[ 1.000000] tigpio2: interrupting on INTC irq 32
[ 1.000000] tigpio3 at tisysc40: GPIO (gpio@481ae000)
[ 1.000000] gpio3 at tigpio3: 32 pins
[ 1.000000] tigpio3: interrupting on INTC irq 62
==========================
Your idea has proven right, gpio0 and gpio1 are mapped incorrectly in
RELEASE.
I would say, that CURRENT is at a good point, but the pull-up/
pull-down feature needs to be there, it is important.
At the moment i can't do it, I am too much a beginner in NetBSD, i basically
just learnt how to cross-compile and install CURRENT .
Or, i can try, but I need assistance ;P
bye
Nicola
Home |
Main Index |
Thread Index |
Old Index