How Do I Export Other Gpio Pins?

Started by aljamima, December 01, 2016, 08:34:35 PM

Previous topic - Next topic

aljamima

I have an Olimex A20 OLinuXino MICRO board that says it has "160 GPIOs on three GPIO connectors", but when i use "for i in `seq 1 1 230`; do echo $i > /sys/class/gpio/export; done" to export all the GPIOs i am only given 61 gpios listed in /sys/class/gpio. How do I access the rest of the gpio pins?

JohnS

Look at the source code for whatever version of whatever OS?

For some Linux versions the names may include the port name.

John

aljamima

im using 'A20_OLinuxino_Micro_debian_34_90_release_10'
I found commands how to export the pins, but I only get 61 exported and cant find anything about using all 160 of the gpio pins.  Is that 160 gpio count including gpios on the chip that dont have physical pins maybe? I need this to turn relays on and off so a physical gpio pin is necessary.

"Look at the source code for the OS?"
is there a specific file I should be looking at?

JohnS

#3
Doesn't the schematic show what is possible?

Did you use any names like gpio1_pb3?

Bear in mind you're on a very out of date kernel and with AW's fex stuff so you may well have some detective work to do and of course to config the fex.

Probably several files.  To find the files maybe use
find and grep
xargs can be rather handy, too.

though google might do.

You have the source - try this without it!!

John

kantal

Not all the GPIOs can be exported, the kernel uses a few for the LCD, UART, NAND etc.
Here is figure: https://www.olimex.com/wiki/images/a/a9/Example.jpg

JohnS

Many can presumably be reconfigured. (It's just hardware controlled by software.)

John