Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
mcuconf.h
Go to the documentation of this file.
1
/*
2
ChibiOS/RT - Copyright (C) 2006-2013 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
#ifndef _MCUCONF_H_
17
#define _MCUCONF_H_
18
19
20
#define STM32F107_MCUCONF
21
22
/*
23
* STM32F1xx drivers configuration.
24
* The following settings override the default settings present in
25
* the various device driver implementation headers.
26
* Note that the settings for each driver only have effect if the whole
27
* driver is enabled in halconf.h.
28
*
29
* IRQ priorities:
30
* 15...0 Lowest...Highest.
31
*
32
* DMA priorities:
33
* 0...3 Lowest...Highest.
34
*/
35
36
/*
37
* HAL driver system settings.
38
*/
39
#define STM32_NO_INIT FALSE
40
#define STM32_HSI_ENABLED TRUE
41
#define STM32_LSI_ENABLED FALSE
42
#define STM32_HSE_ENABLED TRUE
43
#define STM32_LSE_ENABLED FALSE
44
#define STM32_SW STM32_SW_PLL
45
#define STM32_PLLSRC STM32_PLLSRC_PREDIV1
46
#define STM32_PREDIV1_VALUE 1
47
#define STM32_PLLMUL_VALUE 6
48
#define STM32_PREDIV2_VALUE 3
49
#define STM32_PLL2MUL_VALUE 10
50
#define STM32_PLL3MUL_VALUE 12
51
#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1
52
#define STM32_HPRE STM32_HPRE_DIV1
53
#define STM32_PPRE1 STM32_PPRE1_DIV2
54
#define STM32_PPRE2 STM32_PPRE2_DIV2
55
#define STM32_ADCPRE STM32_ADCPRE_DIV4
56
#define STM32_USB_CLOCK_REQUIRED TRUE
57
#define STM32_USBPRE STM32_USBPRE_DIV1P5
58
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
59
#define STM32_RTCSEL STM32_RTCSEL_HSEDIV
60
#define STM32_PVD_ENABLE FALSE
61
#define STM32_PLS STM32_PLS_LEV0
62
63
/*
64
* ADC driver system settings.
65
*/
66
#define STM32_ADC_USE_ADC1 TRUE
67
#define STM32_ADC_ADC1_DMA_PRIORITY 2
68
#define STM32_ADC_ADC1_IRQ_PRIORITY 6
69
70
/*
71
* CAN driver system settings.
72
*/
73
#if USE_CAN1
74
#define STM32_CAN_USE_CAN1 TRUE
75
#else
76
#define STM32_CAN_USE_CAN1 FALSE
77
#endif
78
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
79
80
/*
81
* EXT driver system settings.
82
*/
83
#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
84
#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
85
#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
86
#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
87
#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
88
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
89
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
90
#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
91
#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
92
#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
93
#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
94
95
/*
96
* GPT driver system settings.
97
*/
98
#define STM32_GPT_USE_TIM1 FALSE
99
#define STM32_GPT_USE_TIM2 FALSE
100
#define STM32_GPT_USE_TIM3 FALSE
101
#define STM32_GPT_USE_TIM4 FALSE
102
#define STM32_GPT_USE_TIM5 FALSE
103
#define STM32_GPT_USE_TIM8 FALSE
104
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
105
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
106
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
107
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
108
#define STM32_GPT_TIM5_IRQ_PRIORITY 7
109
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
110
111
/*
112
* I2C driver system settings.
113
*/
114
#if USE_I2C1
115
#define STM32_I2C_USE_I2C1 TRUE
116
#else
117
#define STM32_I2C_USE_I2C1 FALSE
118
#endif
119
#if USE_I2C2
120
#define STM32_I2C_USE_I2C2 TRUE
121
#else
122
#define STM32_I2C_USE_I2C2 FALSE
123
#endif
124
#define STM32_I2C_BUSY_TIMEOUT 50
125
#define STM32_I2C_I2C1_IRQ_PRIORITY 5
126
#define STM32_I2C_I2C2_IRQ_PRIORITY 5
127
#define STM32_I2C_I2C1_DMA_PRIORITY 3
128
#define STM32_I2C_I2C2_DMA_PRIORITY 3
129
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
130
131
/*
132
* ICU driver system settings.
133
*/
134
#define STM32_ICU_USE_TIM1 TRUE
135
#define STM32_ICU_USE_TIM2 FALSE
136
#define STM32_ICU_USE_TIM3 FALSE
137
#define STM32_ICU_USE_TIM4 FALSE
138
#define STM32_ICU_USE_TIM5 FALSE
139
#define STM32_ICU_USE_TIM8 FALSE
140
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
141
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
142
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
143
#define STM32_ICU_TIM4_IRQ_PRIORITY 7
144
#define STM32_ICU_TIM5_IRQ_PRIORITY 7
145
#define STM32_ICU_TIM8_IRQ_PRIORITY 7
146
147
/*
148
* PWM driver system settings.
149
*/
150
#define STM32_PWM_USE_ADVANCED FALSE
151
#define STM32_PWM_USE_TIM1 FALSE
152
#define STM32_PWM_USE_TIM2 FALSE
153
#define STM32_PWM_USE_TIM3 TRUE
154
#define STM32_PWM_USE_TIM4 FALSE
155
#define STM32_PWM_USE_TIM5 TRUE
156
#define STM32_PWM_USE_TIM8 FALSE
157
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
158
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
159
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
160
#define STM32_PWM_TIM4_IRQ_PRIORITY 7
161
#define STM32_PWM_TIM5_IRQ_PRIORITY 7
162
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
163
164
/*
165
* RTC driver system settings.
166
*/
167
#define STM32_RTC_IRQ_PRIORITY 15
168
169
/*
170
* SERIAL driver system settings.
171
*/
172
#if USE_UART1
173
#define STM32_SERIAL_USE_USART1 TRUE
174
#else
175
#define STM32_SERIAL_USE_USART1 FALSE
176
#endif
177
#if USE_UART2
178
#define STM32_SERIAL_USE_USART2 TRUE
179
#else
180
#define STM32_SERIAL_USE_USART2 FALSE
181
#endif
182
#if USE_UART3
183
#define STM32_SERIAL_USE_USART3 TRUE
184
#else
185
#define STM32_SERIAL_USE_USART3 FALSE
186
#endif
187
#if USE_UART4
188
#define STM32_SERIAL_USE_UART4 TRUE
189
#else
190
#define STM32_SERIAL_USE_UART4 FALSE
191
#endif
192
#if USE_UART5
193
#define STM32_SERIAL_USE_UART5 TRUE
194
#else
195
#define STM32_SERIAL_USE_UART5 FALSE
196
#endif
197
#define STM32_SERIAL_USART1_PRIORITY 12
198
#define STM32_SERIAL_USART2_PRIORITY 12
199
#define STM32_SERIAL_USART3_PRIORITY 12
200
#define STM32_SERIAL_UART4_PRIORITY 12
201
#define STM32_SERIAL_UART5_PRIORITY 12
202
203
/*
204
* SPI driver system settings.
205
*/
206
#if USE_SPI1
207
#define STM32_SPI_USE_SPI1 TRUE
208
#else
209
#define STM32_SPI_USE_SPI1 FALSE
210
#endif
211
#if USE_SPI2
212
#define STM32_SPI_USE_SPI2 TRUE
213
#else
214
#define STM32_SPI_USE_SPI2 FALSE
215
#endif
216
#if USE_SPI3
217
#define STM32_SPI_USE_SPI3 TRUE
218
#else
219
#define STM32_SPI_USE_SPI3 FALSE
220
#endif
221
#define STM32_SPI_SPI1_DMA_PRIORITY 1
222
#define STM32_SPI_SPI2_DMA_PRIORITY 1
223
#define STM32_SPI_SPI3_DMA_PRIORITY 1
224
#define STM32_SPI_SPI1_IRQ_PRIORITY 10
225
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
226
#define STM32_SPI_SPI3_IRQ_PRIORITY 10
227
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
228
229
/*
230
* ST driver system settings.
231
*/
232
#define STM32_ST_IRQ_PRIORITY 8
233
#define STM32_ST_USE_TIMER 2
234
235
/*
236
* UART driver system settings.
237
*/
238
#if USE_UARTD1
239
#define STM32_UART_USE_USART1 TRUE
240
#else
241
#define STM32_UART_USE_USART1 FALSE
242
#endif
243
#if USE_UARTD2
244
#define STM32_UART_USE_USART2 TRUE
245
#else
246
#define STM32_UART_USE_USART2 FALSE
247
#endif
248
#if USE_UARTD3
249
#define STM32_UART_USE_USART3 TRUE
250
#else
251
#define STM32_UART_USE_USART3 FALSE
252
#endif
253
#define STM32_UART_USART1_IRQ_PRIORITY 12
254
#define STM32_UART_USART2_IRQ_PRIORITY 12
255
#define STM32_UART_USART3_IRQ_PRIORITY 12
256
#define STM32_UART_USART1_DMA_PRIORITY 0
257
#define STM32_UART_USART2_DMA_PRIORITY 0
258
#define STM32_UART_USART3_DMA_PRIORITY 0
259
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
260
261
/*
262
* USB driver system settings.
263
*/
264
#if USE_USB_SERIAL
265
#define STM32_USB_USE_OTG1 TRUE
266
#else
267
#define STM32_USB_USE_OTG1 FALSE
268
#endif
269
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
270
#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
271
#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
272
273
/*
274
* WDG driver system settings.
275
*/
276
#define STM32_WDG_USE_IWDG FALSE
277
278
#endif
/* _MCUCONF_H_ */
sw
airborne
boards
lia
chibios
v1.1
mcuconf.h
Generated on Wed Feb 10 2021 04:33:56 for Paparazzi UAS by
1.8.8