[lf-timer] Reduce xosc32k startup time to 100-200ms. Now there's no chance of hitting the wdt

main-solar-only
Richard Meadows 2016-03-28 14:20:42 +01:00
rodzic e6802e1854
commit a78521adc9
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -81,8 +81,8 @@ void init(enum init_type init_t)
* we need to switch to a stable low frequency clock right away. * we need to switch to a stable low frequency clock right away.
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
lf_clock_startup(); /* ~500ms startup */ lf_clock_startup(); /* 100-200ms startup */
gclk0_to_lf_clock(); /* switch, clocking at 32kHz now */ gclk0_to_lf_clock(); /* switch, clocking at 32kHz now */
system_clock_source_disable(SYSTEM_CLOCK_SOURCE_OSC8M); system_clock_source_disable(SYSTEM_CLOCK_SOURCE_OSC8M);
/** /**

Wyświetl plik

@ -139,7 +139,7 @@ void lf_clock_startup(void)
#if USE_LFTIMER #if USE_LFTIMER
/* Setup XOSC */ /* Setup XOSC */
system_clock_source_xosc32k_set_config(SYSTEM_CLOCK_EXTERNAL_CLOCK, system_clock_source_xosc32k_set_config(SYSTEM_CLOCK_EXTERNAL_CLOCK,
SYSTEM_XOSC32K_STARTUP_16384, /* ~500ms startup*/ SYSTEM_XOSC32K_STARTUP_4096, /* 100-200ms startup*/
false, false,
false, false,
true, true,