rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
hw_layer
ports
stm32
stm32h7
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
* STM32H7xx 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 STM32H7xx_MCUCONF
35
#define STM32H742_MCUCONF
36
#define STM32H743_MCUCONF
37
#define STM32H753_MCUCONF
38
#define STM32H745_MCUCONF
39
#define STM32H755_MCUCONF
40
#define STM32H747_MCUCONF
41
#define STM32H757_MCUCONF
42
43
// Allows LSE init to timeout and configure fallback RTC clock source in case
44
#define RUSEFI_STM32_LSE_WAIT_MAX 1000000
45
#define RUSEFI_STM32_LSE_WAIT_MAX_RTCSEL STM32_RTCSEL_LSI_CK
46
47
/*
48
* General settings.
49
*/
50
#define STM32_NO_INIT FALSE
51
#define STM32_TARGET_CORE 1
52
53
/*
54
* Memory attributes settings.
55
*/
56
#ifndef STM32_NOCACHE_ENABLE
57
#define STM32_NOCACHE_ENABLE TRUE
58
#endif
59
#define STM32_NOCACHE_MPU_REGION MPU_REGION_6
60
#define STM32_NOCACHE_RBAR 0x30040000U
61
#define STM32_NOCACHE_RASR MPU_RASR_SIZE_16K
62
63
/*
64
* PWR system settings.
65
* Reading STM32 Reference Manual is required, settings in PWR_CR3 are
66
* very critical.
67
* Register constants are taken from the ST header.
68
*/
69
#define STM32_VOS STM32_VOS_SCALE1
70
#define STM32_PWR_CR1 (PWR_CR1_SVOS_1 | PWR_CR1_SVOS_0)
71
#define STM32_PWR_CR2 (PWR_CR2_BREN)
72
#define STM32_PWR_CR3 (PWR_CR3_LDOEN | PWR_CR3_USB33DEN)
73
#define STM32_PWR_CPUCR 0
74
75
/*
76
* Clock tree static settings.
77
* Reading STM32 Reference Manual is required.
78
*/
79
#define STM32_HSI_ENABLED TRUE
80
#define STM32_LSI_ENABLED TRUE
81
#define STM32_CSI_ENABLED TRUE
82
#define STM32_HSI48_ENABLED TRUE
83
#define STM32_HSE_ENABLED TRUE
84
// see RUSEFI_STM32_LSE_WAIT_MAX
85
#define STM32_LSE_ENABLED TRUE
86
#define STM32_HSIDIV STM32_HSIDIV_DIV1
87
88
/*
89
* PLLs static settings.
90
* Reading STM32 Reference Manual is required.
91
*
92
* Configured to use HSI to generate 400mhz, but we will reconfigure to use HSE
93
* with appropriate PLLx_DIVM values for the detected external frequency.
94
* See osc_detector.cpp
95
*/
96
#define STM32_PLLSRC STM32_PLLSRC_HSI_CK
97
#define STM32_PLLCFGR_MASK ~0
98
#define STM32_PLL1_ENABLED TRUE
99
#define STM32_PLL1_P_ENABLED TRUE
100
#define STM32_PLL1_Q_ENABLED TRUE
101
#define STM32_PLL1_R_ENABLED TRUE
102
#define STM32_PLL1_DIVM_VALUE 32
103
#define STM32_PLL1_DIVN_VALUE 400
104
#define STM32_PLL1_FRACN_VALUE 0
105
#define STM32_PLL1_DIVP_VALUE 2
106
#define STM32_PLL1_DIVQ_VALUE 4
107
#define STM32_PLL1_DIVR_VALUE 2
108
#define STM32_PLL2_ENABLED TRUE
109
#define STM32_PLL2_P_ENABLED TRUE
110
#define STM32_PLL2_Q_ENABLED TRUE
111
#define STM32_PLL2_R_ENABLED TRUE
112
#define STM32_PLL2_DIVM_VALUE 32
113
#define STM32_PLL2_DIVN_VALUE 480
114
#define STM32_PLL2_FRACN_VALUE 0
115
#define STM32_PLL2_DIVP_VALUE 10
116
#define STM32_PLL2_DIVQ_VALUE 12
117
#define STM32_PLL2_DIVR_VALUE 20
118
#define STM32_PLL3_ENABLED TRUE
119
#define STM32_PLL3_P_ENABLED TRUE
120
#define STM32_PLL3_Q_ENABLED TRUE
121
#define STM32_PLL3_R_ENABLED TRUE
122
#define STM32_PLL3_DIVM_VALUE 32
123
#define STM32_PLL3_DIVN_VALUE 480
124
#define STM32_PLL3_FRACN_VALUE 0
125
#define STM32_PLL3_DIVP_VALUE 2
126
#define STM32_PLL3_DIVQ_VALUE 20
127
#define STM32_PLL3_DIVR_VALUE 12
128
129
/*
130
* Core clocks dynamic settings (can be changed at runtime).
131
* Reading STM32 Reference Manual is required.
132
*/
133
#define STM32_SW STM32_SW_PLL1_P_CK
134
// see RUSEFI_STM32_LSE_WAIT_MAX_RTCSEL
135
#define STM32_RTCSEL STM32_RTCSEL_LSE_CK
136
#define STM32_D1CPRE STM32_D1CPRE_DIV1
137
#define STM32_D1HPRE STM32_D1HPRE_DIV2
138
#define STM32_D1PPRE3 STM32_D1PPRE3_DIV2
139
#define STM32_D2PPRE1 STM32_D2PPRE1_DIV2
140
#define STM32_D2PPRE2 STM32_D2PPRE2_DIV2
141
#define STM32_D3PPRE4 STM32_D3PPRE4_DIV2
142
143
/*
144
* Peripherals clocks static settings.
145
* Reading STM32 Reference Manual is required.
146
*/
147
#define STM32_MCO1SEL STM32_MCO1SEL_HSI_CK
148
#define STM32_MCO1PRE_VALUE 4
149
#define STM32_MCO2SEL STM32_MCO2SEL_SYS_CK
150
#define STM32_MCO2PRE_VALUE 4
151
#define STM32_TIMPRE_ENABLE TRUE
152
#define STM32_HRTIMSEL 0
153
#define STM32_STOPKERWUCK 0
154
#define STM32_STOPWUCK 0
155
#define STM32_RTCPRE_VALUE 8
156
#define STM32_CKPERSEL STM32_CKPERSEL_HSE_CK
157
#define STM32_SDMMCSEL STM32_SDMMCSEL_PLL2_R_CK
158
#define STM32_QSPISEL STM32_QSPISEL_HCLK
159
#define STM32_FMCSEL STM32_QSPISEL_HCLK
160
#define STM32_SWPSEL STM32_SWPSEL_PCLK1
161
#define STM32_FDCANSEL STM32_FDCANSEL_PLL2_Q_CK
162
#define STM32_DFSDM1SEL STM32_DFSDM1SEL_PCLK2
163
#define STM32_SPDIFSEL STM32_SPDIFSEL_PLL1_Q_CK
164
#define STM32_SPI45SEL STM32_SPI45SEL_PLL2_Q_CK
165
#define STM32_SPI123SEL STM32_SPI123SEL_PLL2_P_CK
166
#define STM32_SAI23SEL STM32_SAI23SEL_PLL1_Q_CK
167
#define STM32_SAI1SEL STM32_SAI1SEL_PLL1_Q_CK
168
#define STM32_LPTIM1SEL STM32_LPTIM1SEL_PCLK1
169
#define STM32_CECSEL STM32_CECSEL_LSE_CK
170
#define STM32_USBSEL STM32_USBSEL_PLL3_Q_CK
171
#define STM32_I2C123SEL STM32_I2C123SEL_PCLK1
172
#define STM32_RNGSEL STM32_RNGSEL_HSI48_CK
173
#define STM32_USART16SEL STM32_USART16SEL_PLL2_Q_CK
174
#define STM32_USART234578SEL STM32_USART234578SEL_PLL2_Q_CK
175
#define STM32_SPI6SEL STM32_SPI6SEL_PLL2_Q_CK
176
#define STM32_SAI4BSEL STM32_SAI4BSEL_PLL1_Q_CK
177
#define STM32_SAI4ASEL STM32_SAI4ASEL_PLL1_Q_CK
178
#define STM32_ADCSEL STM32_ADCSEL_PLL3_R_CK
179
#define STM32_LPTIM345SEL STM32_LPTIM345SEL_PCLK4
180
#define STM32_LPTIM2SEL STM32_LPTIM2SEL_PCLK4
181
#define STM32_I2C4SEL STM32_I2C4SEL_PCLK4
182
#define STM32_LPUART1SEL STM32_LPUART1SEL_PCLK4
183
184
/*
185
* IRQ system settings.
186
*/
187
188
#define STM32_DISABLE_EXTI0_HANDLER
189
#define STM32_DISABLE_EXTI1_HANDLER
190
#define STM32_DISABLE_EXTI2_HANDLER
191
#define STM32_DISABLE_EXTI3_HANDLER
192
#define STM32_DISABLE_EXTI4_HANDLER
193
#define STM32_DISABLE_EXTI5_9_HANDLER
194
#define STM32_DISABLE_EXTI10_15_HANDLER
195
196
// we hijack this interrupt handler as the EXTI chained handler, see digital_input_exti.cpp
197
#define STM32_I2C_I2C1_IRQ_PRIORITY 6
198
199
#define STM32_IRQ_EXTI_PRIORITY CORTEX_MAXIMUM_PRIORITY
200
#define STM32_IRQ_EXTI0_PRIORITY STM32_IRQ_EXTI_PRIORITY
201
#define STM32_IRQ_EXTI1_PRIORITY STM32_IRQ_EXTI_PRIORITY
202
#define STM32_IRQ_EXTI2_PRIORITY STM32_IRQ_EXTI_PRIORITY
203
#define STM32_IRQ_EXTI3_PRIORITY STM32_IRQ_EXTI_PRIORITY
204
#define STM32_IRQ_EXTI4_PRIORITY STM32_IRQ_EXTI_PRIORITY
205
#define STM32_IRQ_EXTI5_9_PRIORITY STM32_IRQ_EXTI_PRIORITY
206
#define STM32_IRQ_EXTI10_15_PRIORITY STM32_IRQ_EXTI_PRIORITY
207
208
#define STM32_IRQ_EXTI16_PRIORITY 6
209
#define STM32_IRQ_EXTI17_PRIORITY 6
210
#define STM32_IRQ_EXTI18_PRIORITY 6
211
#define STM32_IRQ_EXTI19_PRIORITY 6
212
#define STM32_IRQ_EXTI20_21_PRIORITY 6
213
214
#define STM32_IRQ_FDCAN1_PRIORITY 10
215
#define STM32_IRQ_FDCAN2_PRIORITY 10
216
217
#define STM32_IRQ_MDMA_PRIORITY 9
218
219
#define STM32_IRQ_QUADSPI1_PRIORITY 10
220
221
#define STM32_IRQ_SDMMC1_PRIORITY 9
222
#define STM32_IRQ_SDMMC2_PRIORITY 9
223
224
#define STM32_IRQ_TIM1_UP_PRIORITY 7
225
#define STM32_IRQ_TIM1_CC_PRIORITY 7
226
#define STM32_IRQ_TIM2_PRIORITY 7
227
#define STM32_IRQ_TIM3_PRIORITY 7
228
#define STM32_IRQ_TIM4_PRIORITY 7
229
#define STM32_IRQ_TIM5_PRIORITY 7
230
#define STM32_IRQ_TIM6_PRIORITY 7
231
#define STM32_IRQ_TIM7_PRIORITY 7
232
#define STM32_IRQ_TIM8_BRK_TIM12_PRIORITY 7
233
#define STM32_IRQ_TIM8_UP_TIM13_PRIORITY 7
234
#define STM32_IRQ_TIM8_TRGCO_TIM14_PRIORITY 7
235
#define STM32_IRQ_TIM8_CC_PRIORITY 7
236
#define STM32_IRQ_TIM15_PRIORITY 7
237
#define STM32_IRQ_TIM16_PRIORITY 7
238
#define STM32_IRQ_TIM17_PRIORITY 7
239
240
#define STM32_IRQ_USART1_PRIORITY 12
241
#define STM32_IRQ_USART2_PRIORITY 12
242
#define STM32_IRQ_USART3_PRIORITY 12
243
#define STM32_IRQ_UART4_PRIORITY 12
244
#define STM32_IRQ_UART5_PRIORITY 12
245
#define STM32_IRQ_USART6_PRIORITY 12
246
#define STM32_IRQ_UART7_PRIORITY 12
247
#define STM32_IRQ_UART8_PRIORITY 12
248
#define STM32_IRQ_LPUART1_PRIORITY 12
249
250
/*
251
* ADC driver system settings.
252
*/
253
#define STM32_ADC_DUAL_MODE FALSE
254
#define STM32_ADC_COMPACT_SAMPLES FALSE
255
#define STM32_ADC_USE_ADC12 TRUE
256
257
#ifndef STM32_ADC_USE_ADC3
258
#define STM32_ADC_USE_ADC3 FALSE
259
#endif
/* STM32_ADC_USE_ADC3 */
260
261
#define STM32_ADC_ADC12_DMA_STREAM STM32_DMA_STREAM_ID_ANY
262
#define STM32_ADC_ADC3_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
263
#define STM32_ADC_ADC12_DMA_PRIORITY 2
264
#define STM32_ADC_ADC3_DMA_PRIORITY 2
265
#define STM32_ADC_ADC12_IRQ_PRIORITY 5
266
#define STM32_ADC_ADC3_IRQ_PRIORITY 5
267
#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV4
268
#define STM32_ADC_ADC3_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV4
269
270
/*
271
* CAN driver system settings.
272
*/
273
#define STM32_CAN_USE_FDCAN1 TRUE
274
#define STM32_CAN_USE_FDCAN2 TRUE
275
276
/*
277
* DAC driver system settings.
278
*/
279
#define STM32_DAC_DUAL_MODE FALSE
280
#define STM32_DAC_USE_DAC1_CH1 FALSE
281
#define STM32_DAC_USE_DAC1_CH2 FALSE
282
#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
283
#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
284
#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
285
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
286
#define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID_ANY
287
#define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID_ANY
288
289
/*
290
* GPT driver system settings.
291
*/
292
#define STM32_GPT_USE_TIM1 FALSE
293
#define STM32_GPT_USE_TIM2 FALSE
294
#define STM32_GPT_USE_TIM3 TRUE
295
#define STM32_GPT_USE_TIM4 FALSE
296
#define STM32_GPT_USE_TIM5 FALSE
297
#define STM32_GPT_USE_TIM6 TRUE
298
#define STM32_GPT_USE_TIM7 FALSE
299
#define STM32_GPT_USE_TIM8 FALSE
300
#define STM32_GPT_USE_TIM12 FALSE
301
#define STM32_GPT_USE_TIM13 FALSE
302
#define STM32_GPT_USE_TIM14 FALSE
303
#define STM32_GPT_USE_TIM15 FALSE
304
#define STM32_GPT_USE_TIM16 FALSE
305
#define STM32_GPT_USE_TIM17 FALSE
306
307
/*
308
* I2C driver system settings.
309
*/
310
#define STM32_I2C_USE_I2C1 FALSE
311
#define STM32_I2C_USE_I2C2 FALSE
312
#define STM32_I2C_USE_I2C3 FALSE
313
#define STM32_I2C_USE_I2C4 FALSE
314
#define STM32_I2C_BUSY_TIMEOUT 50
315
#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
316
#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
317
#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
318
#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
319
#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
320
#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
321
#define STM32_I2C_I2C4_RX_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
322
#define STM32_I2C_I2C4_TX_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
323
// STM32_I2C_I2C1_IRQ_PRIORITY is defined above, reused for fast EXTI handoff
324
#define STM32_I2C_I2C2_IRQ_PRIORITY 5
325
#define STM32_I2C_I2C3_IRQ_PRIORITY 5
326
#define STM32_I2C_I2C4_IRQ_PRIORITY 5
327
#define STM32_I2C_I2C1_DMA_PRIORITY 3
328
#define STM32_I2C_I2C2_DMA_PRIORITY 3
329
#define STM32_I2C_I2C3_DMA_PRIORITY 3
330
#define STM32_I2C_I2C4_DMA_PRIORITY 3
331
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
332
333
/*
334
* ICU driver system settings.
335
*/
336
#define STM32_ICU_USE_TIM1 FALSE
337
#define STM32_ICU_USE_TIM2 FALSE
338
#define STM32_ICU_USE_TIM3 FALSE
339
#define STM32_ICU_USE_TIM4 FALSE
340
#define STM32_ICU_USE_TIM5 FALSE
341
#define STM32_ICU_USE_TIM8 FALSE
342
#define STM32_ICU_USE_TIM12 FALSE
343
#define STM32_ICU_USE_TIM13 FALSE
344
#define STM32_ICU_USE_TIM14 FALSE
345
#define STM32_ICU_USE_TIM15 FALSE
346
#define STM32_ICU_USE_TIM16 FALSE
347
#define STM32_ICU_USE_TIM17 FALSE
348
349
/*
350
* MAC driver system settings.
351
*/
352
#define STM32_MAC_TRANSMIT_BUFFERS 4
353
#define STM32_MAC_RECEIVE_BUFFERS 4
354
#define STM32_MAC_BUFFERS_SIZE 1522
355
#define STM32_MAC_PHY_TIMEOUT 100
356
#define STM32_MAC_ETH1_CHANGE_PHY_STATE TRUE
357
#define STM32_MAC_ETH1_IRQ_PRIORITY 13
358
#define STM32_MAC_IP_CHECKSUM_OFFLOAD 0
359
360
/*
361
* PWM driver system settings.
362
*/
363
#define STM32_PWM_USE_TIM1 FALSE
364
#define STM32_PWM_USE_TIM2 FALSE
365
366
#ifndef STM32_PWM_USE_TIM3
367
#define STM32_PWM_USE_TIM3 FALSE
368
#endif
369
370
#ifndef STM32_PWM_USE_TIM4
371
#define STM32_PWM_USE_TIM4 TRUE
372
#endif
373
374
#ifndef STM32_PWM_USE_TIM5
375
#define STM32_PWM_USE_TIM5 TRUE
376
#endif
377
378
#ifndef STM32_PWM_USE_TIM8
379
#define STM32_PWM_USE_TIM8 TRUE
380
#endif
381
382
#define STM32_PWM_USE_TIM12 FALSE
383
#define STM32_PWM_USE_TIM13 FALSE
384
#define STM32_PWM_USE_TIM14 FALSE
385
#define STM32_PWM_USE_TIM15 FALSE
386
#define STM32_PWM_USE_TIM16 FALSE
387
#define STM32_PWM_USE_TIM17 FALSE
388
389
/*
390
* RTC driver system settings.
391
*/
392
#define STM32_RTC_PRESA_VALUE 32
393
#define STM32_RTC_PRESS_VALUE 1024
394
#define STM32_RTC_CR_INIT 0
395
#define STM32_RTC_TAMPCR_INIT 0
396
397
/*
398
* SDC driver system settings.
399
*/
400
#define STM32_SDC_USE_SDMMC1 TRUE
401
#define STM32_SDC_USE_SDMMC2 FALSE
402
#define STM32_SDC_SDMMC_UNALIGNED_SUPPORT TRUE
403
#define STM32_SDC_SDMMC_WRITE_TIMEOUT 1000000
404
#define STM32_SDC_SDMMC_READ_TIMEOUT 1000000
405
#define STM32_SDC_SDMMC_CLOCK_DELAY 10
406
#define STM32_SDC_SDMMC_PWRSAV TRUE
407
408
/*
409
* SERIAL driver system settings.
410
*/
411
#define STM32_SERIAL_USE_USART1 TRUE
412
#define STM32_SERIAL_USE_USART2 TRUE
413
#define STM32_SERIAL_USE_USART3 TRUE
414
#define STM32_SERIAL_USE_UART4 FALSE
415
#define STM32_SERIAL_USE_UART5 FALSE
416
#define STM32_SERIAL_USE_USART6 TRUE
417
#define STM32_SERIAL_USE_UART7 FALSE
418
#define STM32_SERIAL_USE_UART8 FALSE
419
#define STM32_SERIAL_USE_LPUART1 FALSE
420
421
/*
422
* SPI driver system settings.
423
*/
424
#ifndef STM32_SPI_USE_SPI1
425
#define STM32_SPI_USE_SPI1 TRUE
426
#endif
427
#ifndef STM32_SPI_USE_SPI2
428
#define STM32_SPI_USE_SPI2 TRUE
429
#endif
430
#ifndef STM32_SPI_USE_SPI3
431
#define STM32_SPI_USE_SPI3 TRUE
432
#endif
433
#ifndef STM32_SPI_USE_SPI4
434
#define STM32_SPI_USE_SPI4 FALSE
435
#endif
436
#ifndef STM32_SPI_USE_SPI5
437
#define STM32_SPI_USE_SPI5 FALSE
438
#endif
439
#ifndef STM32_SPI_USE_SPI6
440
#define STM32_SPI_USE_SPI6 FALSE
441
#endif
442
443
#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
444
#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
445
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
446
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
447
#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
448
#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
449
#define STM32_SPI_SPI4_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
450
#define STM32_SPI_SPI4_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
451
#define STM32_SPI_SPI5_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
452
#define STM32_SPI_SPI5_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
453
#define STM32_SPI_SPI6_RX_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
454
#define STM32_SPI_SPI6_TX_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
455
#define STM32_SPI_SPI1_DMA_PRIORITY 1
456
#define STM32_SPI_SPI2_DMA_PRIORITY 1
457
#define STM32_SPI_SPI3_DMA_PRIORITY 1
458
#define STM32_SPI_SPI4_DMA_PRIORITY 1
459
#define STM32_SPI_SPI5_DMA_PRIORITY 1
460
#define STM32_SPI_SPI6_DMA_PRIORITY 1
461
#define STM32_SPI_SPI1_IRQ_PRIORITY 10
462
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
463
#define STM32_SPI_SPI3_IRQ_PRIORITY 10
464
#define STM32_SPI_SPI4_IRQ_PRIORITY 10
465
#define STM32_SPI_SPI5_IRQ_PRIORITY 10
466
#define STM32_SPI_SPI6_IRQ_PRIORITY 10
467
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
468
469
/*
470
* ST driver system settings.
471
*/
472
#define STM32_ST_IRQ_PRIORITY 8
473
#define STM32_ST_USE_TIMER 2
474
475
/*
476
* TRNG driver system settings.
477
*/
478
#define STM32_TRNG_USE_RNG1 FALSE
479
480
/*
481
* UART driver system settings.
482
*/
483
#define STM32_UART_USE_USART1 FALSE
484
#define STM32_UART_USE_USART2 FALSE
485
#define STM32_UART_USE_USART3 TRUE
486
#define STM32_UART_USE_UART4 FALSE
487
#define STM32_UART_USE_UART5 FALSE
488
#define STM32_UART_USE_USART6 FALSE
489
#define STM32_UART_USE_UART7 FALSE
490
#define STM32_UART_USE_UART8 FALSE
491
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
492
#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
493
#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
494
#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
495
#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
496
#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
497
#define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
498
#define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
499
#define STM32_UART_UART5_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
500
#define STM32_UART_UART5_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
501
#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
502
#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
503
#define STM32_UART_UART7_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
504
#define STM32_UART_UART7_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
505
#define STM32_UART_UART8_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
506
#define STM32_UART_UART8_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
507
#define STM32_UART_USART1_DMA_PRIORITY 0
508
#define STM32_UART_USART2_DMA_PRIORITY 0
509
#define STM32_UART_USART3_DMA_PRIORITY 0
510
#define STM32_UART_UART4_DMA_PRIORITY 0
511
#define STM32_UART_UART5_DMA_PRIORITY 0
512
#define STM32_UART_USART6_DMA_PRIORITY 0
513
#define STM32_UART_UART7_DMA_PRIORITY 0
514
#define STM32_UART_UART8_DMA_PRIORITY 0
515
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
516
517
/*
518
* USB driver system settings.
519
*/
520
#define STM32_USB_USE_OTG1 TRUE
521
#define STM32_USB_USE_OTG2 FALSE
522
#define STM32_USB_OTG1_IRQ_PRIORITY 14
523
#define STM32_USB_OTG2_IRQ_PRIORITY 14
524
#define STM32_USB_OTG1_RX_FIFO_SIZE 512
525
#define STM32_USB_OTG2_RX_FIFO_SIZE 1024
526
#define STM32_USB_HOST_WAKEUP_DURATION 2
527
528
/*
529
* WDG driver system settings.
530
*/
531
#define STM32_WDG_USE_IWDG TRUE
532
533
/*
534
* WSPI driver system settings.
535
*/
536
#define STM32_WSPI_USE_QUADSPI1 FALSE
537
#define STM32_WSPI_QUADSPI1_PRESCALER_VALUE 1
538
#define STM32_WSPI_QUADSPI1_MDMA_CHANNEL STM32_MDMA_CHANNEL_ID_ANY
539
#define STM32_WSPI_QUADSPI1_MDMA_PRIORITY 1
540
#define STM32_WSPI_MDMA_ERROR_HOOK(qspip) osalSysHalt("MDMA failure")
541
542
#define STM32_SYSCLK STM32_SYS_CK
543
544
#define ENABLE_AUTO_DETECT_HSE TRUE
545
546
#endif
/* MCUCONF_H */
Generated on Sat Sep 27 2025 00:10:06 for rusEFI by
1.9.8