Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: aljamima on December 01, 2016, 08:34:35 PM

Title: How Do I Export Other Gpio Pins?
Post by: aljamima on December 01, 2016, 08:34:35 PM
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?
Title: Re: How Do I Export Other Gpio Pins?
Post by: JohnS on December 01, 2016, 09:35:45 PM
Look at the source code for whatever version of whatever OS?

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

John
Title: Re: How Do I Export Other Gpio Pins?
Post by: aljamima on December 01, 2016, 10:21:30 PM
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?
Title: Re: How Do I Export Other Gpio Pins?
Post by: JohnS on December 02, 2016, 12:18:52 AM
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
Title: Re: How Do I Export Other Gpio Pins?
Post by: kantal on December 02, 2016, 01:03:01 AM
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
Title: Re: How Do I Export Other Gpio Pins?
Post by: JohnS on December 02, 2016, 09:05:46 AM
Many can presumably be reconfigured. (It's just hardware controlled by software.)

John