[riot-notifications] [RIOT-OS/RIOT] sam0_common: make RTC implementation common across all sam0 MCUs (#11317)

benpicco notifications at github.com
Thu Apr 11 23:00:09 CEST 2019

benpicco commented on this pull request.

-    /* Software Reset the RTC */
-    RTC->MODE2.CTRLA.bit.SWRST = 1;
-    /* Wait end of reset */
-    while (RTC->MODE2.CTRLA.bit.SWRST);
+void rtc_init(void)
+    rtc_poweroff();
+    rtc_clock_setup();

Thank you for testing!
btw, do we need to call `rtc_poweroff()` and `rtc_reset()` here at all?

e.g. the RTC keeps ticking in HIBERNATE / BACKUP deep sleep mode and can wake the CPU (which triggers a reset).

I was wondering why the RTC was still starting at 0 after that - only to discover that it is being reset in `rtc_init()`! 

Is this the intended behavior? If not, I'd much rather just remove those calls here.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190411/48f4e970/attachment.html>

More information about the notifications mailing list