GPIO Electrical spec

Started by ehofmann, March 24, 2014, 09:53:16 AM

Previous topic - Next topic

ehofmann

Hi

Just to confirm after googling a lot and not succeding to found any detailed or clear information about the GPIO electrical specification.

Could someone confirm that the GPIO works with 3.3V? and not 5V?!?
My guess is 3.3V....

Does someone have a list with the relation between the phisical pin number and the file/folder name in the android image. In the documentation I can found only the pin, but not the file/folder name.


Thank you in advance.







dave-at-axon

3.3V only.

From the debug port, an LS into the sys/class/gpio directory shows me this.

gpiochip0
gpiochip24
gpiochip54
gpiochip85
gpiochip119
gpiochip137
gpiochip149
gpiochip167
gpiochip201
gpiochip229

From testing in Android, each of those corresponds to PORT A to I and the last one is S, the DRAM controller (do not use these)

This is the starting value so the index from this is simply the port number. Eg, PB05 is GPIO 29

To use these in Android, you need to export them first and then you can change the direction and value from code. You'll need a JNI to do this from Android itself.

I have configured init.sun7i.rc to create my fixed GPIO's on boot up. Something like this for example, which I use to drive an external notification LED.


write /sys/class/gpio/export 201
write /sys/class/gpio/gpio169/direction out
write /sys/class/gpio/gpio169/value 0

chown system system /sys/class/gpio/gpio201/value
chmod 777 /sys/class/gpio/gpio201/value