rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
hw_layer
ports
stm32
stm32f7
cfg
mcuconf.h
Go to the documentation of this file.
1
/*
2
ChibiOS - Copyright (C) 2006..2018 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
/*
21
* STM32F7xx drivers configuration.
22
* The following settings override the default settings present in
23
* the various device driver implementation headers.
24
* Note that the settings for each driver only have effect if the whole
25
* driver is enabled in halconf.h.
26
*
27
* IRQ priorities:
28
* 15...0 Lowest...Highest.
29
*
30
* DMA priorities:
31
* 0...3 Lowest...Highest.
32
*/
33
34
#define STM32F7xx_MCUCONF
35
#define STM32F765_MCUCONF
36
#define STM32F767_MCUCONF
37
#define STM32F777_MCUCONF
38
#define STM32F769_MCUCONF
39
#define STM32F779_MCUCONF
40
41
/* for stm32f746_nucleo */
42
#define STM32F746_MCUCONF
43
44
#include "efifeatures.h"
45
46
/*
47
* STM32F7xx drivers configuration.
48
* The following settings override the default settings present in
49
* the various device driver implementation headers.
50
* Note that the settings for each driver only have effect if the whole
51
* driver is enabled in halconf.h.
52
*
53
* IRQ priorities:
54
* 15...0 Lowest...Highest.
55
*
56
* DMA priorities:
57
* 0...3 Lowest...Highest.
58
*/
59
60
#define STM32F7xx_MCUCONF
61
62
// Allows LSE init to timeout and configure fallback RTC clock source in case
63
#define RUSEFI_STM32_LSE_WAIT_MAX 1000000
64
#define RUSEFI_STM32_LSE_WAIT_MAX_RTCSEL STM32_RTCSEL_LSI
65
66
/*
67
* General settings.
68
*/
69
#define STM32_NO_INIT FALSE
70
71
/*
72
* Memory attributes settings.
73
*/
74
#ifndef STM32_NOCACHE_ENABLE
75
#define STM32_NOCACHE_ENABLE TRUE
76
#endif
77
#define STM32_NOCACHE_MPU_REGION MPU_REGION_6
78
#define STM32_NOCACHE_RBAR SRAM2_BASE
79
#define STM32_NOCACHE_RASR MPU_RASR_SIZE_16K
80
81
/*
82
* HAL driver system settings.
83
*/
84
#define STM32_NO_INIT FALSE
85
#define STM32_PVD_ENABLE FALSE
86
#define STM32_PLS STM32_PLS_LEV0
87
#define STM32_BKPRAM_ENABLE TRUE
88
#define STM32_HSI_ENABLED TRUE
89
#define STM32_LSI_ENABLED TRUE
90
#define STM32_HSE_ENABLED TRUE
91
// see RUSEFI_STM32_LSE_WAIT_MAX
92
#define STM32_LSE_ENABLED TRUE
93
#define STM32_CLOCK48_REQUIRED TRUE
94
#define STM32_SW STM32_SW_PLL
95
#define STM32_PLLSRC STM32_PLLSRC_HSI
96
#define STM32_PLLM_VALUE 16
97
#define STM32_PLLN_VALUE 432
98
#define STM32_PLLP_VALUE 2
99
#define STM32_PLLQ_VALUE 9
100
#define STM32_HPRE STM32_HPRE_DIV1
101
#define STM32_PPRE1 STM32_PPRE1_DIV4
102
#define STM32_PPRE2 STM32_PPRE2_DIV2
103
// see RUSEFI_STM32_LSE_WAIT_MAX_RTCSEL
104
#define STM32_RTCSEL STM32_RTCSEL_LSE
105
#define STM32_RTCPRE_VALUE 8
106
#define STM32_MCO1SEL STM32_MCO1SEL_HSI
107
#define STM32_MCO1PRE STM32_MCO1PRE_DIV1
108
#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK
109
#define STM32_MCO2PRE STM32_MCO2PRE_DIV5
110
#define STM32_I2SSRC STM32_I2SSRC_CKIN
111
#define STM32_PLLI2SN_VALUE 192
112
#define STM32_PLLI2SP_VALUE 4
113
#define STM32_PLLI2SQ_VALUE 4
114
#define STM32_PLLI2SR_VALUE 4
115
#define STM32_PLLI2SDIVQ_VALUE 2
116
#define STM32_PLLSAIN_VALUE 192
117
#define STM32_PLLSAIP_VALUE 4
118
#define STM32_PLLSAIQ_VALUE 4
119
#define STM32_PLLSAIR_VALUE 4
120
#define STM32_PLLSAIDIVQ_VALUE 2
121
#define STM32_PLLSAIDIVR_VALUE 2
122
#define STM32_SAI1SEL STM32_SAI1SEL_OFF
123
#define STM32_SAI2SEL STM32_SAI2SEL_OFF
124
#define STM32_LCDTFT_REQUIRED FALSE
125
#define STM32_USART1SEL STM32_USART1SEL_PCLK2
126
#define STM32_USART2SEL STM32_USART2SEL_PCLK1
127
#define STM32_USART3SEL STM32_USART3SEL_PCLK1
128
#define STM32_UART4SEL STM32_UART4SEL_PCLK1
129
#define STM32_UART5SEL STM32_UART5SEL_PCLK1
130
#define STM32_USART6SEL STM32_USART6SEL_PCLK2
131
#define STM32_UART7SEL STM32_UART7SEL_PCLK1
132
#define STM32_UART8SEL STM32_UART8SEL_PCLK1
133
#define STM32_I2C1SEL STM32_I2C1SEL_PCLK1
134
#define STM32_I2C2SEL STM32_I2C2SEL_PCLK1
135
#define STM32_I2C3SEL STM32_I2C3SEL_PCLK1
136
#define STM32_I2C4SEL STM32_I2C4SEL_PCLK1
137
#define STM32_LPTIM1SEL STM32_LPTIM1SEL_PCLK1
138
#define STM32_CECSEL STM32_CECSEL_LSE
139
#define STM32_CK48MSEL STM32_CK48MSEL_PLL
140
#define STM32_SDMMCSEL STM32_SDMMCSEL_PLL48CLK
141
142
/*
143
* GPT driver system settings.
144
*/
145
#define STM32_IRQ_TIM1_BRK_TIM9_PRIORITY 7
146
#define STM32_IRQ_TIM1_UP_TIM10_PRIORITY 7
147
#define STM32_IRQ_TIM1_TRGCO_TIM11_PRIORITY 7
148
#define STM32_IRQ_TIM1_CC_PRIORITY 7
149
#define STM32_IRQ_TIM2_PRIORITY 7
150
#define STM32_IRQ_TIM3_PRIORITY 7
151
#define STM32_IRQ_TIM4_PRIORITY 7
152
#define STM32_IRQ_TIM5_PRIORITY 7
153
#define STM32_IRQ_TIM6_PRIORITY 7
154
#define STM32_IRQ_TIM7_PRIORITY 7
155
#define STM32_IRQ_TIM8_BRK_TIM12_PRIORITY 7
156
#define STM32_IRQ_TIM8_UP_TIM13_PRIORITY 7
157
#define STM32_IRQ_TIM8_TRGCO_TIM14_PRIORITY 7
158
#define STM32_IRQ_TIM8_CC_PRIORITY 7
159
160
/*
161
* SDC driver system settings.
162
*/
163
#define STM32_SDC_USE_SDMMC1 FALSE
164
#define STM32_SDC_USE_SDMMC2 TRUE
165
#define STM32_SDC_SDMMC_UNALIGNED_SUPPORT TRUE
166
#define STM32_SDC_SDMMC_WRITE_TIMEOUT 1000
167
#define STM32_SDC_SDMMC_READ_TIMEOUT 1000
168
#define STM32_SDC_SDMMC_CLOCK_DELAY 10
169
#define STM32_SDC_SDMMC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
170
#define STM32_SDC_SDMMC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 0)
171
#define STM32_SDC_SDMMC1_DMA_PRIORITY 3
172
#define STM32_SDC_SDMMC2_DMA_PRIORITY 3
173
#define STM32_SDC_SDMMC1_IRQ_PRIORITY 9
174
#define STM32_SDC_SDMMC2_IRQ_PRIORITY 9
175
176
#include "
mcuconf_common_f4_f7.h
"
177
178
#endif
/* MCUCONF_H */
mcuconf_common_f4_f7.h
Generated on Fri Sep 26 2025 00:10:16 for rusEFI by
1.9.8