A13-SOM-512 sleep mode and turning off LCD display

Started by tkunz, March 14, 2016, 03:44:57 AM

Previous topic - Next topic

tkunz

I have a A13-SOM-512 connected to 4.3TS LCD via A13-SOM-Wifi-4G. I would like to sleep the A13-SOM and have the display go dark.  I can do either, but not both.  If I give the LCD:

echo 1 > /sys/devices/virtual/pwm-sunxi/pwm0/duty_percent
echo 0 > /sys/devices/virtual/pwm-sunxi/pwm0/run

Then the LCD goes dark, as desired.  But as soon as I give it:

echo "mem" > /sys/power/state

the board goes to sleep but the display goes all-white and stays that way.

Anyone know how I can get the display to go dark along with the cpu sleeping?
Thanks!
Tom

tkunz

I answered my own question.  I looked at the board schematic and discovered that PB10 is the LCD's PWRE pin.  This pin is already enabled and on by default in the gpio device class.  So to turn it off:

echo 0 >  /sys/class/gpio/gpio3_pb10/value

and to turn it on
echo 1 >  /sys/class/gpio/gpio3_pb10/value