Onchip RTC

Hi,

I am trying to get some clarity on the capabilities of the RTC on the BBBW. Based on what I can see there is a nonbattery support powered RTC on the chip. However in poking around online I hav ebeen unable to issue a command that allows me to put the BBBW into a lower power state and then wake up using the RTC. For context what I am hoping to do is sleep for 10-20 minutes wakeup do something and then go back to sleep so that I can minimize power usage in a battery powered application. Also I am running the latest Debian stock OS with kernel 4.9.59-ti-rt-r74.

thanks in advance for any help and let me know what info I should have provided to get better help.

Hello Evan
I’ve done it and designing a cape that manages the power by turning it off and on under external RTC control.

I’ve found this works

$ sudo su
$ echo 0 > /sys/class/rtc/rtc0/wakealarm
$ echo date '+%s' -d '+ 1 minutes' > /sys/class/rtc/rtc0/wakealarm
$echo standby > /sys/power/state

shutsdown to 20mA then wakesup on deadline or any other event…

Hi,

Thanks for the reply, I gave this a try and I can see that indeed it does go into a low power state, however it will not wake.

These are the commands I entered for reference:

debian@beaglebone:~$ sudo su
[sudo] password for debian:
Sorry, try again.
[sudo] password for debian:
root@beaglebone:/home/debian# echo 0 > /sys/class/rtc/rtc0/wakealarm
root@beaglebone:/home/debian# echo date '+%s' -d '+ 1 minutes' > /sys/class/rtc/rtc0/wakealarm
root@beaglebone:/home/debian# echo standby > /sys/power/state

Is there a way to trace whats going on? What would I look for?

Thanks for your help!

Sorry… don’t know how to trace it. Perhaps there is another command to enable the RTC interrupt, but I haven’t kept track of how I go there.

Hi Evan,

I have a weather station project using a Beaglebone Black board to send data from a Davis Weather station console via an old Nokia phone. All Solar powered.

To save battery power the board runs every minute, sleeps every 5 minutes (during the day) and 15 minutes (at night).

The Kernel I use: Linux arm 4.9.67-ti-r82 #1 SMP PREEMPT Fri Dec 8 02:39:42 UTC 2017 armv7l GNU/Linux

The command to sleep: rtcwake -m standby -s 3600
This wakes up after 5 minutes or if I insert or remove the USB to serial TTL cable.

One of the biggest problems I have had is finding a pre-build Linux version that supports standby and USB numeration from standby.

Maybe this kernel will help.

All the best,

Lloyd.

Hi,

This seems to match what I am experiencing. Did you compile the kernel yourself or use a distribution? If you compiled it, did you find a good tutorial? I found one for older kernels but nothing for new stuff.

Thanks for the reply, especially since this was an older post I had written off for dead.

Hi,

I got the image bone-debian-9.2-console-armhf-2017-12-08-2gb.img.xz from here https://elinux.org/Beagleboard:BeagleBoneBlack_Debian
But the link to the image no longer exist. :frowning:

The new images I tested do not support standby so I am sticking with this one.

All the best,

Lloyd.