Re: [beagleboard] Re: rtcwake support on BeagleBone Blue

2021-04-18 Thread Mykolas Juraitis
Thank you for a comprehensive answer. I will look into external clocks.

On Sun, Apr 18, 2021 at 5:05 PM Dennis Lee Bieber 
wrote:

> On Sat, 17 Apr 2021 14:14:03 -0700 (PDT), in
> gmane.comp.hardware.beagleboard.user Mykolas Juraitis
>  wrote:
>
> >Hello,
> >
> >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:
>
> https://learn.adafruit.com/adding-a-real-time-clock-to-beaglebone-black/overview
>
>
> >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.
> >
>
> Beaglebones periodically save the system clock value, and use that
> to
> reload the system clock on startup. The value you are seeing is likely that
> of the last time this fake hwclock was written... cf:
> https://manpages.debian.org/jessie/fake-hwclock/fake-hwclock.8.en.html
>
> Also...
>
> https://unix.stackexchange.com/questions/187261/automatically-update-hwclock-at-boot
> https://groups.google.com/g/beagleboard/c/n1noGnM30sQ
>
>
>
> --
> Dennis L Bieber
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "BeagleBoard" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beagleboard/qPoSZk2XStA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/a3mo7gls3hp901pi4r91rfvkkq7q7g2nti%404ax.com
> .
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAKVuKxgb%3DQM4ek_D_zwqRzBugNAD3JhS7KYLBO_w5YmvADPhwg%40mail.gmail.com.


[beagleboard] rtcwake support on BeagleBone Blue

2021-04-17 Thread Mykolas Juraitis
Hello,

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 wanted to ask if anyone managed rtcwake working or it is not even 
supposed to work on BeagleBone Blue? This 
thread https://groups.google.com/g/beagleboard/c/wJln2crGaFA indicates that 
it should be possible but I am not sure which board it is about. BeagleBone 
Black seems to be not supported (see 
https://groups.google.com/g/beagleboard/c/bZFcV4y9QWQ).

Best regards,
Mykolas

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/2d5e4268-25e0-4b69-99f0-d2ba66e38bfbn%40googlegroups.com.