1 /* Auto-generated config file hpl_osc32kctrl_config.h */ 2 #ifndef HPL_OSC32KCTRL_CONFIG_H 3 #define HPL_OSC32KCTRL_CONFIG_H 4 5 // <<< Use Configuration Wizard in Context Menu >>> 6 7 // <e> RTC Source configuration 8 // <id> enable_rtc_source 9 #ifndef CONF_RTCCTRL_CONFIG 10 #define CONF_RTCCTRL_CONFIG 0 11 #endif 12 13 // <h> RTC source control 14 // <y> RTC Clock Source Selection 15 // <GCLK_GENCTRL_SRC_OSCULP32K"> 32kHz Ultra Low Power Internal Oscillator (OSCULP32K) 16 // <GCLK_GENCTRL_SRC_OSC32K"> 32kHz High Accuracy Internal Oscillator (OSC32K) 17 // <GCLK_GENCTRL_SRC_XOSC32K"> 32kHz External Crystal Oscillator (XOSC32K) 18 // <i> This defines the clock source for RTC 19 // <id> rtc_source_oscillator 20 #ifndef CONF_RTCCTRL_SRC 21 #define CONF_RTCCTRL_SRC GCLK_GENCTRL_SRC_OSCULP32K 22 #endif 23 24 // <q> Use 1 kHz output 25 // <id> rtc_1khz_selection 26 #ifndef CONF_RTCCTRL_1KHZ 27 28 #define CONF_RTCCTRL_1KHZ 0 29 30 #endif 31 32 #if CONF_RTCCTRL_SRC == GCLK_GENCTRL_SRC_OSCULP32K 33 #define CONF_RTCCTRL (CONF_RTCCTRL_1KHZ ? OSC32KCTRL_RTCCTRL_RTCSEL_ULP1K_Val : OSC32KCTRL_RTCCTRL_RTCSEL_ULP32K_Val) 34 #elif CONF_RTCCTRL_SRC == GCLK_GENCTRL_SRC_OSC32K 35 #define CONF_RTCCTRL (CONF_RTCCTRL_1KHZ ? OSC32KCTRL_RTCCTRL_RTCSEL_OSC1K_Val : OSC32KCTRL_RTCCTRL_RTCSEL_OSC32K_Val) 36 #elif CONF_RTCCTRL_SRC == GCLK_GENCTRL_SRC_XOSC32K 37 #define CONF_RTCCTRL (CONF_RTCCTRL_1KHZ ? OSC32KCTRL_RTCCTRL_RTCSEL_XOSC1K_Val : OSC32KCTRL_RTCCTRL_RTCSEL_XOSC32K_Val) 38 #else 39 #error unexpected CONF_RTCCTRL_SRC 40 #endif 41 42 // </h> 43 // </e> 44 // <e> 32kHz External Crystal Oscillator Configuration 45 // <i> Indicates whether configuration for External 32K Osc is enabled or not 46 // <id> enable_xosc32k 47 #ifndef CONF_XOSC32K_CONFIG 48 #define CONF_XOSC32K_CONFIG 1 49 #endif 50 51 // <h> 32kHz External Crystal Oscillator Control 52 // <q> Oscillator enable 53 // <i> Indicates whether 32kHz External Crystal Oscillator is enabled or not 54 // <id> xosc32k_arch_enable 55 #ifndef CONF_XOSC32K_ENABLE 56 #define CONF_XOSC32K_ENABLE 1 57 #endif 58 59 // <o> Start-Up Time 60 // <0x0=>122us 61 // <0x1=>1068us 62 // <0x2=>62592us 63 // <0x3=>125092us 64 // <0x4=>500092us 65 // <0x5=>1000092us 66 // <0x6=>2000092us 67 // <0x7=>4000092us// <id> xosc32k_arch_startup 68 #ifndef CONF_XOSC32K_STARTUP 69 #define CONF_XOSC32K_STARTUP 0x2 70 #endif 71 72 // <q> On Demand Control 73 // <i> Indicates whether On Demand Control is enabled or not 74 // <id> xosc32k_arch_ondemand 75 #ifndef CONF_XOSC32K_ONDEMAND 76 #define CONF_XOSC32K_ONDEMAND 1 77 #endif 78 79 // <q> Run in Standby 80 // <i> Indicates whether Run in Standby is enabled or not 81 // <id> xosc32k_arch_runstdby 82 #ifndef CONF_XOSC32K_RUNSTDBY 83 #define CONF_XOSC32K_RUNSTDBY 1 84 #endif 85 86 // <q> 1kHz Output Enable 87 // <i> Indicates whether 1kHz Output is enabled or not 88 // <id> xosc32k_arch_en1k 89 #ifndef CONF_XOSC32K_EN1K 90 #define CONF_XOSC32K_EN1K 0 91 #endif 92 93 // <q> 32kHz Output Enable 94 // <i> Indicates whether 32kHz Output is enabled or not 95 // <id> xosc32k_arch_en32k 96 #ifndef CONF_XOSC32K_EN32K 97 #define CONF_XOSC32K_EN32K 1 98 #endif 99 100 // <q> Clock Switch Back 101 // <i> Indicates whether Clock Switch Back is enabled or not 102 // <id> xosc32k_arch_swben 103 #ifndef CONF_XOSC32K_SWBEN 104 #define CONF_XOSC32K_SWBEN 0 105 #endif 106 107 // <q> Clock Failure Detector 108 // <i> Indicates whether Clock Failure Detector is enabled or not 109 // <id> xosc32k_arch_cfden 110 #ifndef CONF_XOSC32K_CFDEN 111 #define CONF_XOSC32K_CFDEN 0 112 #endif 113 114 // <q> Clock Failure Detector Event Out 115 // <i> Indicates whether Clock Failure Detector Event Out is enabled or not 116 // <id> xosc32k_arch_cfdeo 117 #ifndef CONF_XOSC32K_CFDEO 118 #define CONF_XOSC32K_CFDEO 0 119 #endif 120 121 // <q> Crystal connected to XIN32/XOUT32 Enable 122 // <i> Indicates whether the connections between the I/O pads and the external clock or crystal oscillator is enabled or not 123 // <id> xosc32k_arch_xtalen 124 #ifndef CONF_XOSC32K_XTALEN 125 #define CONF_XOSC32K_XTALEN 1 126 #endif 127 128 // </h> 129 // </e> 130 // <e> 32kHz Internal Oscillator Configuration 131 // <i> Indicates whether configuration for OSC32K is enabled or not 132 // <id> enable_osc32k 133 #ifndef CONF_OSC32K_CONFIG 134 #define CONF_OSC32K_CONFIG 0 135 #endif 136 137 // <h> 32kHz Internal Oscillator Control 138 // <q> Enable 139 // <i> Indicates whether 32kHz Internal Oscillator is enabled or not 140 // <id> osc32k_arch_enable 141 #ifndef CONF_OSC32K_ENABLE 142 #define CONF_OSC32K_ENABLE 0 143 #endif 144 145 // <q> Oscillator Calibration Control 146 // <i> Indicates whether Oscillator Calibration is enabled or not 147 // <id> osc32k_arch_calib_enable 148 #ifndef CONF_OSC32K_CALIB_ENABLE 149 #define CONF_OSC32K_CALIB_ENABLE 0 150 #endif 151 152 // <o> Oscillator Calibration <0x0-0x7F> 153 // <id> osc32k_arch_calib 154 #ifndef CONF_OSC32K_CALIB 155 #define CONF_OSC32K_CALIB 0x0 156 #endif 157 158 // <o> Start-Up Time 159 // <0x0=>92us 160 // <0x1=>122us 161 // <0x2=>183us 162 // <0x3=>305us 163 // <0x4=>549us 164 // <0x5=>1038us 165 // <0x6=>2014us 166 // <0x7=>3967us 167 // <id> osc32k_arch_startup 168 #ifndef CONF_OSC32K_STARTUP 169 #define CONF_OSC32K_STARTUP 0x0 170 #endif 171 172 // <q> On Demand Control 173 // <i> Indicates whether On Demand Control is enabled or not 174 // <id> osc32k_arch_ondemand 175 #ifndef CONF_OSC32K_ONDEMAND 176 #define CONF_OSC32K_ONDEMAND 0 177 #endif 178 179 // <q> Run in Standby 180 // <i> Indicates whether Run in Standby is enabled or not 181 // <id> osc32k_arch_runstdby 182 #ifndef CONF_OSC32K_RUNSTDBY 183 #define CONF_OSC32K_RUNSTDBY 0 184 #endif 185 186 // <q> 1kHz Output Enable 187 // <i> Indicates whether 1kHz Output is enabled or not 188 // <id> osc32k_arch_en1k 189 #ifndef CONF_OSC32K_EN1K 190 #define CONF_OSC32K_EN1K 0 191 #endif 192 193 // <q> 32kHz Output Enable 194 // <i> Indicates whether 32kHz Output is enabled or not 195 // <id> osc32k_arch_en32k 196 #ifndef CONF_OSC32K_EN32K 197 #define CONF_OSC32K_EN32K 0 198 #endif 199 // </h> 200 // </e> 201 202 // <e> 32kHz Ultra Low Power Internal Oscillator Configuration 203 // <i> Indicates whether configuration for OSCULP32K is enabled or not 204 // <id> enable_osculp32k 205 #ifndef CONF_OSCULP32K_CONFIG 206 #define CONF_OSCULP32K_CONFIG 1 207 #endif 208 209 // <h> 32kHz Ultra Low Power Internal Oscillator Control 210 211 // <q> Oscillator Calibration Control 212 // <i> Indicates whether Oscillator Calibration is enabled or not 213 // <id> osculp32k_calib_enable 214 #ifndef CONF_OSCULP32K_CALIB_ENABLE 215 #define CONF_OSCULP32K_CALIB_ENABLE 0 216 #endif 217 218 // <o> Oscillator Calibration <0x0-0x1F> 219 // <id> osculp32k_calib 220 #ifndef CONF_OSCULP32K_CALIB 221 #define CONF_OSCULP32K_CALIB 0x0 222 #endif 223 224 // </h> 225 // </e> 226 227 // <<< end of configuration section >>> 228 229 #endif // HPL_OSC32KCTRL_CONFIG_H 230