Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 1 | /* Auto-generated config file hpl_oscctrl_config.h */ |
| 2 | #ifndef HPL_OSCCTRL_CONFIG_H |
| 3 | #define HPL_OSCCTRL_CONFIG_H |
| 4 | |
| 5 | // <<< Use Configuration Wizard in Context Menu >>> |
| 6 | |
| 7 | // <e> External Multipurpose Crystal Oscillator Configuration |
| 8 | // <i> Indicates whether configuration for XOSC0 is enabled or not |
| 9 | // <id> enable_xosc0 |
| 10 | #ifndef CONF_XOSC0_CONFIG |
| 11 | #define CONF_XOSC0_CONFIG 0 |
| 12 | #endif |
| 13 | |
| 14 | // <o> Frequency <8000000-48000000> |
| 15 | // <i> Oscillation frequency of the resonator connected to the External Multipurpose Crystal Oscillator. |
| 16 | // <id> xosc0_frequency |
| 17 | #ifndef CONF_XOSC_FREQUENCY |
| 18 | #define CONF_XOSC0_FREQUENCY 12000000 |
| 19 | #endif |
| 20 | |
| 21 | // <h> External Multipurpose Crystal Oscillator Control |
| 22 | // <q> Oscillator enable |
| 23 | // <i> Indicates whether External Multipurpose Crystal Oscillator is enabled or not |
| 24 | // <id> xosc0_arch_enable |
| 25 | #ifndef CONF_XOSC0_ENABLE |
| 26 | #define CONF_XOSC0_ENABLE 0 |
| 27 | #endif |
| 28 | |
| 29 | // <o> Start-Up Time |
| 30 | // <0x0=>31us |
| 31 | // <0x1=>61us |
| 32 | // <0x2=>122us |
| 33 | // <0x3=>244us |
| 34 | // <0x4=>488us |
| 35 | // <0x5=>977us |
| 36 | // <0x6=>1953us |
| 37 | // <0x7=>3906us |
| 38 | // <0x8=>7813us |
| 39 | // <0x9=>15625us |
| 40 | // <0xA=>31250us |
| 41 | // <0xB=>62500us |
| 42 | // <0xC=>125000us |
| 43 | // <0xD=>250000us |
| 44 | // <0xE=>500000us |
| 45 | // <0xF=>1000000us |
| 46 | // <id> xosc0_arch_startup |
| 47 | #ifndef CONF_XOSC0_STARTUP |
| 48 | #define CONF_XOSC0_STARTUP 0 |
| 49 | #endif |
| 50 | |
| 51 | // <q> Clock Switch Back |
| 52 | // <i> Indicates whether Clock Switch Back is enabled or not |
| 53 | // <id> xosc0_arch_swben |
| 54 | #ifndef CONF_XOSC0_SWBEN |
| 55 | #define CONF_XOSC0_SWBEN 0 |
| 56 | #endif |
| 57 | |
| 58 | // <q> Clock Failure Detector |
| 59 | // <i> Indicates whether Clock Failure Detector is enabled or not |
| 60 | // <id> xosc0_arch_cfden |
| 61 | #ifndef CONF_XOSC0_CFDEN |
| 62 | #define CONF_XOSC0_CFDEN 0 |
| 63 | #endif |
| 64 | |
| 65 | // <q> Automatic Loop Control Enable |
| 66 | // <i> Indicates whether Automatic Loop Control is enabled or not |
| 67 | // <id> xosc0_arch_enalc |
| 68 | #ifndef CONF_XOSC0_ENALC |
| 69 | #define CONF_XOSC0_ENALC 0 |
| 70 | #endif |
| 71 | |
| 72 | // <q> Low Buffer Gain Enable |
| 73 | // <i> Indicates whether Low Buffer Gain is enabled or not |
| 74 | // <id> xosc0_arch_lowbufgain |
| 75 | #ifndef CONF_XOSC0_LOWBUFGAIN |
| 76 | #define CONF_XOSC0_LOWBUFGAIN 0 |
| 77 | #endif |
| 78 | |
| 79 | // <q> On Demand Control |
| 80 | // <i> Indicates whether On Demand Control is enabled or not |
| 81 | // <id> xosc0_arch_ondemand |
| 82 | #ifndef CONF_XOSC0_ONDEMAND |
| 83 | #define CONF_XOSC0_ONDEMAND 0 |
| 84 | #endif |
| 85 | |
| 86 | // <q> Run in Standby |
| 87 | // <i> Indicates whether Run in Standby is enabled or not |
| 88 | // <id> xosc0_arch_runstdby |
| 89 | #ifndef CONF_XOSC0_RUNSTDBY |
| 90 | #define CONF_XOSC0_RUNSTDBY 0 |
| 91 | #endif |
| 92 | |
| 93 | // <q> Crystal connected to XIN/XOUT Enable |
| 94 | // <i> Indicates whether the connections between the I/O pads and the external clock or crystal oscillator is enabled or not |
| 95 | // <id> xosc0_arch_xtalen |
| 96 | #ifndef CONF_XOSC0_XTALEN |
| 97 | #define CONF_XOSC0_XTALEN 0 |
| 98 | #endif |
| 99 | //</h> |
| 100 | //</e> |
| 101 | |
| 102 | #if CONF_XOSC0_FREQUENCY >= 32000000 |
| 103 | #define CONF_XOSC0_CFDPRESC 0x0 |
| 104 | #define CONF_XOSC0_IMULT 0x7 |
| 105 | #define CONF_XOSC0_IPTAT 0x3 |
| 106 | #elif CONF_XOSC0_FREQUENCY >= 24000000 |
| 107 | #define CONF_XOSC0_CFDPRESC 0x1 |
| 108 | #define CONF_XOSC0_IMULT 0x6 |
| 109 | #define CONF_XOSC0_IPTAT 0x3 |
| 110 | #elif CONF_XOSC0_FREQUENCY >= 16000000 |
| 111 | #define CONF_XOSC0_CFDPRESC 0x2 |
| 112 | #define CONF_XOSC0_IMULT 0x5 |
| 113 | #define CONF_XOSC0_IPTAT 0x3 |
| 114 | #elif CONF_XOSC0_FREQUENCY >= 8000000 |
| 115 | #define CONF_XOSC0_CFDPRESC 0x3 |
| 116 | #define CONF_XOSC0_IMULT 0x4 |
| 117 | #define CONF_XOSC0_IPTAT 0x3 |
| 118 | #endif |
| 119 | |
| 120 | // <e> External Multipurpose Crystal Oscillator Configuration |
| 121 | // <i> Indicates whether configuration for XOSC1 is enabled or not |
| 122 | // <id> enable_xosc1 |
| 123 | #ifndef CONF_XOSC1_CONFIG |
| 124 | #define CONF_XOSC1_CONFIG 1 |
| 125 | #endif |
| 126 | |
| 127 | // <o> Frequency <8000000-48000000> |
| 128 | // <i> Oscillation frequency of the resonator connected to the External Multipurpose Crystal Oscillator. |
| 129 | // <id> xosc1_frequency |
| 130 | #ifndef CONF_XOSC_FREQUENCY |
| 131 | #define CONF_XOSC1_FREQUENCY 12000000 |
| 132 | #endif |
| 133 | |
| 134 | // <h> External Multipurpose Crystal Oscillator Control |
| 135 | // <q> Oscillator enable |
| 136 | // <i> Indicates whether External Multipurpose Crystal Oscillator is enabled or not |
| 137 | // <id> xosc1_arch_enable |
| 138 | #ifndef CONF_XOSC1_ENABLE |
| 139 | #define CONF_XOSC1_ENABLE 1 |
| 140 | #endif |
| 141 | |
| 142 | // <o> Start-Up Time |
| 143 | // <0x0=>31us |
| 144 | // <0x1=>61us |
| 145 | // <0x2=>122us |
| 146 | // <0x3=>244us |
| 147 | // <0x4=>488us |
| 148 | // <0x5=>977us |
| 149 | // <0x6=>1953us |
| 150 | // <0x7=>3906us |
| 151 | // <0x8=>7813us |
| 152 | // <0x9=>15625us |
| 153 | // <0xA=>31250us |
| 154 | // <0xB=>62500us |
| 155 | // <0xC=>125000us |
| 156 | // <0xD=>250000us |
| 157 | // <0xE=>500000us |
| 158 | // <0xF=>1000000us |
| 159 | // <id> xosc1_arch_startup |
| 160 | #ifndef CONF_XOSC1_STARTUP |
| 161 | #define CONF_XOSC1_STARTUP 0 |
| 162 | #endif |
| 163 | |
| 164 | // <q> Clock Switch Back |
| 165 | // <i> Indicates whether Clock Switch Back is enabled or not |
| 166 | // <id> xosc1_arch_swben |
| 167 | #ifndef CONF_XOSC1_SWBEN |
| 168 | #define CONF_XOSC1_SWBEN 0 |
| 169 | #endif |
| 170 | |
| 171 | // <q> Clock Failure Detector |
| 172 | // <i> Indicates whether Clock Failure Detector is enabled or not |
| 173 | // <id> xosc1_arch_cfden |
| 174 | #ifndef CONF_XOSC1_CFDEN |
| 175 | #define CONF_XOSC1_CFDEN 0 |
| 176 | #endif |
| 177 | |
| 178 | // <q> Automatic Loop Control Enable |
| 179 | // <i> Indicates whether Automatic Loop Control is enabled or not |
| 180 | // <id> xosc1_arch_enalc |
| 181 | #ifndef CONF_XOSC1_ENALC |
| 182 | #define CONF_XOSC1_ENALC 0 |
| 183 | #endif |
| 184 | |
| 185 | // <q> Low Buffer Gain Enable |
| 186 | // <i> Indicates whether Low Buffer Gain is enabled or not |
| 187 | // <id> xosc1_arch_lowbufgain |
| 188 | #ifndef CONF_XOSC1_LOWBUFGAIN |
| 189 | #define CONF_XOSC1_LOWBUFGAIN 0 |
| 190 | #endif |
| 191 | |
| 192 | // <q> On Demand Control |
| 193 | // <i> Indicates whether On Demand Control is enabled or not |
| 194 | // <id> xosc1_arch_ondemand |
| 195 | #ifndef CONF_XOSC1_ONDEMAND |
| 196 | #define CONF_XOSC1_ONDEMAND 0 |
| 197 | #endif |
| 198 | |
| 199 | // <q> Run in Standby |
| 200 | // <i> Indicates whether Run in Standby is enabled or not |
| 201 | // <id> xosc1_arch_runstdby |
| 202 | #ifndef CONF_XOSC1_RUNSTDBY |
| 203 | #define CONF_XOSC1_RUNSTDBY 0 |
| 204 | #endif |
| 205 | |
| 206 | // <q> Crystal connected to XIN/XOUT Enable |
| 207 | // <i> Indicates whether the connections between the I/O pads and the external clock or crystal oscillator is enabled or not |
| 208 | // <id> xosc1_arch_xtalen |
| 209 | #ifndef CONF_XOSC1_XTALEN |
| 210 | #define CONF_XOSC1_XTALEN 1 |
| 211 | #endif |
| 212 | //</h> |
| 213 | //</e> |
| 214 | |
| 215 | #if CONF_XOSC1_FREQUENCY >= 32000000 |
| 216 | #define CONF_XOSC1_CFDPRESC 0x0 |
| 217 | #define CONF_XOSC1_IMULT 0x7 |
| 218 | #define CONF_XOSC1_IPTAT 0x3 |
| 219 | #elif CONF_XOSC1_FREQUENCY >= 24000000 |
| 220 | #define CONF_XOSC1_CFDPRESC 0x1 |
| 221 | #define CONF_XOSC1_IMULT 0x6 |
| 222 | #define CONF_XOSC1_IPTAT 0x3 |
| 223 | #elif CONF_XOSC1_FREQUENCY >= 16000000 |
| 224 | #define CONF_XOSC1_CFDPRESC 0x2 |
| 225 | #define CONF_XOSC1_IMULT 0x5 |
| 226 | #define CONF_XOSC1_IPTAT 0x3 |
| 227 | #elif CONF_XOSC1_FREQUENCY >= 8000000 |
| 228 | #define CONF_XOSC1_CFDPRESC 0x3 |
| 229 | #define CONF_XOSC1_IMULT 0x4 |
| 230 | #define CONF_XOSC1_IPTAT 0x3 |
| 231 | #endif |
| 232 | |
| 233 | // <e> DFLL Configuration |
| 234 | // <i> Indicates whether configuration for DFLL is enabled or not |
| 235 | // <id> enable_dfll |
| 236 | #ifndef CONF_DFLL_CONFIG |
| 237 | #define CONF_DFLL_CONFIG 1 |
| 238 | #endif |
| 239 | |
| 240 | // <y> Reference Clock Source |
| 241 | // <GCLK_PCHCTRL_GEN_GCLK0_Val"> Generic clock generator 0 |
| 242 | // <GCLK_PCHCTRL_GEN_GCLK1_Val"> Generic clock generator 1 |
| 243 | // <GCLK_PCHCTRL_GEN_GCLK2_Val"> Generic clock generator 2 |
| 244 | // <GCLK_PCHCTRL_GEN_GCLK3_Val"> Generic clock generator 3 |
| 245 | // <GCLK_PCHCTRL_GEN_GCLK4_Val"> Generic clock generator 4 |
| 246 | // <GCLK_PCHCTRL_GEN_GCLK5_Val"> Generic clock generator 5 |
| 247 | // <GCLK_PCHCTRL_GEN_GCLK6_Val"> Generic clock generator 6 |
| 248 | // <GCLK_PCHCTRL_GEN_GCLK7_Val"> Generic clock generator 7 |
| 249 | // <GCLK_PCHCTRL_GEN_GCLK8_Val"> Generic clock generator 8 |
| 250 | // <GCLK_PCHCTRL_GEN_GCLK9_Val"> Generic clock generator 9 |
| 251 | // <GCLK_PCHCTRL_GEN_GCLK10_Val"> Generic clock generator 10 |
| 252 | // <GCLK_PCHCTRL_GEN_GCLK11_Val"> Generic clock generator 11 |
| 253 | // <i> Select the clock source |
| 254 | // <id> dfll_ref_clock |
| 255 | #ifndef CONF_DFLL_GCLK |
| 256 | #define CONF_DFLL_GCLK GCLK_PCHCTRL_GEN_GCLK3_Val |
| 257 | #endif |
| 258 | |
| 259 | // <h> Digital Frequency Locked Loop Control |
| 260 | // <q> DFLL Enable |
| 261 | // <i> Indicates whether DFLL is enabled or not |
| 262 | // <id> dfll_arch_enable |
| 263 | #ifndef CONF_DFLL_ENABLE |
| 264 | #define CONF_DFLL_ENABLE 1 |
| 265 | #endif |
| 266 | |
| 267 | // <q> On Demand Control |
| 268 | // <i> Indicates whether On Demand Control is enabled or not |
| 269 | // <id> dfll_arch_ondemand |
| 270 | #ifndef CONF_DFLL_ONDEMAND |
| 271 | #define CONF_DFLL_ONDEMAND 0 |
| 272 | #endif |
| 273 | |
| 274 | // <q> Run in Standby |
| 275 | // <i> Indicates whether Run in Standby is enabled or not |
| 276 | // <id> dfll_arch_runstdby |
| 277 | #ifndef CONF_DFLL_RUNSTDBY |
| 278 | #define CONF_DFLL_RUNSTDBY 0 |
| 279 | #endif |
| 280 | |
| 281 | // <q> USB Clock Recovery Mode |
| 282 | // <i> Indicates whether USB Clock Recovery Mode is enabled or not |
| 283 | // <id> dfll_arch_usbcrm |
| 284 | #ifndef CONF_DFLL_USBCRM |
| 285 | #define CONF_DFLL_USBCRM 1 |
| 286 | #endif |
| 287 | |
| 288 | // <q> Wait Lock |
| 289 | // <i> Indicates whether Wait Lock is enabled or not |
| 290 | // <id> dfll_arch_waitlock |
| 291 | #ifndef CONF_DFLL_WAITLOCK |
| 292 | #define CONF_DFLL_WAITLOCK 0 |
| 293 | #endif |
| 294 | |
| 295 | // <q> Bypass Coarse Lock |
| 296 | // <i> Indicates whether Bypass Coarse Lock is enabled or not |
| 297 | // <id> dfll_arch_bplckc |
| 298 | #ifndef CONF_DFLL_BPLCKC |
| 299 | #define CONF_DFLL_BPLCKC 0 |
| 300 | #endif |
| 301 | |
| 302 | // <q> Quick Lock Disable |
| 303 | // <i> Indicates whether Quick Lock Disable is enabled or not |
| 304 | // <id> dfll_arch_qldis |
| 305 | #ifndef CONF_DFLL_QLDIS |
| 306 | #define CONF_DFLL_QLDIS 0 |
| 307 | #endif |
| 308 | |
| 309 | // <q> Chill Cycle Disable |
| 310 | // <i> Indicates whether Chill Cycle Disable is enabled or not |
| 311 | // <id> dfll_arch_ccdis |
| 312 | #ifndef CONF_DFLL_CCDIS |
| 313 | #define CONF_DFLL_CCDIS 1 |
| 314 | #endif |
| 315 | |
| 316 | // <q> Lose Lock After Wake |
| 317 | // <i> Indicates whether Lose Lock After Wake is enabled or not |
| 318 | // <id> dfll_arch_llaw |
| 319 | #ifndef CONF_DFLL_LLAW |
| 320 | #define CONF_DFLL_LLAW 0 |
| 321 | #endif |
| 322 | |
| 323 | // <q> Stable DFLL Frequency |
| 324 | // <i> Indicates whether Stable DFLL Frequency is enabled or not |
| 325 | // <id> dfll_arch_stable |
| 326 | #ifndef CONF_DFLL_STABLE |
| 327 | #define CONF_DFLL_STABLE 0 |
| 328 | #endif |
| 329 | |
| 330 | // <o> Operating Mode Selection |
| 331 | // <0=>Open Loop Mode |
| 332 | // <1=>Closed Loop Mode |
| 333 | // <id> dfll_mode |
| 334 | #ifndef CONF_DFLL_MODE |
| 335 | #define CONF_DFLL_MODE 0x1 |
| 336 | #endif |
| 337 | |
| 338 | // <o> Coarse Maximum Step <0x0-0x1F> |
| 339 | // <id> dfll_arch_cstep |
| 340 | #ifndef CONF_DFLL_CSTEP |
| 341 | #define CONF_DFLL_CSTEP 0x1 |
| 342 | #endif |
| 343 | |
| 344 | // <o> Fine Maximum Step <0x0-0xFF> |
| 345 | // <id> dfll_arch_fstep |
| 346 | #ifndef CONF_DFLL_FSTEP |
| 347 | #define CONF_DFLL_FSTEP 0x1 |
| 348 | #endif |
| 349 | |
| 350 | // <o> DFLL Multiply Factor <0x0-0xFFFF> |
| 351 | // <id> dfll_mul |
| 352 | #ifndef CONF_DFLL_MUL |
| 353 | #define CONF_DFLL_MUL 0xbb80 |
| 354 | #endif |
| 355 | |
| 356 | // <e> DFLL Calibration Overwrite |
| 357 | // <i> Indicates whether Overwrite Calibration value of DFLL |
| 358 | // <id> dfll_arch_calibration |
| 359 | #ifndef CONF_DFLL_OVERWRITE_CALIBRATION |
| 360 | #define CONF_DFLL_OVERWRITE_CALIBRATION 0 |
| 361 | #endif |
| 362 | |
| 363 | // <o> Coarse Value <0x0-0x3F> |
| 364 | // <id> dfll_arch_coarse |
| 365 | #ifndef CONF_DFLL_COARSE |
| 366 | #define CONF_DFLL_COARSE (0x1f / 4) |
| 367 | #endif |
| 368 | |
| 369 | // <o> Fine Value <0x0-0xFF> |
| 370 | // <id> dfll_arch_fine |
| 371 | #ifndef CONF_DFLL_FINE |
| 372 | #define CONF_DFLL_FINE (0x80) |
| 373 | #endif |
| 374 | |
| 375 | //</e> |
| 376 | |
| 377 | //</h> |
| 378 | |
| 379 | //</e> |
| 380 | |
| 381 | // <e> FDPLL0 Configuration |
| 382 | // <i> Indicates whether configuration for FDPLL0 is enabled or not |
| 383 | // <id> enable_fdpll0 |
| 384 | #ifndef CONF_FDPLL0_CONFIG |
Kévin Redon | 4a2d8f4 | 2019-01-24 17:15:10 +0100 | [diff] [blame] | 385 | #define CONF_FDPLL0_CONFIG 1 |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 386 | #endif |
| 387 | |
| 388 | // <y> Reference Clock Source |
| 389 | // <GCLK_GENCTRL_SRC_XOSC32K"> 32kHz External Crystal Oscillator (XOSC32K) |
| 390 | // <GCLK_GENCTRL_SRC_XOSC0"> External Crystal Oscillator 8-48MHz (XOSC0) |
| 391 | // <GCLK_GENCTRL_SRC_XOSC1"> External Crystal Oscillator 8-48MHz (XOSC1) |
| 392 | // <GCLK_PCHCTRL_GEN_GCLK0_Val"> Generic clock generator 0 |
| 393 | // <GCLK_PCHCTRL_GEN_GCLK1_Val"> Generic clock generator 1 |
| 394 | // <GCLK_PCHCTRL_GEN_GCLK2_Val"> Generic clock generator 2 |
| 395 | // <GCLK_PCHCTRL_GEN_GCLK3_Val"> Generic clock generator 3 |
| 396 | // <GCLK_PCHCTRL_GEN_GCLK4_Val"> Generic clock generator 4 |
| 397 | // <GCLK_PCHCTRL_GEN_GCLK5_Val"> Generic clock generator 5 |
| 398 | // <GCLK_PCHCTRL_GEN_GCLK6_Val"> Generic clock generator 6 |
| 399 | // <GCLK_PCHCTRL_GEN_GCLK7_Val"> Generic clock generator 7 |
| 400 | // <GCLK_PCHCTRL_GEN_GCLK8_Val"> Generic clock generator 8 |
| 401 | // <GCLK_PCHCTRL_GEN_GCLK9_Val"> Generic clock generator 9 |
| 402 | // <GCLK_PCHCTRL_GEN_GCLK10_Val"> Generic clock generator 10 |
| 403 | // <GCLK_PCHCTRL_GEN_GCLK11_Val"> Generic clock generator 11 |
| 404 | // <i> Select the clock source. |
| 405 | // <id> fdpll0_ref_clock |
| 406 | #ifndef CONF_FDPLL0_GCLK |
Kévin Redon | 6b9363c | 2019-01-24 17:21:33 +0100 | [diff] [blame] | 407 | #define CONF_FDPLL0_GCLK GCLK_GENCTRL_SRC_XOSC1 |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 408 | #endif |
| 409 | |
| 410 | // <h> Digital Phase Locked Loop Control |
| 411 | // <q> Enable |
| 412 | // <i> Indicates whether Digital Phase Locked Loop is enabled or not |
| 413 | // <id> fdpll0_arch_enable |
| 414 | #ifndef CONF_FDPLL0_ENABLE |
Kévin Redon | 4a2d8f4 | 2019-01-24 17:15:10 +0100 | [diff] [blame] | 415 | #define CONF_FDPLL0_ENABLE 1 |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 416 | #endif |
| 417 | |
| 418 | // <q> On Demand Control |
| 419 | // <i> Indicates whether On Demand Control is enabled or not |
| 420 | // <id> fdpll0_arch_ondemand |
| 421 | #ifndef CONF_FDPLL0_ONDEMAND |
| 422 | #define CONF_FDPLL0_ONDEMAND 0 |
| 423 | #endif |
| 424 | |
| 425 | // <q> Run in Standby |
| 426 | // <i> Indicates whether Run in Standby is enabled or not |
| 427 | // <id> fdpll0_arch_runstdby |
| 428 | #ifndef CONF_FDPLL0_RUNSTDBY |
| 429 | #define CONF_FDPLL0_RUNSTDBY 0 |
| 430 | #endif |
| 431 | |
| 432 | // <o> Loop Divider Ratio Fractional Part <0x0-0x1F> |
| 433 | // <id> fdpll0_ldrfrac |
| 434 | #ifndef CONF_FDPLL0_LDRFRAC |
Kévin Redon | 4a2d8f4 | 2019-01-24 17:15:10 +0100 | [diff] [blame] | 435 | #define CONF_FDPLL0_LDRFRAC 0x0 |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 436 | #endif |
| 437 | |
| 438 | // <o> Loop Divider Ratio Integer Part <0x0-0x1FFF> |
| 439 | // <id> fdpll0_ldr |
| 440 | #ifndef CONF_FDPLL0_LDR |
Kévin Redon | 4a2d8f4 | 2019-01-24 17:15:10 +0100 | [diff] [blame] | 441 | #define CONF_FDPLL0_LDR 0x3b |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 442 | #endif |
| 443 | |
| 444 | // <o> Clock Divider <0x0-0x7FF> |
| 445 | // <id> fdpll0_clock_div |
| 446 | #ifndef CONF_FDPLL0_DIV |
Kévin Redon | 4a2d8f4 | 2019-01-24 17:15:10 +0100 | [diff] [blame] | 447 | #define CONF_FDPLL0_DIV 0x6 |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 448 | #endif |
| 449 | |
| 450 | // <q> DCO Filter Enable |
| 451 | // <i> Indicates whether DCO Filter Enable is enabled or not |
| 452 | // <id> fdpll0_arch_dcoen |
| 453 | #ifndef CONF_FDPLL0_DCOEN |
| 454 | #define CONF_FDPLL0_DCOEN 0 |
| 455 | #endif |
| 456 | |
| 457 | // <o> Sigma-Delta DCO Filter Selection <0x0-0x7> |
| 458 | // <id> fdpll0_clock_dcofilter |
| 459 | #ifndef CONF_FDPLL0_DCOFILTER |
| 460 | #define CONF_FDPLL0_DCOFILTER 0x0 |
| 461 | #endif |
| 462 | |
| 463 | // <q> Lock Bypass |
| 464 | // <i> Indicates whether Lock Bypass is enabled or not |
| 465 | // <id> fdpll0_arch_lbypass |
| 466 | #ifndef CONF_FDPLL0_LBYPASS |
| 467 | #define CONF_FDPLL0_LBYPASS 0 |
| 468 | #endif |
| 469 | |
| 470 | // <o> Lock Time |
| 471 | // <0x0=>No time-out, automatic lock |
| 472 | // <0x4=>The Time-out if no lock within 800 us |
| 473 | // <0x5=>The Time-out if no lock within 900 us |
| 474 | // <0x6=>The Time-out if no lock within 1 ms |
| 475 | // <0x7=>The Time-out if no lock within 11 ms |
| 476 | // <id> fdpll0_arch_ltime |
| 477 | #ifndef CONF_FDPLL0_LTIME |
| 478 | #define CONF_FDPLL0_LTIME 0x0 |
| 479 | #endif |
| 480 | |
| 481 | // <o> Reference Clock Selection |
| 482 | // <0x0=>GCLK clock reference |
| 483 | // <0x1=>XOSC32K clock reference |
| 484 | // <0x2=>XOSC0 clock reference |
| 485 | // <0x3=>XOSC1 clock reference |
| 486 | // <id> fdpll0_arch_refclk |
| 487 | #ifndef CONF_FDPLL0_REFCLK |
Kévin Redon | 4a2d8f4 | 2019-01-24 17:15:10 +0100 | [diff] [blame] | 488 | #define CONF_FDPLL0_REFCLK 0x3 |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 489 | #endif |
| 490 | |
| 491 | // <q> Wake Up Fast |
| 492 | // <i> Indicates whether Wake Up Fast is enabled or not |
| 493 | // <id> fdpll0_arch_wuf |
| 494 | #ifndef CONF_FDPLL0_WUF |
| 495 | #define CONF_FDPLL0_WUF 0 |
| 496 | #endif |
| 497 | |
| 498 | // <o> Proportional Integral Filter Selection <0x0-0xF> |
| 499 | // <id> fdpll0_arch_filter |
| 500 | #ifndef CONF_FDPLL0_FILTER |
| 501 | #define CONF_FDPLL0_FILTER 0x0 |
| 502 | #endif |
| 503 | |
| 504 | //</h> |
| 505 | //</e> |
| 506 | // <e> FDPLL1 Configuration |
| 507 | // <i> Indicates whether configuration for FDPLL1 is enabled or not |
| 508 | // <id> enable_fdpll1 |
| 509 | #ifndef CONF_FDPLL1_CONFIG |
Kévin Redon | 4cb8e32 | 2019-01-24 17:41:44 +0100 | [diff] [blame] | 510 | #define CONF_FDPLL1_CONFIG 1 |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 511 | #endif |
| 512 | |
| 513 | // <y> Reference Clock Source |
| 514 | // <GCLK_GENCTRL_SRC_XOSC32K"> 32kHz External Crystal Oscillator (XOSC32K) |
| 515 | // <GCLK_GENCTRL_SRC_XOSC0"> External Crystal Oscillator 8-48MHz (XOSC0) |
| 516 | // <GCLK_GENCTRL_SRC_XOSC1"> External Crystal Oscillator 8-48MHz (XOSC1) |
| 517 | // <GCLK_PCHCTRL_GEN_GCLK0_Val"> Generic clock generator 0 |
| 518 | // <GCLK_PCHCTRL_GEN_GCLK1_Val"> Generic clock generator 1 |
| 519 | // <GCLK_PCHCTRL_GEN_GCLK2_Val"> Generic clock generator 2 |
| 520 | // <GCLK_PCHCTRL_GEN_GCLK3_Val"> Generic clock generator 3 |
| 521 | // <GCLK_PCHCTRL_GEN_GCLK4_Val"> Generic clock generator 4 |
| 522 | // <GCLK_PCHCTRL_GEN_GCLK5_Val"> Generic clock generator 5 |
| 523 | // <GCLK_PCHCTRL_GEN_GCLK6_Val"> Generic clock generator 6 |
| 524 | // <GCLK_PCHCTRL_GEN_GCLK7_Val"> Generic clock generator 7 |
| 525 | // <GCLK_PCHCTRL_GEN_GCLK8_Val"> Generic clock generator 8 |
| 526 | // <GCLK_PCHCTRL_GEN_GCLK9_Val"> Generic clock generator 9 |
| 527 | // <GCLK_PCHCTRL_GEN_GCLK10_Val"> Generic clock generator 10 |
| 528 | // <GCLK_PCHCTRL_GEN_GCLK11_Val"> Generic clock generator 11 |
| 529 | // <i> Select the clock source. |
| 530 | // <id> fdpll1_ref_clock |
| 531 | #ifndef CONF_FDPLL1_GCLK |
Kévin Redon | 4cb8e32 | 2019-01-24 17:41:44 +0100 | [diff] [blame] | 532 | #define CONF_FDPLL1_GCLK GCLK_GENCTRL_SRC_XOSC1 |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 533 | #endif |
| 534 | |
| 535 | // <h> Digital Phase Locked Loop Control |
| 536 | // <q> Enable |
| 537 | // <i> Indicates whether Digital Phase Locked Loop is enabled or not |
| 538 | // <id> fdpll1_arch_enable |
| 539 | #ifndef CONF_FDPLL1_ENABLE |
Kévin Redon | 20abc4f | 2019-01-24 17:32:17 +0100 | [diff] [blame] | 540 | #define CONF_FDPLL1_ENABLE 1 |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 541 | #endif |
| 542 | |
| 543 | // <q> On Demand Control |
| 544 | // <i> Indicates whether On Demand Control is enabled or not |
| 545 | // <id> fdpll1_arch_ondemand |
| 546 | #ifndef CONF_FDPLL1_ONDEMAND |
| 547 | #define CONF_FDPLL1_ONDEMAND 0 |
| 548 | #endif |
| 549 | |
| 550 | // <q> Run in Standby |
| 551 | // <i> Indicates whether Run in Standby is enabled or not |
| 552 | // <id> fdpll1_arch_runstdby |
| 553 | #ifndef CONF_FDPLL1_RUNSTDBY |
| 554 | #define CONF_FDPLL1_RUNSTDBY 0 |
| 555 | #endif |
| 556 | |
| 557 | // <o> Loop Divider Ratio Fractional Part <0x0-0x1F> |
| 558 | // <id> fdpll1_ldrfrac |
| 559 | #ifndef CONF_FDPLL1_LDRFRAC |
Kévin Redon | 20abc4f | 2019-01-24 17:32:17 +0100 | [diff] [blame] | 560 | #define CONF_FDPLL1_LDRFRAC 0x0 |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 561 | #endif |
| 562 | |
| 563 | // <o> Loop Divider Ratio Integer Part <0x0-0x1FFF> |
| 564 | // <id> fdpll1_ldr |
| 565 | #ifndef CONF_FDPLL1_LDR |
Kévin Redon | 20abc4f | 2019-01-24 17:32:17 +0100 | [diff] [blame] | 566 | #define CONF_FDPLL1_LDR 0x31 |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 567 | #endif |
| 568 | |
| 569 | // <o> Clock Divider <0x0-0x7FF> |
| 570 | // <id> fdpll1_clock_div |
| 571 | #ifndef CONF_FDPLL1_DIV |
Kévin Redon | 20abc4f | 2019-01-24 17:32:17 +0100 | [diff] [blame] | 572 | #define CONF_FDPLL1_DIV 0x6 |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 573 | #endif |
| 574 | |
| 575 | // <q> DCO Filter Enable |
| 576 | // <i> Indicates whether DCO Filter Enable is enabled or not |
| 577 | // <id> fdpll1_arch_dcoen |
| 578 | #ifndef CONF_FDPLL1_DCOEN |
| 579 | #define CONF_FDPLL1_DCOEN 0 |
| 580 | #endif |
| 581 | |
| 582 | // <o> Sigma-Delta DCO Filter Selection <0x0-0x7> |
| 583 | // <id> fdpll1_clock_dcofilter |
| 584 | #ifndef CONF_FDPLL1_DCOFILTER |
| 585 | #define CONF_FDPLL1_DCOFILTER 0x0 |
| 586 | #endif |
| 587 | |
| 588 | // <q> Lock Bypass |
| 589 | // <i> Indicates whether Lock Bypass is enabled or not |
| 590 | // <id> fdpll1_arch_lbypass |
| 591 | #ifndef CONF_FDPLL1_LBYPASS |
| 592 | #define CONF_FDPLL1_LBYPASS 0 |
| 593 | #endif |
| 594 | |
| 595 | // <o> Lock Time |
| 596 | // <0x0=>No time-out, automatic lock |
| 597 | // <0x4=>The Time-out if no lock within 800 us |
| 598 | // <0x5=>The Time-out if no lock within 900 us |
| 599 | // <0x6=>The Time-out if no lock within 1 ms |
| 600 | // <0x7=>The Time-out if no lock within 11 ms |
| 601 | // <id> fdpll1_arch_ltime |
| 602 | #ifndef CONF_FDPLL1_LTIME |
| 603 | #define CONF_FDPLL1_LTIME 0x0 |
| 604 | #endif |
| 605 | |
| 606 | // <o> Reference Clock Selection |
| 607 | // <0x0=>GCLK clock reference |
| 608 | // <0x1=>XOSC32K clock reference |
| 609 | // <0x2=>XOSC0 clock reference |
| 610 | // <0x3=>XOSC1 clock reference |
| 611 | // <id> fdpll1_arch_refclk |
| 612 | #ifndef CONF_FDPLL1_REFCLK |
Kévin Redon | 20abc4f | 2019-01-24 17:32:17 +0100 | [diff] [blame] | 613 | #define CONF_FDPLL1_REFCLK 0x3 |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 614 | #endif |
| 615 | |
| 616 | // <q> Wake Up Fast |
| 617 | // <i> Indicates whether Wake Up Fast is enabled or not |
| 618 | // <id> fdpll1_arch_wuf |
| 619 | #ifndef CONF_FDPLL1_WUF |
| 620 | #define CONF_FDPLL1_WUF 0 |
| 621 | #endif |
| 622 | |
| 623 | // <o> Proportional Integral Filter Selection <0x0-0xF> |
| 624 | // <id> fdpll1_arch_filter |
| 625 | #ifndef CONF_FDPLL1_FILTER |
| 626 | #define CONF_FDPLL1_FILTER 0x0 |
| 627 | #endif |
| 628 | |
| 629 | //</h> |
| 630 | //</e> |
| 631 | |
| 632 | // <<< end of configuration section >>> |
| 633 | |
| 634 | #endif // HPL_OSCCTRL_CONFIG_H |