<p><b>@dylad</b> requested changes on this pull request.</p>

<p>Last changes and we're good with saml1x and saml21. I'll test on samd21 asap.</p><hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/11689#discussion_r294679564">cpu/saml1x/cpu.c</a>:</p>
<pre style='color:#555'>> +                           | OSC32KCTRL_OSC32K_EN32K
+                           | OSC32KCTRL_OSC32K_CALIB(osc32kcal)
+                           | OSC32KCTRL_OSC32K_ENABLE;
+
+    /* Wait OSC32K Ready */
+    while (!OSC32KCTRL->STATUS.bit.OSC32KRDY) {}
+#endif /* INTERNAL_OSC32_SOURCE */
+}
+
+static void _xosc32k_setup(void)
+{
+#if EXTERNAL_OSC32_SOURCE
+    /* RTC uses External 32,768KHz Oscillator */
+    OSC32KCTRL->XOSC32K.reg = OSC32KCTRL_XOSC32K_XTALEN
+                            | OSC32KCTRL_XOSC32K_RUNSTDBY
+                            | OSC32KCTRL_XOSC32K_ENABLE;
</pre>
<p>SAML10/SAML11 datasheet states that either the 1kHz or 32kHz must feed the RTC module. So It is better to add <code>| OSC32KCTRL_XOSC32K_EN32K</code> by default here otherwise RTC driver may get stuck because there is no clock output from OSC32K and thus peripheral is not feeded.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/11689#discussion_r294681673">cpu/saml21/cpu.c</a>:</p>
<pre style='color:#555'>> +                           | OSC32KCTRL_OSC32K_EN32K
+                           | OSC32KCTRL_OSC32K_CALIB(osc32kcal)
+                           | OSC32KCTRL_OSC32K_ENABLE;
+
+    /* Wait OSC32K Ready */
+    while (!OSC32KCTRL->STATUS.bit.OSC32KRDY) {}
+#endif /* INTERNAL_OSC32_SOURCE */
+}
+
+static void _xosc32k_setup(void)
+{
+#if EXTERNAL_OSC32_SOURCE
+    /* RTC uses External 32,768KHz Oscillator */
+    OSC32KCTRL->XOSC32K.reg = OSC32KCTRL_XOSC32K_XTALEN
+                            | OSC32KCTRL_XOSC32K_RUNSTDBY
+                            | OSC32KCTRL_XOSC32K_ENABLE;
</pre>
<p>Same as SAML1X, add <code>| OSC32KCTRL_XOSC32K_EN32K</code> as default</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/11689?email_source=notifications&email_token=ABE7WYHXPHNLE46636WWCYDP3CPQVA5CNFSM4HXX6P42YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB32SPBA#pullrequestreview-250947460">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYHTWWHZY25A222CH23P3CPQVANCNFSM4HXX6P4Q">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYHUYKP7APOXSOBSCMLP3CPQVA5CNFSM4HXX6P42YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB32SPBA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/11689?email_source=notifications\u0026email_token=ABE7WYHXPHNLE46636WWCYDP3CPQVA5CNFSM4HXX6P42YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB32SPBA#pullrequestreview-250947460",
"url": "https://github.com/RIOT-OS/RIOT/pull/11689?email_source=notifications\u0026email_token=ABE7WYHXPHNLE46636WWCYDP3CPQVA5CNFSM4HXX6P42YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB32SPBA#pullrequestreview-250947460",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>