AnsweredAssumed Answered

Controlling GPIO in Android for i.MX6

Question asked by Krzysztof Szałach on Dec 18, 2014
Latest reply on Jan 14, 2015 by Krzysztof Szałach

Hello!

 

Now we're trying to controll GPIO ports from Android.

 

Let's say we have connected LED to GPIO1[7].

 

What we've done till now:

1. Added MX6Q_PAD_GPIO7__GPIO_1_7 to mx6q_var_som_pads array in /kernel_imx/arch/arm/mach-mx6/board-mx6q_var_som.h

2. Builded kernel (step 6.7 from http://variwiki.com/index.php?title=VAR-SOM-MX6_Android_GS_R21)

3. Builded boot.img (step 6.4 from VAR-SOM-MX6 Android GS R21 - Variscite Wiki)

(nexts steps were made on android root console)

4. Checked if GPIO are available in FS (we have gpiochipxx available in /sys/class/gpio) and exported GPIO7 (echo 7 > /sys/class/gpio/export)

5. Changed direction to out for GPIO7 (echo out > /sys/class/gpio7/direction)

6. Tried to drive the LED connected to this GPIO, but with no luck (echo 1 > /sys/class/gpio7/value or echo 0 > /sys/class/gpio7/value)

 

Have we missed some steps?

Outcomes