Commit 6a179996 authored by Gerson Fernando Budke's avatar Gerson Fernando Budke Committed by David Leach
Browse files

soc: sam0: Speed-up xosc32 initialization



The current selected start-up time takes 8 seconds to initialize.
When xosc32 is used as main clock reference it blocks the whole
initializarion of the system by that amount of time. This patch
relax that condition setting the initialization time to 62ms.

Fixes #79949

Signed-off-by: default avatarGerson Fernando Budke <nandojve@gmail.com>
parent 2ff2526c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ static void osc32k_init(void)
{
	OSC32KCTRL->XOSC32K.reg = OSC32KCTRL_XOSC32K_ENABLE | OSC32KCTRL_XOSC32K_XTALEN
				| OSC32KCTRL_XOSC32K_EN32K | OSC32KCTRL_XOSC32K_RUNSTDBY
				| OSC32KCTRL_XOSC32K_STARTUP(6) | OSC32KCTRL_XOSC32K_CGM_XT;
				| OSC32KCTRL_XOSC32K_STARTUP(0) | OSC32KCTRL_XOSC32K_CGM_XT;

	while (!OSC32KCTRL->STATUS.bit.XOSC32KRDY) {
	}