[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 18:31:35 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 */
+    RTC->MODE0.CTRLA.reg = 0;

Please use `RTC->MODE0.CTRLA.bit.MODE = 0;` instead or add a syncbusy right after.
A 32-bit write will trigger a ENABLE operation to disable this peripheral, sometimes the next call (`_rtc_set_enabled(1);`) is discarded because the operation isn't finished yet.
This causes some issue on SAML11. Sometimes the peripheral isn't enable so periph_rtt test don't work.

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/20190508/a4d7f8c6/attachment.html>

More information about the notifications mailing list