Skip to content

Commit

Permalink
start external oscillator after 1 second, not 8
Browse files Browse the repository at this point in the history
  • Loading branch information
joeycastillo committed Jul 16, 2024
1 parent e611ce3 commit 51a3002
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion chips/samd11/system_samd11.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion chips/samd21/system_samd21.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion chips/samd51/system_samd51.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion chips/saml21/system_saml21.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion chips/saml22/system_saml22.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down

0 comments on commit 51a3002

Please sign in to comment.