Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
BeagleBone Black and GPIO issues
Hi,
I detected this unexpected behavior in the GPIO of the BeagleBone Black
in NetBSD10.X
The report is divided in the RELEASE and CURRENT sessions
The experiment are run in parallel on 2 separate BBB boards.
=======================================================
====== RELEASE 10.0 ===================================
=======================================================
-------------------- ON BOARD LED ---------------------
This example is taken from here:
https://wiki.netbsd.org/ports/evbarm/beaglebone/
---- gpio.conf ----
gpio1 21 set out USR0
gpio1 22 set out USR1
gpio1 23 set out USR2
-------------------
$> reboot
$> doas gpioctl gpio1 USR0 0 # no effect
$> doas gpioctl gpio1 USR0 1 # no effect
$> doas gpioctl gpio1 USR0 2 # no effect
--------------------------------------------------------
----- input pin --------------
---- gpio.conf -----
gpio1 17 set in # according to my map this is pin P9_23
--------------------
$> reboot
$> # it gets accepted but it does not work
# . gpio1.17 connected to nothing
$> doas gpioctl gpio1 17
0 # => ok
# . pin 9_23 connected to P9_3 (3.3v)
$> doas gpioctl gpio1 17
0 # => BAD, it should be one
----- input pin in pull-down ------------
---- gpio.conf -----
gpio1 17 set in pd
---------------------
$> reboot
$> doas gpioctl gpio1 17
..
there is no "17"
..
$> doas gpioctl gpio1 17
gpioctl: GPIOREAD: Operation not permitted
=======================================================
=======================================================
====================================
====== CURRENT =====================
====================================
(*) ON BOARD LED, case seen before, WORKS
(*) GPIO INPUT PIN, case seen before, WORKS
(*) GPIO INPUT PIN in PULL DOWN, NOT WORKING
---- gpio.conf --------
gpio1 17 set pd
-----------------------
$> reboot
... in the serial console i see
Configuring GPIO.
gpioctl: GPIOSET: Operation not supported by device
$> gpioctl gpio1 17
gpioctl: GPIOREAD: Operation not permitted
---- gpio.conf -------
gpio1 17 set in pd
----------------------
Configuring GPIO.
gpioctl: GPIOSET: Operation not supported by device
... as before
(*) LOOP-BACK => WORKING
. one input pin reads another output pin
. Since here things are working quite well I do also a loop-back test
# . connect with a wire P9_27 and P9_23
---- gpio.conf -----
gpio1 17 set in # P9_23
gpio3 21 set out # P9_25
gpio3 21 0
--------------------
pulce5# gpioctl gpio1 17
pin 17: state 0
pulce5# gpioctl gpio3 21 1
pin 21: state 0 -> 1
pulce5# gpioctl gpio1 17
pin 17: state 1
# => OK, it is working
====================================
====================================
In conclusion, if one of my board is not broken the RELEASE
is not in good condition.
Let's focus on CURRENT which is almost OK !
what it misses is the ability to set the pin in pull-down,
which is very important.
It is quite late, i hope i did not make to many mistakes ;)
bye
Nicola
Home |
Main Index |
Thread Index |
Old Index