aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/demos/KINETIS/RT-TEENSY3_6/mcuconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/demos/KINETIS/RT-TEENSY3_6/mcuconf.h')
-rw-r--r--lib/chibios-contrib/demos/KINETIS/RT-TEENSY3_6/mcuconf.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/lib/chibios-contrib/demos/KINETIS/RT-TEENSY3_6/mcuconf.h b/lib/chibios-contrib/demos/KINETIS/RT-TEENSY3_6/mcuconf.h
new file mode 100644
index 000000000..bb2392c1d
--- /dev/null
+++ b/lib/chibios-contrib/demos/KINETIS/RT-TEENSY3_6/mcuconf.h
@@ -0,0 +1,91 @@
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 MK66FX1M0_MCUCONF
21
22/*
23 * HAL driver system settings.
24 */
25
26/* Select the MCU clocking mode below by enabling the appropriate block. */
27
28/* PEE mode - 180 MHz system clock driving by 16 MHz xtal */
29#if 1
30#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE
31#define KINETIS_PLLCLK_FREQUENCY 180000000UL
32#define KINETIS_SYSCLK_FREQUENCY KINETIS_PLLCLK_FREQUENCY
33#define KINETIS_BUSCLK_FREQUENCY 60000000UL
34#define KINETIS_FLASHCLK_FREQUENCY 28000000UL
35
36#define KINETIS_CLKDIV1_OUTDIV1 1 // -> 0
37#define KINETIS_CLKDIV1_OUTDIV2 3 // -> 2
38#define KINETIS_CLKDIV1_OUTDIV4 7 // -> 6
39#endif
40
41/* PEE mode - 48MHz system clock driven by external crystal. */
42#if 0
43#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE
44#define KINETIS_PLLCLK_FREQUENCY 96000000UL
45#define KINETIS_SYSCLK_FREQUENCY 48000000UL
46#endif
47
48/* FEI mode (~48MHz) */
49#if 0
50#define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI
51#define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */
52#define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */
53#define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */
54#define KINETIS_CLKDIV1_OUTDIV1 1 /* Divide MCGCLKOUT (~48MHz) by 1 to SYSCLK */
55#define KINETIS_CLKDIV1_OUTDIV2 1 /* Divide by 1 for (~48MHz) peripheral clock */
56#define KINETIS_CLKDIV1_OUTDIV4 2 /* Divide by 2 for (~24MHz) flash clock */
57#define KINETIS_BUSCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY
58#define KINETIS_FLASHCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY/2
59#endif /* 0 */
60
61/* FEE mode - 24 MHz with external 32.768 kHz crystal */
62/* not implemented */
63#if 0
64#define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEE
65#define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */
66#define KINETIS_MCG_FLL_DRS 0 /* 732x FLL factor */
67#define KINETIS_CLKDIV1_OUTDIV1 1 /* Divide 48 MHz FLL by 1 => 24 MHz */
68#define KINETIS_CLKDIV1_OUTDIV4 2 /* Divide OUTDIV1 output by 2 => 12 MHz */
69#define KINETIS_SYSCLK_FREQUENCY 23986176UL /* 32.768 kHz*732 (~24 MHz) */
70#define KINETIS_UART0_CLOCK_FREQ (32768 * 732) /* FLL output */
71#define KINETIS_UART0_CLOCK_SRC 1 /* Select FLL clock */
72#define KINETIS_BUSCLK_FREQUENCY (KINETIS_SYSCLK_FREQUENCY / KINETIS_CLKDIV1_OUTDIV4)
73#endif /* 0 */
74
75/* FEE mode - 48 MHz */
76/* not implemented */
77#if 0
78#define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEE
79#define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */
80#define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */
81#define KINETIS_CLKDIV1_OUTDIV1 1 /* Divide 48 MHz FLL by 1 => 48 MHz */
82#define KINETIS_CLKDIV1_OUTDIV4 2 /* Divide OUTDIV1 output by 2 => 24 MHz */
83#define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */
84#endif /* 0 */
85
86/*
87 * SERIAL driver system settings.
88 */
89#define KINETIS_SERIAL_USE_UART0 TRUE
90
91#endif /* _MCUCONF_H_ */