From a0eb51cc9724cfe0aa9dde800e9e100029e22c17 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Wed, 18 Apr 2018 03:35:58 +0000 Subject: [PATCH] updated asf4_config: reverted oscillators to use internal vs external for RTC --- ports/atmel-samd/asf4_conf/samd21/hpl_gclk_config.h | 2 +- .../atmel-samd/asf4_conf/samd21/hpl_sysctrl_config.h | 10 +++++----- ports/atmel-samd/asf4_conf/samd51/hpl_gclk_config.h | 2 +- .../asf4_conf/samd51/hpl_osc32kctrl_config.h | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ports/atmel-samd/asf4_conf/samd21/hpl_gclk_config.h b/ports/atmel-samd/asf4_conf/samd21/hpl_gclk_config.h index 230f6e6188..b97131f0bc 100644 --- a/ports/atmel-samd/asf4_conf/samd21/hpl_gclk_config.h +++ b/ports/atmel-samd/asf4_conf/samd21/hpl_gclk_config.h @@ -259,7 +259,7 @@ // This defines the clock source for generic clock generator 2 // gclk_gen_2_oscillator #ifndef CONF_GCLK_GEN_2_SRC -#define CONF_GCLK_GEN_2_SRC GCLK_GENCTRL_SRC_XOSC32K +#define CONF_GCLK_GEN_2_SRC GCLK_GENCTRL_SRC_OSC32K #endif // diff --git a/ports/atmel-samd/asf4_conf/samd21/hpl_sysctrl_config.h b/ports/atmel-samd/asf4_conf/samd21/hpl_sysctrl_config.h index eaec93811f..5b9ec6ed6c 100644 --- a/ports/atmel-samd/asf4_conf/samd21/hpl_sysctrl_config.h +++ b/ports/atmel-samd/asf4_conf/samd21/hpl_sysctrl_config.h @@ -197,7 +197,7 @@ // Indicates whether configuration for External 32K Osc is enabled or not // enable_xosc32k #ifndef CONF_XOSC32K_CONFIG -#define CONF_XOSC32K_CONFIG 1 +#define CONF_XOSC32K_CONFIG 0 #endif // 32kHz External Crystal Oscillator (XOSC32K) Control @@ -205,7 +205,7 @@ // Indicates whether External 32K Oscillator is enabled or not // xosc32k_arch_enable #ifndef CONF_XOSC32K_ENABLE -#define CONF_XOSC32K_ENABLE 1 +#define CONF_XOSC32K_ENABLE 0 #endif // On Demand @@ -223,7 +223,7 @@ // If this bit is 1: The oscillator is not stopped in standby sleep mode. // xosc32k_arch_runstdby #ifndef CONF_XOSC32K_RUNSTDBY -#define CONF_XOSC32K_RUNSTDBY 1 +#define CONF_XOSC32K_RUNSTDBY 0 #endif // Enable 1K @@ -237,14 +237,14 @@ // Enable 32 Khz Output // xosc32k_arch_en32k #ifndef CONF_XOSC32K_EN32K -#define CONF_XOSC32K_EN32K 1 +#define CONF_XOSC32K_EN32K 0 #endif // Enable XTAL // Enable XTAL // xosc32k_arch_xtalen #ifndef CONF_XOSC32K_XTALEN -#define CONF_XOSC32K_XTALEN 1 +#define CONF_XOSC32K_XTALEN 0 #endif // Write Lock diff --git a/ports/atmel-samd/asf4_conf/samd51/hpl_gclk_config.h b/ports/atmel-samd/asf4_conf/samd51/hpl_gclk_config.h index 3e41d21682..a0748d0fa8 100644 --- a/ports/atmel-samd/asf4_conf/samd51/hpl_gclk_config.h +++ b/ports/atmel-samd/asf4_conf/samd51/hpl_gclk_config.h @@ -188,7 +188,7 @@ // This defines the clock source for generic clock generator 2 // gclk_gen_2_oscillator #ifndef CONF_GCLK_GEN_2_SOURCE -#define CONF_GCLK_GEN_2_SOURCE GCLK_GENCTRL_SRC_XOSC32K +#define CONF_GCLK_GEN_2_SOURCE GCLK_GENCTRL_SRC_OSCULP32K #endif // Run in Standby diff --git a/ports/atmel-samd/asf4_conf/samd51/hpl_osc32kctrl_config.h b/ports/atmel-samd/asf4_conf/samd51/hpl_osc32kctrl_config.h index 73128077ca..ccb2627480 100644 --- a/ports/atmel-samd/asf4_conf/samd51/hpl_osc32kctrl_config.h +++ b/ports/atmel-samd/asf4_conf/samd51/hpl_osc32kctrl_config.h @@ -23,7 +23,7 @@ // Use 1 kHz output // rtc_1khz_selection #ifndef CONF_RTCCTRL_1KHZ -#define CONF_RTCCTRL_1KHZ 0 +#define CONF_RTCCTRL_1KHZ 1 #endif #if CONF_RTCCTRL_SRC == GCLK_GENCTRL_SRC_OSCULP32K @@ -62,7 +62,7 @@ // <0x6=>8000092us // xosc32k_arch_startup #ifndef CONF_XOSC32K_STARTUP -#define CONF_XOSC32K_STARTUP 0x4 +#define CONF_XOSC32K_STARTUP 0x0 #endif // On Demand Control @@ -76,7 +76,7 @@ // Indicates whether Run in Standby is enabled or not // xosc32k_arch_runstdby #ifndef CONF_XOSC32K_RUNSTDBY -#define CONF_XOSC32K_RUNSTDBY 1 +#define CONF_XOSC32K_RUNSTDBY 0 #endif // 1kHz Output Enable @@ -90,7 +90,7 @@ // Indicates whether 32kHz Output is enabled or not // xosc32k_arch_en32k #ifndef CONF_XOSC32K_EN32K -#define CONF_XOSC32K_EN32K 1 +#define CONF_XOSC32K_EN32K 0 #endif // Clock Switch Back @@ -118,7 +118,7 @@ // Indicates whether the connections between the I/O pads and the external clock or crystal oscillator is enabled or not // xosc32k_arch_xtalen #ifndef CONF_XOSC32K_XTALEN -#define CONF_XOSC32K_XTALEN 1 +#define CONF_XOSC32K_XTALEN 0 #endif // Control Gain Mode @@ -137,7 +137,7 @@ // Indicates whether configuration for OSCULP32K is enabled or not // enable_osculp32k #ifndef CONF_OSCULP32K_CONFIG -#define CONF_OSCULP32K_CONFIG 0 +#define CONF_OSCULP32K_CONFIG 1 #endif // 32kHz Ultra Low Power Internal Oscillator Control