I am experimenting with rtcwake on BeagleBone Blue. Running command:
sudo rtcwake -d /dev/rtc0 -m standby -s 20
does make board to switch off but it doesn’t come back online by itself. Pressing power button brings board online very fast (in few seconds) and even keeps original ssh connection so I assume standby mode works but clock might be an issue. I have synchronised hardware clock with system clock by running:
sudo hwclock -w
and I see clocks are in sync.
I am powering BBB from 2S LiPo as my barrel connector is fried by accidentally attaching laptop charger (19V).
I tried to check time before and after standby by running:
sudo hwclock && date && sudo rtcwake -d /dev/rtc0 -m standby -s 20 && date && sudo hwclock
2021-04-17 21:42:40.123908+00:00
Sat 17 Apr 2021 09:42:40 PM UTC
rtcwake: wakeup from “standby” using /dev/rtc0 at Sat Apr 17 21:43:02 2021
Sat 17 Apr 2021 09:43:06 PM UTC
2021-04-17 21:43:07.802256+00:00
Last 2 time lines are printed after manual wake up by pressing power button. They seem to be showing that only twenty some seconds passed but actually much more time passed until I pressed power button. Which is weird because if RTC doesn’t work then I would expect time to be reset. If it does work it should be correct time.
I am experimenting with rtcwake on BeagleBone Blue. Running command:
Note that there is no REAL RTC on most BeagleBone variants (I don't
know if the Blue has an add-on RTC). cf:
I tried to check time before and after standby by running:
sudo hwclock && date && sudo rtcwake -d /dev/rtc0 -m standby -s 20 && date
&& sudo hwclock
2021-04-17 21:42:40.123908+00:00
Sat 17 Apr 2021 09:42:40 PM UTC
rtcwake: wakeup from "standby" using /dev/rtc0 at Sat Apr 17 21:43:02 2021
Sat 17 Apr 2021 09:43:06 PM UTC
2021-04-17 21:43:07.802256+00:00
Last 2 time lines are printed after manual wake up by pressing power
button. They seem to be showing that only twenty some seconds passed but
actually much more time passed until I pressed power button. Which is weird
because if RTC doesn't work then I would expect time to be reset. If it
does work it should be correct time.
I discovered, that in my Beaglebone Blue the RTC occillator 32.768kHz was not working (checked with oscilloscope). After removing resitor R18, oscillator started to work. After that, the commands:
sudo rtcwake -m standby --seconds 10
and
sudo rtcwake -m mem --seconds 10
work correctly.
The same happened with my BBBlue: the 32.768kHz RTC oscillator was not working (I checked it with an oscilloscope and there wasn’t any square wave at either pin of R18). After removing resistor R18, that oscillator started to work.
However, when executing a command like
sudo rtcwake -d /dev/rtc0 -m standby -s 10 # Use /dev/rtc1 instead if you changed rtc
the sleep time is always 8 times larger than requested, which means that in this case the sleep time is 80 seconds (not 10 seconds).
Also, after the sleep period, when the BBBlue awakes, the wifi Access Point run from the BBBlue does not restart.
Anyone has some insight in these problems? Thanks.