A20-SOM24 GPIO

Started by Arn, October 08, 2019, 05:34:41 PM

Previous topic - Next topic

Arn

Hi,

I know that this topic was explained a lot at the forum, but i can't make it works after read the difrents threads.

I have:
- A20-SOM204-EVB
- Linux Olinuxino 5.2.5-sunxi #5.92.1 SMP Fri Aug 2 17:04:12 EEST 2019 armv7l armv7l armv7l GNU/Linux

I tried the next lines:
echo 71 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio71/direction
echo 1 > /sys/class/gpio/gpio71/value
echo 0 > /sys/class/gpio/gpio71/value

If I'm not wrong the port 71 is gpio0, pin 21 at GPIO connector GBH254SMT-34. The return of the two end lines are 1 and 0, all correct. But at the connector i see always ~0V.

I also tried with gpio8 & 9 to see something diferent at the leds but nothing changes.



LubOlimex

#1
It is GPIO0 is PH0, this means (8-1)*32 + 0=224,

(position of letter in alphabet - 1) * 32 + pin number

calculations are also explained here: https://linux-sunxi.org/GPIO

GPIO8 is PI10 (and it is also used for LED1), the calculations for PI10 are:

(9-1)*32 + 10 = 256 + 10 = 266

For GPIO9, that is PI11 (also used for LED2) it would be 267.
Technical support and documentation manager at Olimex