File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,14 @@ config SOC_ATMEL_SAMD5X_XOSC32K
1010 startup. This can then be selected as the main clock source
1111 for the SOC.
1212
13+ config SOC_ATMEL_SAMD5X_XOSC32K_STARTUP
14+ depends on SOC_ATMEL_SAMD5X_XOSC32K
15+ hex "Startup time external 32 kHz crystal oscillator"
16+ range 0x0 0x6
17+ default 0x1
18+ help
19+ Selects the startup time for the external 32 kHz crystal oscillator.
20+
1321choice
1422 prompt "Main clock source"
1523 default SOC_ATMEL_SAMD5X_DEFAULT_AS_MAIN
Original file line number Diff line number Diff line change 1818#define SAM0_DFLL_FREQ_HZ (48000000U)
1919#define SAM0_DPLL_FREQ_MIN_HZ (96000000U)
2020#define SAM0_DPLL_FREQ_MAX_HZ (200000000U)
21+ #define SAM0_XOSC32K_STARTUP_TIME CONFIG_SOC_ATMEL_SAMD5X_XOSC32K_STARTUP
2122
2223#if CONFIG_SOC_ATMEL_SAMD5X_XOSC32K_AS_MAIN
2324static void osc32k_init (void )
2425{
25- OSC32KCTRL -> XOSC32K .reg = OSC32KCTRL_XOSC32K_ENABLE | OSC32KCTRL_XOSC32K_XTALEN
26- | OSC32KCTRL_XOSC32K_EN32K | OSC32KCTRL_XOSC32K_RUNSTDBY
27- | OSC32KCTRL_XOSC32K_STARTUP (0 ) | OSC32KCTRL_XOSC32K_CGM_XT ;
26+ OSC32KCTRL -> XOSC32K .reg = OSC32KCTRL_XOSC32K_ENABLE
27+ | OSC32KCTRL_XOSC32K_XTALEN
28+ | OSC32KCTRL_XOSC32K_CGM_XT
29+ | OSC32KCTRL_XOSC32K_EN32K
30+ | OSC32KCTRL_XOSC32K_RUNSTDBY
31+ | OSC32KCTRL_XOSC32K_STARTUP (SAM0_XOSC32K_STARTUP_TIME )
32+ ;
2833
2934 while (!OSC32KCTRL -> STATUS .bit .XOSC32KRDY ) {
3035 }
You can’t perform that action at this time.
0 commit comments