rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
hw_layer
ports
stm32
stm32f4
cfg
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
/*
21
* STM32F4xx 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 STM32F4xx_MCUCONF
35
#define STM32F405_MCUCONF
36
#define STM32F415_MCUCONF
37
#define STM32F407_MCUCONF
38
#define STM32F417_MCUCONF
39
40
// Allows LSE init to timeout and configure fallback RTC clock source in case
41
#define RUSEFI_STM32_LSE_WAIT_MAX 1000000
42
#define RUSEFI_STM32_LSE_WAIT_MAX_RTCSEL STM32_RTCSEL_LSI
43
44
/*
45
* HAL driver system settings.
46
*/
47
#define STM32_NO_INIT FALSE
48
#define STM32_HSI_ENABLED TRUE
49
#define STM32_LSI_ENABLED TRUE
50
/* Some boards may have no HSE */
51
#ifndef STM32_HSE_ENABLED
52
#define STM32_HSE_ENABLED TRUE
53
#endif
54
// see RUSEFI_STM32_LSE_WAIT_MAX
55
#define STM32_LSE_ENABLED TRUE
56
#define STM32_CLOCK48_REQUIRED TRUE
57
#define STM32_SW STM32_SW_PLL
58
#define STM32_PLLSRC STM32_PLLSRC_HSI
59
#define STM32_PLLM_VALUE 16
60
#define STM32_PLLN_VALUE 336
61
#define STM32_PLLP_VALUE 2
62
#define STM32_PLLQ_VALUE 7
63
#define STM32_HPRE STM32_HPRE_DIV1
64
#define STM32_PPRE1 STM32_PPRE1_DIV4
65
#define STM32_PPRE2 STM32_PPRE2_DIV2
66
// see RUSEFI_STM32_LSE_WAIT_MAX_RTCSEL
67
#define STM32_RTCSEL STM32_RTCSEL_LSE
68
#ifndef STM32_RTCPRE_VALUE
69
#define STM32_RTCPRE_VALUE 8
70
#endif
71
#define STM32_MCO1SEL STM32_MCO1SEL_HSI
72
#define STM32_MCO1PRE STM32_MCO1PRE_DIV1
73
#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK
74
#define STM32_MCO2PRE STM32_MCO2PRE_DIV5
75
#define STM32_I2SSRC STM32_I2SSRC_CKIN
76
#define STM32_PLLI2SN_VALUE 192
77
#define STM32_PLLI2SR_VALUE 5
78
#define STM32_PVD_ENABLE FALSE
79
#define STM32_PLS STM32_PLS_LEV0
80
#define STM32_BKPRAM_ENABLE TRUE
81
82
/*
83
* GPT driver system settings.
84
*/
85
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
86
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
87
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
88
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
89
#define STM32_GPT_TIM5_IRQ_PRIORITY 7
90
#define STM32_GPT_TIM6_IRQ_PRIORITY 7
91
#define STM32_GPT_TIM7_IRQ_PRIORITY 7
92
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
93
#define STM32_GPT_TIM9_IRQ_PRIORITY 7
94
#define STM32_GPT_TIM11_IRQ_PRIORITY 7
95
#define STM32_GPT_TIM12_IRQ_PRIORITY 7
96
#define STM32_GPT_TIM14_IRQ_PRIORITY 7
97
98
/*
99
* SDC driver system settings.
100
*/
101
#define STM32_SDC_SDIO_DMA_PRIORITY 3
102
#define STM32_SDC_SDIO_IRQ_PRIORITY 9
103
#define STM32_SDC_WRITE_TIMEOUT_MS 250
104
#define STM32_SDC_READ_TIMEOUT_MS 25
105
#define STM32_SDC_CLOCK_ACTIVATION_DELAY 10
106
#define STM32_SDC_SDIO_UNALIGNED_SUPPORT TRUE
107
#define STM32_SDC_SDIO_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
108
109
#include "
mcuconf_common_f4_f7.h
"
110
111
#endif
/* MCUCONF_H */
mcuconf_common_f4_f7.h
Generated on Sat Sep 27 2025 00:10:06 for rusEFI by
1.9.8