After much screwing around building custom kernels. I have managed to get the board to standby and wakeup from the uart0.
http://processors.wiki.ti.com/index.php/AM335x_Power_Management_Standby_User%27s_Guide
Is the important link. But first I had to load the 6.0 SDK version onto the BBB and power the device from the barrel jack. For some reason it won't boot without the usb plugged in but whatever at least it's progress. I have it down to 25mA@5V on standby. Which isn't bad. Still not as advertised. Plus using the dying 3.2 linux kernel is a bit of a pain.
I had to do this for standby:
mkdir -p /debugfs mount -t debugfs debugfs /debugfs cd /debugfs/omap_mux/board/ echo uart0_rxd.gpio1_10=0x27,rising > standby_gpio_pad_conf echo standby > /sys/power/state
cd /debugfs/omap_mux/board/suspend_io_pad_conf
echo 1 > enable*
echo xdma_event_intr0.gpio0_19=0x27 > suspend_pad_conf
echo xdma_event_intr1.gpio0_20=0x27 > suspend_pad_conf
Much of this is extracted from here also here and here. To save you the trouble and provide what I think is useful here is a summary of the command line stuff you can do and eventually from c/c++.
Note: I found that I had a kernel dated 2013-06-20, I have updated to one from 2013-09-12.
First we will check out the frequency scaling. Look under:
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
cpufreq-set --governor ondemand
cpufreq-set --governor powersave
Checking voltages:
cat /sys/class/regulator/regulator.3/microvolts
It would be very nice to put the device in standby but short of recompiling the kernel with the appropriate flags I cant seem to access these features. (It seems you need this enabled in your kernel which it is not in the default one from BBB) To do this try:
mkdir /debug
mount -t debugfs debugfs /debug
echo mem > /sys/power/state
There are other modes you can pass to state such as standby
Turning off leds. This did not have much effect.
echo none > /sys/class/leds/beaglebone\:green\:usr0/trigger
echo none > /sys/class/leds/beaglebone\:green\:usr1/trigger
echo none > /sys/class/leds/beaglebone\:green\:usr2/trigger
echo none > /sys/class/leds/beaglebone\:green\:usr3/trigger
So a thought on your getting down to 25mA - does that include disabling (unsoldering) the power led, between the 5V jacket and the RJ45, and not having an ethernet plugged in ?
ReplyDeleteNeil, sorry it took so long. I've been on hiatus from the BBB for the pat few months. That power level was with absolutely nothing plugged in except the power and the serial connection via the FTDI cable. The power LED was not disabled (I found very little effect here).
ReplyDeleteI've been reading around today on some of the relevant sites and it seems there's been no update on getting these features into the DT for ARM yet although they are working on it.
https://groups.google.com/forum/#!msg/linux.kernel/3NkyZwHivuo/q9-jOioXNcgJ