rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
config
boards
kinetis
mcuconf.h
Go to the documentation of this file.
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
#include "
clock_config.h
"
21
22
#define KE1xF_MCUCONF
23
24
/*
25
* HAL driver system settings.
26
*/
27
28
/* Select the MCU clocking mode below by enabling the appropriate block. */
29
#define KINETIS_PLL_FREQ 168000000UL
// 168MHz
30
#define KINETIS_CLK 8000000U
// 8MHz
31
32
#define KINETIS_DEFAULT_CLK kinetis_clock_int_osc_hs
/* kinetis_clock_ext_osc_hs */
33
34
/* External OSC */
35
#define KINETIS_EXT_PLL_MUL 26
36
#define KINETIS_EXT_PLL_DIV 0
37
38
/* Internal OSC */
39
#define KINETIS_INT_PLL_MUL 26
40
#define KINETIS_INT_PLL_DIV 5
41
42
/* Used by drivers */
43
#define KINETIS_PLLCLK_FREQUENCY KINETIS_PLL_FREQ
44
#define KINETIS_SYSCLK_FREQUENCY KINETIS_PLL_FREQ
45
#define KINETIS_SPLL_DIV1_FREQENCY 2625000U
46
#define KINETIS_SPLL_DIV2_FREQENCY 21000000U
47
#define KINETIS_CLKDIV1_OUTDIV4 7
// FLASHCLK=24000000
48
#define KINETIS_CLKDIV1_OUTDIV2 8
// BUSCLK=21000000
49
50
#define KINETIS_UART_FREQUENCY KINETIS_SPLL_DIV2_FREQENCY
51
#define KINETIS_SPI_FREQUENCY KINETIS_SPLL_DIV2_FREQENCY
52
#define KINETIS_FTM_FREQUENCY KINETIS_SPLL_DIV1_FREQENCY
53
54
/*
55
* GPIO driver system settings.
56
*/
57
#define KINETIS_HAS_GPIOA TRUE
58
#define KINETIS_HAS_GPIOB TRUE
59
#define KINETIS_HAS_GPIOC TRUE
60
#define KINETIS_HAS_GPIOD TRUE
61
#define KINETIS_HAS_GPIOE TRUE
62
#define KINETIS_HAS_GPIOF FALSE
63
#define KINETIS_HAS_GPIOG FALSE
64
#define KINETIS_HAS_GPIOH FALSE
65
#define KINETIS_GPIO_IRQ_PRIORITY 3
66
67
/*
68
* UART driver system settings.
69
*/
70
#define KINETIS_UART_USE_UART1 TRUE
71
#define KINETIS_UART_USE_UART2 TRUE
72
73
#define KINETIS_UART0_IRQ_PRIORITY 6
74
#define KINETIS_UART1_IRQ_PRIORITY 6
75
#define KINETIS_UART2_IRQ_PRIORITY 6
76
#define KINETIS_UART_DMA_IRQ_PRIORITY 3
77
78
/*
79
* GPT/PIT driver system settings.
80
*/
81
#define KINETIS_GPT_USE_PIT0 TRUE
82
#define KINETIS_GPT_PIT0_IRQ_PRIORITY 4
83
84
/*
85
* PWM/FTM driver system settings.
86
*/
87
#define KINETIS_PWM_USE_FTM0 TRUE
88
#define KINETIS_PWM_USE_FTM1 TRUE
89
//#define KINETIS_PWM_USE_FTM2 FALSE
90
//#define KINETIS_PWM_USE_FTM3 FALSE
91
#define KINETIS_PWM_FTM0_PRIORITY 7
92
#define KINETIS_PWM_FTM1_PRIORITY 7
93
#define KINETIS_PWM_FTM2_PRIORITY 7
94
#define KINETIS_PWM_FTM3_PRIORITY 7
95
96
/*
97
* SPI driver system settings.
98
*/
99
#define KINETIS_SPI_USE_SPI0 TRUE
100
#define KINETIS_SPI_SPI0_IRQ_PRIORITY 10
101
#define KINETIS_SPI_SPI0_DMA_PRIORITY 1
102
//#define KINETIS_SPI_USE_SPI1 TRUE
103
//#define KINETIS_SPI_SPI1_IRQ_PRIORITY 10
104
//#define KINETIS_SPI_SPI1_DMA_PRIORITY 1
105
106
/*
107
* ADC driver system settings.
108
*/
109
#define KINETIS_ADC_USE_ADC0 TRUE
110
#define KINETIS_ADC_USE_ADC1 TRUE
111
#define KINETIS_ADC_USE_ADC2 TRUE
112
#define KINETIS_ADC_IRQ_PRIORITY 6
113
114
/*
115
* COMP driver system settings.
116
*/
117
#define KINETIS_COMP_USE_COMP0 TRUE
118
#define KINETIS_COMP_USE_COMP1 TRUE
119
#define KINETIS_COMP_USE_COMP2 TRUE
120
#define KINETIS_COMP_IRQ_PRIORITY 2
121
122
#endif
/* _MCUCONF_H_ */
clock_config.h
Generated on Sat Sep 27 2025 00:10:06 for rusEFI by
1.9.8