[riot-notifications] [RIOT-OS/RIOT] cpu/sam0: add support for SAMD5x/SAME5x (#11305)

benpicco notifications at github.com
Thu May 23 15:37:50 CEST 2019


benpicco commented on this pull request.



> +
+static void dpll0_init(uint32_t f_cpu)
+{
+    const uint32_t LDR = ((f_cpu * 16) / 32768);
+
+    OSCCTRL->Dpll[0].DPLLRATIO.reg = OSCCTRL_DPLLRATIO_LDRFRAC(LDR % 16)
+                       | OSCCTRL_DPLLRATIO_LDR((LDR / 16) - 1);
+
+    OSCCTRL->Dpll[0].DPLLCTRLB.reg = OSCCTRL_DPLLCTRLB_REFCLK_XOSC32
+                       | OSCCTRL_DPLLCTRLB_DIV(1)
+                       | OSCCTRL_DPLLCTRLB_WUF
+                       | OSCCTRL_DPLLCTRLB_LBYPASS;
+
+    OSCCTRL->Dpll[0].DPLLCTRLA.reg = OSCCTRL_DPLLCTRLA_ENABLE;
+
+    while (!OSCCTRL->Dpll[0].DPLLSTATUS.bit.CLKRDY ||

Ok.

-- 
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/11305#discussion_r286946452
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190523/47e80d12/attachment.html>


More information about the notifications mailing list