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

benpicco notifications at github.com
Sun Apr 14 13:56:00 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_poweron();

Ok, let's try it again then. I think having the poweron/poweroff functions wrap the ENABLE bit is a bit confusing, I've wrapped them in a separate function now and made the poweron/poweroff functions actually disable the peripheral in PM/MCLK like it is done in the RTT driver.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11317#discussion_r275153300
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190414/ec72d585/attachment.html>


More information about the notifications mailing list