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

Dylan Laduranty notifications at github.com
Wed May 8 19:00:21 CEST 2019


dylad commented on this pull request.



>  
-    /* enable */
-    RTC->MODE0.CTRLA.bit.ENABLE = 1;
-    while(RTC->MODE0.SYNCBUSY.bit.ENABLE) {}
+void rtt_init(void)
+{
+    _rtt_clock_setup();
+    rtt_poweron();
+
+    /* set 32bit counting mode */
+#ifdef REG_RTC_MODE0_CTRLA
+    RTC->MODE0.CTRLA.reg = 0;

`MODE0.CTRLA.reg = RTC_MODE0_CTRLA_MODE(0) | RTC_MODE0_CTRLA_ENABLE;`
in one go so it is perfectly clear :)

-- 
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/11318#discussion_r282158356
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190508/39a4e47f/attachment.html>


More information about the notifications mailing list