Hi,
I have configured the pins of the BeagleBone Black with config-pin, there is a way to check the state of all pins to see if the configuration is ok?
I would like to understand if all the pins have been configured as I would like or if for some reason they have remained configured as they were before.
Let me explain better: I have configured pin 9.15 as input (P9_15 in) but if I check the voltage of the pin I read 2.85V. I would not want to short circuit the board and damage it
There is a visual or text way to see the state?
I am not sure config-pin is in working order any longer, i.e. especially not on updated/upgraded new images.
But…if it works on your machine:
config-pin -q p9.15
should query the pin state.
Seth
P.S. And to list with config-pin, that is if it is working correctly still, use the -l
option. That will list, should list, what the pin configurations are available for that specific pin used.
And about the 2.85v, I am not sure. Is that pin attached to something like a switch? NC or NO with COM?
config-pin operates on SysFs level, it does not read the registers in the CM module. In order to read low level registers state, you can use the analyse example (which needs libpruio installed).
Regards
PS: 2V85 looks like an open input. Check what happens when pulling down by an 5k resistor.
I have checked, and I think the pull-up/pull-down internal circuit is not so efficient…
When nothing is connected to the pins:
dino@BBB:~$ config-pin -q p9_15
P9_15 Mode: default Direction: in Value: 1
dino@BBB:~$ config-pin p9_15 in_pd
dino@BBB:~$ config-pin -q p9_15
P9_15 Mode: gpio_pd Direction: in Value: 1
dino@BBB:~$ config-pin p9_15 in_pu
dino@BBB:~$ config-pin -q p9_15
P9_15 Mode: gpio_pu Direction: in Value: 1
Activating the internal pull-up resistor the voltage from PIN to GND go to 3.138V, with pull-down go to 1.564V.
Using an external pull-down resistor the values will be reared correctly (so do not use the internal pull-up/pull-down circuit )
On PIN 9.14, 9.13, 9.12, 9.11 the pull-up/down internal resistor drive correctly the state.
When the pull-up is active I read 3.129V, with pull-down I read 23.04KOhm
You can always write the command
show-pins
or read the pin value by exporting the pin first. Check this link out.