diff options
Diffstat (limited to 'lib/chibios-contrib/testhal/KINETIS/FRDM-KL25Z/ADC/mcuconf.h')
-rw-r--r-- | lib/chibios-contrib/testhal/KINETIS/FRDM-KL25Z/ADC/mcuconf.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/lib/chibios-contrib/testhal/KINETIS/FRDM-KL25Z/ADC/mcuconf.h b/lib/chibios-contrib/testhal/KINETIS/FRDM-KL25Z/ADC/mcuconf.h new file mode 100644 index 000000000..1f4d646f4 --- /dev/null +++ b/lib/chibios-contrib/testhal/KINETIS/FRDM-KL25Z/ADC/mcuconf.h | |||
@@ -0,0 +1,78 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | #ifndef _MCUCONF_H_ | ||
18 | #define _MCUCONF_H_ | ||
19 | |||
20 | #define KL2x_MCUCONF | ||
21 | |||
22 | /* | ||
23 | * HAL driver system settings. | ||
24 | */ | ||
25 | |||
26 | /* Select the MCU clocking mode below by enabling the appropriate block. */ | ||
27 | /* The defaults are MCG_MODE_PEE, SYSCLK 48MHz, PLLCLK 96MHz, BUSCLK 24MHz */ | ||
28 | |||
29 | /* PEE mode - 48MHz system clock driven by external crystal. */ | ||
30 | #if 1 | ||
31 | #define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE | ||
32 | #define KINETIS_PLLCLK_FREQUENCY 96000000UL | ||
33 | #define KINETIS_SYSCLK_FREQUENCY 48000000UL | ||
34 | #endif | ||
35 | |||
36 | /* crystal-less FEI mode - 48 MHz with internal 32.768 kHz crystal */ | ||
37 | #if 0 | ||
38 | #define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI | ||
39 | #define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ | ||
40 | #define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */ | ||
41 | #define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */ | ||
42 | #define KINETIS_CLKDIV1_OUTDIV1 1 /* do not divide system clock */ | ||
43 | #endif /* 0 */ | ||
44 | |||
45 | /* FEE mode - 24 MHz with external 32.768 kHz crystal */ | ||
46 | #if 0 | ||
47 | #define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEE | ||
48 | #define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ | ||
49 | #define KINETIS_MCG_FLL_DRS 0 /* 732x FLL factor */ | ||
50 | #define KINETIS_CLKDIV1_OUTDIV1 1 /* Divide 48 MHz FLL by 1 => 24 MHz */ | ||
51 | #define KINETIS_CLKDIV1_OUTDIV4 2 /* Divide OUTDIV1 output by 2 => 12 MHz */ | ||
52 | #define KINETIS_SYSCLK_FREQUENCY 23986176UL /* 32.768 kHz*732 (~24 MHz) */ | ||
53 | #define KINETIS_UART0_CLOCK_FREQ (32768 * 732) /* FLL output */ | ||
54 | #define KINETIS_UART0_CLOCK_SRC 1 /* Select FLL clock */ | ||
55 | #define KINETIS_BUSCLK_FREQUENCY (KINETIS_SYSCLK_FREQUENCY / KINETIS_CLKDIV1_OUTDIV4) | ||
56 | #endif /* 0 */ | ||
57 | |||
58 | /* FEE mode - 48 MHz */ | ||
59 | #if 0 | ||
60 | #define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEE | ||
61 | #define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ | ||
62 | #define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */ | ||
63 | #define KINETIS_CLKDIV1_OUTDIV1 1 /* Divide 48 MHz FLL by 1 => 48 MHz */ | ||
64 | #define KINETIS_CLKDIV1_OUTDIV4 2 /* Divide OUTDIV1 output by 2 => 24 MHz */ | ||
65 | #define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */ | ||
66 | #endif /* 0 */ | ||
67 | |||
68 | /* | ||
69 | * SERIAL driver system settings. | ||
70 | */ | ||
71 | #define KINETIS_SERIAL_USE_UART0 FALSE | ||
72 | |||
73 | /* | ||
74 | * ADC driver system settings. | ||
75 | */ | ||
76 | #define KINETIS_ADC_USE_ADC0 TRUE | ||
77 | |||
78 | #endif /* _MCUCONF_H_ */ | ||