diff --git a/chips/samd11/system_samd11.c b/chips/samd11/system_samd11.c index 0539b5a..f69377f 100644 --- a/chips/samd11/system_samd11.c +++ b/chips/samd11/system_samd11.c @@ -73,7 +73,7 @@ void sys_init(void) { // if no crystal, set up internal 32k oscillator uint32_t calib = (*((uint32_t *) FUSES_OSC32K_ADDR) & FUSES_OSC32K_Msk); SYSCTRL->OSC32K.reg = SYSCTRL_OSC32K_CALIB(calib) | - SYSCTRL_OSC32K_STARTUP(0x6) | + SYSCTRL_OSC32K_STARTUP(0x3) | SYSCTRL_OSC32K_EN32K | SYSCTRL_XOSC32K_RUNSTDBY; SYSCTRL->OSC32K.bit.ENABLE = 1; diff --git a/chips/samd21/system_samd21.c b/chips/samd21/system_samd21.c index 58d2a97..9bfa473 100644 --- a/chips/samd21/system_samd21.c +++ b/chips/samd21/system_samd21.c @@ -98,7 +98,7 @@ void sys_init(void) { // if no crystal, set up internal 32k oscillator uint32_t calib = (*((uint32_t *) FUSES_OSC32K_CAL_ADDR) & FUSES_OSC32K_CAL_Msk); SYSCTRL->OSC32K.reg = SYSCTRL_OSC32K_CALIB(calib) | - SYSCTRL_OSC32K_STARTUP(0x6) | + SYSCTRL_OSC32K_STARTUP(0x3) | SYSCTRL_OSC32K_EN32K | SYSCTRL_XOSC32K_RUNSTDBY; SYSCTRL->OSC32K.bit.ENABLE = 1; diff --git a/chips/samd51/system_samd51.c b/chips/samd51/system_samd51.c index 7222695..f172774 100644 --- a/chips/samd51/system_samd51.c +++ b/chips/samd51/system_samd51.c @@ -118,7 +118,7 @@ void sys_init(void) { GCLK_GENCTRL_RUNSTDBY | GCLK_GENCTRL_GENEN; #else - OSC32KCTRL->XOSC32K.reg = OSC32KCTRL_XOSC32K_STARTUP(0x6) | + OSC32KCTRL->XOSC32K.reg = OSC32KCTRL_XOSC32K_STARTUP(0x3) | OSC32KCTRL_XOSC32K_XTALEN | OSC32KCTRL_XOSC32K_EN1K | OSC32KCTRL_XOSC32K_EN32K | diff --git a/chips/saml21/system_saml21.c b/chips/saml21/system_saml21.c index e9448bc..ee084c2 100644 --- a/chips/saml21/system_saml21.c +++ b/chips/saml21/system_saml21.c @@ -101,7 +101,7 @@ void sys_init(void) { GCLK_GENCTRL_RUNSTDBY | GCLK_GENCTRL_GENEN; #else - OSC32KCTRL->XOSC32K.reg = OSC32KCTRL_XOSC32K_STARTUP(0x6) | + OSC32KCTRL->XOSC32K.reg = OSC32KCTRL_XOSC32K_STARTUP(0x3) | OSC32KCTRL_XOSC32K_XTALEN | OSC32KCTRL_XOSC32K_EN1K | OSC32KCTRL_XOSC32K_EN32K | diff --git a/chips/saml22/system_saml22.c b/chips/saml22/system_saml22.c index f0ea39a..83e20a0 100644 --- a/chips/saml22/system_saml22.c +++ b/chips/saml22/system_saml22.c @@ -84,7 +84,7 @@ void sys_init(void) { // use the internal OSCULP32K. This means timekeeping will be less accurate. OSC32KCTRL->RTCCTRL.reg = OSC32KCTRL_RTCCTRL_RTCSEL_ULP1K; #else - OSC32KCTRL->XOSC32K.reg = OSC32KCTRL_XOSC32K_STARTUP(0x6) | + OSC32KCTRL->XOSC32K.reg = OSC32KCTRL_XOSC32K_STARTUP(0x3) | OSC32KCTRL_XOSC32K_XTALEN | OSC32KCTRL_XOSC32K_EN1K | OSC32KCTRL_XOSC32K_EN32K |