Public fork of mbed-src to add generic stm32f030k6 target
Fork of mbed-src by
targets/hal/TARGET_Atmel/config/conf_clocks.h@592:a274ee790e56, 2015-07-17 (annotated)
- Committer:
- mbed_official
- Date:
- Fri Jul 17 09:15:10 2015 +0100
- Revision:
- 592:a274ee790e56
- Parent:
- 579:53297373a894
Synchronized with git revision e7144f83a8d75df80c4877936b6ffe552b0be9e6
Full URL: https://github.com/mbedmicro/mbed/commit/e7144f83a8d75df80c4877936b6ffe552b0be9e6/
More API implementation for SAMR21
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 579:53297373a894 | 1 | #include <clock.h> |
mbed_official | 579:53297373a894 | 2 | |
mbed_official | 579:53297373a894 | 3 | #ifndef CONF_CLOCKS_H_INCLUDED |
mbed_official | 579:53297373a894 | 4 | # define CONF_CLOCKS_H_INCLUDED |
mbed_official | 579:53297373a894 | 5 | |
mbed_official | 579:53297373a894 | 6 | /* System clock bus configuration */ |
mbed_official | 579:53297373a894 | 7 | # define CONF_CLOCK_CPU_CLOCK_FAILURE_DETECT false |
mbed_official | 579:53297373a894 | 8 | # define CONF_CLOCK_FLASH_WAIT_STATES 0 |
mbed_official | 579:53297373a894 | 9 | # define CONF_CLOCK_CPU_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1 |
mbed_official | 579:53297373a894 | 10 | # define CONF_CLOCK_APBA_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1 |
mbed_official | 579:53297373a894 | 11 | # define CONF_CLOCK_APBB_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1 |
mbed_official | 579:53297373a894 | 12 | |
mbed_official | 579:53297373a894 | 13 | /* SYSTEM_CLOCK_SOURCE_OSC8M configuration - Internal 8MHz oscillator */ |
mbed_official | 579:53297373a894 | 14 | # define CONF_CLOCK_OSC8M_PRESCALER SYSTEM_OSC8M_DIV_1 |
mbed_official | 579:53297373a894 | 15 | # define CONF_CLOCK_OSC8M_ON_DEMAND true |
mbed_official | 579:53297373a894 | 16 | # define CONF_CLOCK_OSC8M_RUN_IN_STANDBY false |
mbed_official | 579:53297373a894 | 17 | |
mbed_official | 579:53297373a894 | 18 | /* SYSTEM_CLOCK_SOURCE_XOSC configuration - External clock/oscillator */ |
mbed_official | 579:53297373a894 | 19 | # define CONF_CLOCK_XOSC_ENABLE false |
mbed_official | 579:53297373a894 | 20 | # define CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL |
mbed_official | 579:53297373a894 | 21 | # define CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY 12000000UL |
mbed_official | 579:53297373a894 | 22 | # define CONF_CLOCK_XOSC_STARTUP_TIME SYSTEM_XOSC_STARTUP_32768 |
mbed_official | 579:53297373a894 | 23 | # define CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL true |
mbed_official | 579:53297373a894 | 24 | # define CONF_CLOCK_XOSC_ON_DEMAND true |
mbed_official | 579:53297373a894 | 25 | # define CONF_CLOCK_XOSC_RUN_IN_STANDBY false |
mbed_official | 579:53297373a894 | 26 | |
mbed_official | 579:53297373a894 | 27 | /* SYSTEM_CLOCK_SOURCE_XOSC32K configuration - External 32KHz crystal/clock oscillator */ |
mbed_official | 579:53297373a894 | 28 | # define CONF_CLOCK_XOSC32K_ENABLE false |
mbed_official | 579:53297373a894 | 29 | # define CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL |
mbed_official | 579:53297373a894 | 30 | # define CONF_CLOCK_XOSC32K_STARTUP_TIME SYSTEM_XOSC32K_STARTUP_65536 |
mbed_official | 579:53297373a894 | 31 | # define CONF_CLOCK_XOSC32K_AUTO_AMPLITUDE_CONTROL false |
mbed_official | 579:53297373a894 | 32 | # define CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT false |
mbed_official | 579:53297373a894 | 33 | # define CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT true |
mbed_official | 579:53297373a894 | 34 | # define CONF_CLOCK_XOSC32K_ON_DEMAND true |
mbed_official | 579:53297373a894 | 35 | # define CONF_CLOCK_XOSC32K_RUN_IN_STANDBY false |
mbed_official | 579:53297373a894 | 36 | |
mbed_official | 592:a274ee790e56 | 37 | //! [oscillator_settings] |
mbed_official | 579:53297373a894 | 38 | /* SYSTEM_CLOCK_SOURCE_OSC32K configuration - Internal 32KHz oscillator */ |
mbed_official | 592:a274ee790e56 | 39 | # define CONF_CLOCK_OSC32K_ENABLE true |
mbed_official | 579:53297373a894 | 40 | # define CONF_CLOCK_OSC32K_STARTUP_TIME SYSTEM_OSC32K_STARTUP_130 |
mbed_official | 579:53297373a894 | 41 | # define CONF_CLOCK_OSC32K_ENABLE_1KHZ_OUTPUT true |
mbed_official | 579:53297373a894 | 42 | # define CONF_CLOCK_OSC32K_ENABLE_32KHZ_OUTPUT true |
mbed_official | 579:53297373a894 | 43 | # define CONF_CLOCK_OSC32K_ON_DEMAND true |
mbed_official | 579:53297373a894 | 44 | # define CONF_CLOCK_OSC32K_RUN_IN_STANDBY false |
mbed_official | 592:a274ee790e56 | 45 | //! [oscillator_settings] |
mbed_official | 579:53297373a894 | 46 | |
mbed_official | 579:53297373a894 | 47 | /* SYSTEM_CLOCK_SOURCE_DFLL configuration - Digital Frequency Locked Loop */ |
mbed_official | 579:53297373a894 | 48 | # define CONF_CLOCK_DFLL_ENABLE false |
mbed_official | 579:53297373a894 | 49 | # define CONF_CLOCK_DFLL_LOOP_MODE SYSTEM_CLOCK_DFLL_LOOP_MODE_OPEN |
mbed_official | 579:53297373a894 | 50 | # define CONF_CLOCK_DFLL_ON_DEMAND false |
mbed_official | 579:53297373a894 | 51 | |
mbed_official | 579:53297373a894 | 52 | /* DFLL open loop mode configuration */ |
mbed_official | 579:53297373a894 | 53 | # define CONF_CLOCK_DFLL_COARSE_VALUE (0x1f / 4) |
mbed_official | 579:53297373a894 | 54 | # define CONF_CLOCK_DFLL_FINE_VALUE (0xff / 4) |
mbed_official | 579:53297373a894 | 55 | |
mbed_official | 579:53297373a894 | 56 | /* DFLL closed loop mode configuration */ |
mbed_official | 579:53297373a894 | 57 | # define CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR GCLK_GENERATOR_1 |
mbed_official | 579:53297373a894 | 58 | # define CONF_CLOCK_DFLL_MULTIPLY_FACTOR 6 |
mbed_official | 579:53297373a894 | 59 | # define CONF_CLOCK_DFLL_QUICK_LOCK true |
mbed_official | 579:53297373a894 | 60 | # define CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK true |
mbed_official | 579:53297373a894 | 61 | # define CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP true |
mbed_official | 579:53297373a894 | 62 | # define CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE true |
mbed_official | 579:53297373a894 | 63 | # define CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE (0x1f / 4) |
mbed_official | 579:53297373a894 | 64 | # define CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE (0xff / 4) |
mbed_official | 579:53297373a894 | 65 | |
mbed_official | 579:53297373a894 | 66 | /* SYSTEM_CLOCK_SOURCE_DPLL configuration - Digital Phase-Locked Loop */ |
mbed_official | 579:53297373a894 | 67 | # define CONF_CLOCK_DPLL_ENABLE false |
mbed_official | 579:53297373a894 | 68 | # define CONF_CLOCK_DPLL_ON_DEMAND true |
mbed_official | 579:53297373a894 | 69 | # define CONF_CLOCK_DPLL_RUN_IN_STANDBY false |
mbed_official | 579:53297373a894 | 70 | # define CONF_CLOCK_DPLL_LOCK_BYPASS false |
mbed_official | 579:53297373a894 | 71 | # define CONF_CLOCK_DPLL_WAKE_UP_FAST false |
mbed_official | 579:53297373a894 | 72 | # define CONF_CLOCK_DPLL_LOW_POWER_ENABLE false |
mbed_official | 579:53297373a894 | 73 | |
mbed_official | 579:53297373a894 | 74 | # define CONF_CLOCK_DPLL_LOCK_TIME SYSTEM_CLOCK_SOURCE_DPLL_LOCK_TIME_NO_TIMEOUT |
mbed_official | 579:53297373a894 | 75 | # define CONF_CLOCK_DPLL_REFERENCE_CLOCK SYSTEM_CLOCK_SOURCE_DPLL_REFERENCE_CLOCK_REF0 |
mbed_official | 579:53297373a894 | 76 | # define CONF_CLOCK_DPLL_FILTER SYSTEM_CLOCK_SOURCE_DPLL_FILTER_DEFAULT |
mbed_official | 579:53297373a894 | 77 | |
mbed_official | 579:53297373a894 | 78 | # define CONF_CLOCK_DPLL_REFERENCE_FREQUENCY 32768 |
mbed_official | 579:53297373a894 | 79 | # define CONF_CLOCK_DPLL_REFEREMCE_DIVIDER 1 |
mbed_official | 579:53297373a894 | 80 | # define CONF_CLOCK_DPLL_OUTPUT_FREQUENCY 48000000 |
mbed_official | 579:53297373a894 | 81 | |
mbed_official | 579:53297373a894 | 82 | /* Set this to true to configure the GCLK when running clocks_init. If set to |
mbed_official | 579:53297373a894 | 83 | * false, none of the GCLK generators will be configured in clocks_init(). */ |
mbed_official | 579:53297373a894 | 84 | # define CONF_CLOCK_CONFIGURE_GCLK true |
mbed_official | 579:53297373a894 | 85 | |
mbed_official | 579:53297373a894 | 86 | /* Configure GCLK generator 0 (Main Clock) */ |
mbed_official | 579:53297373a894 | 87 | # define CONF_CLOCK_GCLK_0_ENABLE true |
mbed_official | 579:53297373a894 | 88 | # define CONF_CLOCK_GCLK_0_RUN_IN_STANDBY false |
mbed_official | 579:53297373a894 | 89 | # define CONF_CLOCK_GCLK_0_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M |
mbed_official | 579:53297373a894 | 90 | # define CONF_CLOCK_GCLK_0_PRESCALER 1 |
mbed_official | 579:53297373a894 | 91 | # define CONF_CLOCK_GCLK_0_OUTPUT_ENABLE false |
mbed_official | 579:53297373a894 | 92 | |
mbed_official | 579:53297373a894 | 93 | /* Configure GCLK generator 1 */ |
mbed_official | 579:53297373a894 | 94 | # define CONF_CLOCK_GCLK_1_ENABLE false |
mbed_official | 579:53297373a894 | 95 | # define CONF_CLOCK_GCLK_1_RUN_IN_STANDBY false |
mbed_official | 579:53297373a894 | 96 | # define CONF_CLOCK_GCLK_1_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M |
mbed_official | 579:53297373a894 | 97 | # define CONF_CLOCK_GCLK_1_PRESCALER 1 |
mbed_official | 579:53297373a894 | 98 | # define CONF_CLOCK_GCLK_1_OUTPUT_ENABLE false |
mbed_official | 579:53297373a894 | 99 | |
mbed_official | 592:a274ee790e56 | 100 | //! [gclk_settings] |
mbed_official | 579:53297373a894 | 101 | /* Configure GCLK generator 2 (RTC) */ |
mbed_official | 592:a274ee790e56 | 102 | # define CONF_CLOCK_GCLK_2_ENABLE true |
mbed_official | 579:53297373a894 | 103 | # define CONF_CLOCK_GCLK_2_RUN_IN_STANDBY false |
mbed_official | 579:53297373a894 | 104 | # define CONF_CLOCK_GCLK_2_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC32K |
mbed_official | 579:53297373a894 | 105 | # define CONF_CLOCK_GCLK_2_PRESCALER 32 |
mbed_official | 579:53297373a894 | 106 | # define CONF_CLOCK_GCLK_2_OUTPUT_ENABLE false |
mbed_official | 592:a274ee790e56 | 107 | //! [gclk_settings] |
mbed_official | 579:53297373a894 | 108 | |
mbed_official | 579:53297373a894 | 109 | /* Configure GCLK generator 3 */ |
mbed_official | 579:53297373a894 | 110 | # define CONF_CLOCK_GCLK_3_ENABLE false |
mbed_official | 579:53297373a894 | 111 | # define CONF_CLOCK_GCLK_3_RUN_IN_STANDBY false |
mbed_official | 579:53297373a894 | 112 | # define CONF_CLOCK_GCLK_3_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M |
mbed_official | 579:53297373a894 | 113 | # define CONF_CLOCK_GCLK_3_PRESCALER 1 |
mbed_official | 579:53297373a894 | 114 | # define CONF_CLOCK_GCLK_3_OUTPUT_ENABLE false |
mbed_official | 579:53297373a894 | 115 | |
mbed_official | 579:53297373a894 | 116 | /* Configure GCLK generator 4 */ |
mbed_official | 579:53297373a894 | 117 | # define CONF_CLOCK_GCLK_4_ENABLE false |
mbed_official | 579:53297373a894 | 118 | # define CONF_CLOCK_GCLK_4_RUN_IN_STANDBY false |
mbed_official | 579:53297373a894 | 119 | # define CONF_CLOCK_GCLK_4_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M |
mbed_official | 579:53297373a894 | 120 | # define CONF_CLOCK_GCLK_4_PRESCALER 1 |
mbed_official | 579:53297373a894 | 121 | # define CONF_CLOCK_GCLK_4_OUTPUT_ENABLE false |
mbed_official | 579:53297373a894 | 122 | |
mbed_official | 579:53297373a894 | 123 | /* Configure GCLK generator 5 */ |
mbed_official | 579:53297373a894 | 124 | # define CONF_CLOCK_GCLK_5_ENABLE false |
mbed_official | 579:53297373a894 | 125 | # define CONF_CLOCK_GCLK_5_RUN_IN_STANDBY false |
mbed_official | 579:53297373a894 | 126 | # define CONF_CLOCK_GCLK_5_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M |
mbed_official | 579:53297373a894 | 127 | # define CONF_CLOCK_GCLK_5_PRESCALER 1 |
mbed_official | 579:53297373a894 | 128 | # define CONF_CLOCK_GCLK_5_OUTPUT_ENABLE false |
mbed_official | 579:53297373a894 | 129 | |
mbed_official | 579:53297373a894 | 130 | /* Configure GCLK generator 6 */ |
mbed_official | 579:53297373a894 | 131 | # define CONF_CLOCK_GCLK_6_ENABLE false |
mbed_official | 579:53297373a894 | 132 | # define CONF_CLOCK_GCLK_6_RUN_IN_STANDBY false |
mbed_official | 579:53297373a894 | 133 | # define CONF_CLOCK_GCLK_6_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M |
mbed_official | 579:53297373a894 | 134 | # define CONF_CLOCK_GCLK_6_PRESCALER 1 |
mbed_official | 579:53297373a894 | 135 | # define CONF_CLOCK_GCLK_6_OUTPUT_ENABLE false |
mbed_official | 579:53297373a894 | 136 | |
mbed_official | 579:53297373a894 | 137 | /* Configure GCLK generator 7 */ |
mbed_official | 579:53297373a894 | 138 | # define CONF_CLOCK_GCLK_7_ENABLE false |
mbed_official | 579:53297373a894 | 139 | # define CONF_CLOCK_GCLK_7_RUN_IN_STANDBY false |
mbed_official | 579:53297373a894 | 140 | # define CONF_CLOCK_GCLK_7_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M |
mbed_official | 579:53297373a894 | 141 | # define CONF_CLOCK_GCLK_7_PRESCALER 1 |
mbed_official | 579:53297373a894 | 142 | # define CONF_CLOCK_GCLK_7_OUTPUT_ENABLE false |
mbed_official | 579:53297373a894 | 143 | |
mbed_official | 579:53297373a894 | 144 | #endif /* CONF_CLOCKS_H_INCLUDED */ |
mbed_official | 579:53297373a894 | 145 |