rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
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#include "interrupt_priority.h"
21
22/*
23 * STM32H7xx 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#define STM32H7xx_MCUCONF
37
38// See hw_ports.mk
39#ifdef STM32H743xx
40 #define STM32H742_MCUCONF
41 #define STM32H743_MCUCONF
42 #define STM32H753_MCUCONF
43 #define STM32H745_MCUCONF
44 #define STM32H755_MCUCONF
45 #define STM32H747_MCUCONF
46 #define STM32H757_MCUCONF
47
48 #include "mcuconf_stm32h743.h"
49#endif
50#ifdef STM32H723xx
51 #define STM32H723_MCUCONF
52 #define STM32H723_MCUCONF
53 #define STM32H733_MCUCONF
54 #define STM32H725_MCUCONF
55 #define STM32H735_MCUCONF
56
57 #include "mcuconf_stm32h723.h"
58#endif
59
60// Allows LSE init to timeout and configure fallback RTC clock source in case
61#define RUSEFI_STM32_LSE_WAIT_MAX 1000000
62#define RUSEFI_STM32_LSE_WAIT_MAX_RTCSEL STM32_RTCSEL_LSI_CK
63
64/*
65 * General settings.
66 */
67#define STM32_NO_INIT FALSE
68#define STM32_TARGET_CORE 1
69
70/*
71 * IRQ system settings.
72 */
73
74#define STM32_DISABLE_EXTI0_HANDLER
75#define STM32_DISABLE_EXTI1_HANDLER
76#define STM32_DISABLE_EXTI2_HANDLER
77#define STM32_DISABLE_EXTI3_HANDLER
78#define STM32_DISABLE_EXTI4_HANDLER
79#define STM32_DISABLE_EXTI5_9_HANDLER
80#define STM32_DISABLE_EXTI10_15_HANDLER
81
82// we hijack this interrupt handler as the EXTI chained handler, see digital_input_exti.cpp
83#define STM32_I2C_I2C1_IRQ_PRIORITY 6
84
85#define STM32_IRQ_EXTI_PRIORITY EFI_IRQ_EXTI_PRIORITY
86#define STM32_IRQ_EXTI0_PRIORITY EFI_IRQ_EXTI_PRIORITY
87#define STM32_IRQ_EXTI1_PRIORITY EFI_IRQ_EXTI_PRIORITY
88#define STM32_IRQ_EXTI2_PRIORITY EFI_IRQ_EXTI_PRIORITY
89#define STM32_IRQ_EXTI3_PRIORITY EFI_IRQ_EXTI_PRIORITY
90#define STM32_IRQ_EXTI4_PRIORITY EFI_IRQ_EXTI_PRIORITY
91#define STM32_IRQ_EXTI5_9_PRIORITY EFI_IRQ_EXTI_PRIORITY
92#define STM32_IRQ_EXTI10_15_PRIORITY EFI_IRQ_EXTI_PRIORITY
93
94#define STM32_IRQ_EXTI16_PRIORITY 6
95#define STM32_IRQ_EXTI17_PRIORITY 6
96#define STM32_IRQ_EXTI18_PRIORITY 6
97#define STM32_IRQ_EXTI19_PRIORITY 6
98#define STM32_IRQ_EXTI20_21_PRIORITY 6
99
100#define STM32_IRQ_FDCAN1_PRIORITY EFI_IRQ_CAN_PRIORITY
101#define STM32_IRQ_FDCAN2_PRIORITY EFI_IRQ_CAN_PRIORITY
102#define STM32_IRQ_FDCAN3_PRIORITY EFI_IRQ_CAN_PRIORITY
103
104#define STM32_IRQ_MDMA_PRIORITY 9
105
106#define STM32_IRQ_OCTOSPI1_PRIORITY 10
107#define STM32_IRQ_OCTOSPI2_PRIORITY 10
108
109#define STM32_IRQ_QUADSPI1_PRIORITY 10
110
111#define STM32_IRQ_SDMMC1_PRIORITY EFI_IRQ_SDMMC_PRIORITY
112#define STM32_IRQ_SDMMC2_PRIORITY EFI_IRQ_SDMMC_PRIORITY
113
114#define STM32_IRQ_TIM1_UP_PRIORITY 7
115#define STM32_IRQ_TIM1_CC_PRIORITY 7
116#define STM32_IRQ_TIM2_PRIORITY 7
117#define STM32_IRQ_TIM3_PRIORITY 7
118#define STM32_IRQ_TIM4_PRIORITY 7
119#define STM32_IRQ_TIM5_PRIORITY EFI_IRQ_SCHEDULING_TIMER_PRIORITY
120#define STM32_IRQ_TIM6_PRIORITY 7
121#define STM32_IRQ_TIM7_PRIORITY 7
122#define STM32_IRQ_TIM8_BRK_TIM12_PRIORITY 7
123#define STM32_IRQ_TIM8_UP_TIM13_PRIORITY 7
124#define STM32_IRQ_TIM8_TRGCO_TIM14_PRIORITY 7
125#define STM32_IRQ_TIM8_CC_PRIORITY 7
126#define STM32_IRQ_TIM15_PRIORITY 7
127#define STM32_IRQ_TIM16_PRIORITY 7
128#define STM32_IRQ_TIM17_PRIORITY 7
129
130#define STM32_IRQ_USART1_PRIORITY EFI_IRQ_UART_PRIORITY
131#define STM32_IRQ_USART2_PRIORITY EFI_IRQ_UART_PRIORITY
132#define STM32_IRQ_USART3_PRIORITY EFI_IRQ_UART_PRIORITY
133#define STM32_IRQ_UART4_PRIORITY EFI_IRQ_UART_PRIORITY
134#define STM32_IRQ_UART5_PRIORITY EFI_IRQ_UART_PRIORITY
135#define STM32_IRQ_USART6_PRIORITY EFI_IRQ_UART_PRIORITY
136#define STM32_IRQ_UART7_PRIORITY EFI_IRQ_UART_PRIORITY
137#define STM32_IRQ_UART8_PRIORITY EFI_IRQ_UART_PRIORITY
138#define STM32_IRQ_UART9_PRIORITY EFI_IRQ_UART_PRIORITY
139#define STM32_IRQ_USART10_PRIORITY EFI_IRQ_UART_PRIORITY
140#define STM32_IRQ_LPUART1_PRIORITY EFI_IRQ_UART_PRIORITY
141
142/*
143 * ADC driver system settings.
144 */
145#define STM32_ADC_DUAL_MODE FALSE
146#define STM32_ADC_COMPACT_SAMPLES FALSE
147#define STM32_ADC_USE_ADC12 TRUE
148
149#ifndef STM32_ADC_USE_ADC3
150#define STM32_ADC_USE_ADC3 FALSE
151#endif /* STM32_ADC_USE_ADC3 */
152
153#define STM32_ADC_ADC12_DMA_STREAM STM32_DMA_STREAM_ID_ANY
154#define STM32_ADC_ADC3_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
155#define STM32_ADC_ADC12_DMA_PRIORITY 2
156#define STM32_ADC_ADC3_DMA_PRIORITY 2
157#define STM32_ADC_ADC12_IRQ_PRIORITY EFI_IRQ_ADC_PRIORITY
158#define STM32_ADC_ADC3_IRQ_PRIORITY EFI_IRQ_ADC_PRIORITY
159#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV4
160#define STM32_ADC_ADC3_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV4
161
162/*
163 * CAN driver system settings.
164 */
165#define STM32_CAN_USE_FDCAN1 TRUE
166#define STM32_CAN_USE_FDCAN2 TRUE
167
168/*
169 * DAC driver system settings.
170 */
171#define STM32_DAC_DUAL_MODE FALSE
172#define STM32_DAC_USE_DAC1_CH1 FALSE
173#define STM32_DAC_USE_DAC1_CH2 FALSE
174#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
175#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
176#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
177#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
178#define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID_ANY
179#define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID_ANY
180
181/*
182 * GPT driver system settings.
183 */
184#define STM32_GPT_USE_TIM1 FALSE
185#define STM32_GPT_USE_TIM2 FALSE
186#define STM32_GPT_USE_TIM3 TRUE
187#define STM32_GPT_USE_TIM4 FALSE
188#define STM32_GPT_USE_TIM5 FALSE
189#define STM32_GPT_USE_TIM6 TRUE
190#define STM32_GPT_USE_TIM7 FALSE
191#define STM32_GPT_USE_TIM8 FALSE
192#define STM32_GPT_USE_TIM12 FALSE
193#define STM32_GPT_USE_TIM13 FALSE
194#define STM32_GPT_USE_TIM14 FALSE
195#define STM32_GPT_USE_TIM15 FALSE
196#define STM32_GPT_USE_TIM16 FALSE
197#define STM32_GPT_USE_TIM17 FALSE
198
199/*
200 * I2C driver system settings.
201 */
202#define STM32_I2C_USE_I2C1 FALSE
203#define STM32_I2C_USE_I2C2 FALSE
204#define STM32_I2C_USE_I2C3 FALSE
205#define STM32_I2C_USE_I2C4 FALSE
206#define STM32_I2C_BUSY_TIMEOUT 50
207#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
208#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
209#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
210#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
211#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
212#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
213#define STM32_I2C_I2C4_RX_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
214#define STM32_I2C_I2C4_TX_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
215// STM32_I2C_I2C1_IRQ_PRIORITY is defined above, reused for fast EXTI handoff
216#define STM32_I2C_I2C2_IRQ_PRIORITY 5
217#define STM32_I2C_I2C3_IRQ_PRIORITY 5
218#define STM32_I2C_I2C4_IRQ_PRIORITY 5
219#define STM32_I2C_I2C1_DMA_PRIORITY 3
220#define STM32_I2C_I2C2_DMA_PRIORITY 3
221#define STM32_I2C_I2C3_DMA_PRIORITY 3
222#define STM32_I2C_I2C4_DMA_PRIORITY 3
223#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
224
225/*
226 * ICU driver system settings.
227 */
228#ifndef STM32_ICU_USE_TIM1
229#define STM32_ICU_USE_TIM1 FALSE
230#endif
231
232#ifndef STM32_ICU_USE_TIM2
233#define STM32_ICU_USE_TIM2 TRUE
234#endif
235
236#ifndef STM32_ICU_USE_TIM3
237#define STM32_ICU_USE_TIM3 FALSE
238#endif
239
240#ifndef STM32_ICU_USE_TIM4
241#define STM32_ICU_USE_TIM4 FALSE
242#endif
243
244#ifndef STM32_ICU_USE_TIM5
245#define STM32_ICU_USE_TIM5 FALSE
246#endif
247
248#ifndef STM32_ICU_USE_TIM8
249#define STM32_ICU_USE_TIM8 FALSE
250#endif
251
252#ifndef STM32_ICU_USE_TIM9
253#define STM32_ICU_USE_TIM9 FALSE
254#endif
255
256#define STM32_ICU_USE_TIM12 FALSE
257#define STM32_ICU_USE_TIM13 FALSE
258#define STM32_ICU_USE_TIM14 FALSE
259#define STM32_ICU_USE_TIM15 FALSE
260#define STM32_ICU_USE_TIM16 FALSE
261#define STM32_ICU_USE_TIM17 FALSE
262
263/*
264 * MAC driver system settings.
265 */
266#define STM32_MAC_TRANSMIT_BUFFERS 4
267#define STM32_MAC_RECEIVE_BUFFERS 4
268#define STM32_MAC_BUFFERS_SIZE 1522
269#define STM32_MAC_PHY_TIMEOUT 100
270#define STM32_MAC_ETH1_CHANGE_PHY_STATE TRUE
271#define STM32_MAC_ETH1_IRQ_PRIORITY 13
272#define STM32_MAC_IP_CHECKSUM_OFFLOAD 0
273
274/*
275 * PWM driver system settings.
276 */
277#define STM32_PWM_USE_TIM1 FALSE
278#define STM32_PWM_USE_TIM2 FALSE
279
280#ifndef STM32_PWM_USE_TIM3
281#define STM32_PWM_USE_TIM3 FALSE
282#endif
283
284#ifndef STM32_PWM_USE_TIM4
285#define STM32_PWM_USE_TIM4 TRUE
286#endif
287
288#ifndef STM32_PWM_USE_TIM5
289#define STM32_PWM_USE_TIM5 TRUE
290#endif
291
292#ifndef STM32_PWM_USE_TIM8
293#define STM32_PWM_USE_TIM8 TRUE
294#endif
295
296#define STM32_PWM_USE_TIM12 FALSE
297#define STM32_PWM_USE_TIM13 FALSE
298#define STM32_PWM_USE_TIM14 FALSE
299#define STM32_PWM_USE_TIM15 FALSE
300#define STM32_PWM_USE_TIM16 FALSE
301#define STM32_PWM_USE_TIM17 FALSE
302
303/*
304 * RTC driver system settings.
305 */
306#define STM32_RTC_PRESA_VALUE 32
307#define STM32_RTC_PRESS_VALUE 1024
308#define STM32_RTC_CR_INIT 0
309#define STM32_RTC_TAMPCR_INIT 0
310
311/*
312 * SDC driver system settings.
313 */
314#define STM32_SDC_USE_SDMMC1 TRUE
315#define STM32_SDC_USE_SDMMC2 FALSE
316#define STM32_SDC_SDMMC_UNALIGNED_SUPPORT TRUE
317#define STM32_SDC_SDMMC_WRITE_TIMEOUT 1000000
318#define STM32_SDC_SDMMC_READ_TIMEOUT 1000000
319#define STM32_SDC_SDMMC_CLOCK_DELAY 10
320#define STM32_SDC_SDMMC_PWRSAV TRUE
321
322/*
323 * SERIAL driver system settings.
324 */
325#ifndef STM32_SERIAL_USE_USART1
326#define STM32_SERIAL_USE_USART1 TRUE
327#endif
328
329#ifndef STM32_SERIAL_USE_USART2
330#define STM32_SERIAL_USE_USART2 FALSE
331#endif
332
333#ifndef STM32_SERIAL_USE_USART3
334#define STM32_SERIAL_USE_USART3 FALSE
335#endif
336
337#ifndef STM32_SERIAL_USE_UART4
338#define STM32_SERIAL_USE_UART4 FALSE
339#endif
340
341#ifndef STM32_SERIAL_USE_UART5
342#define STM32_SERIAL_USE_UART5 FALSE
343#endif
344
345#ifndef STM32_SERIAL_USE_USART6
346#define STM32_SERIAL_USE_USART6 TRUE
347#endif
348
349#define STM32_SERIAL_USE_UART7 FALSE
350#define STM32_SERIAL_USE_UART8 FALSE
351#define STM32_SERIAL_USE_LPUART1 FALSE
352
353/*
354 * SPI driver system settings.
355 */
356#ifndef STM32_SPI_USE_SPI1
357#define STM32_SPI_USE_SPI1 TRUE
358#endif
359#ifndef STM32_SPI_USE_SPI2
360#define STM32_SPI_USE_SPI2 TRUE
361#endif
362#ifndef STM32_SPI_USE_SPI3
363#define STM32_SPI_USE_SPI3 TRUE
364#endif
365#ifndef STM32_SPI_USE_SPI4
366#define STM32_SPI_USE_SPI4 FALSE
367#endif
368#ifndef STM32_SPI_USE_SPI5
369#define STM32_SPI_USE_SPI5 FALSE
370#endif
371#ifndef STM32_SPI_USE_SPI6
372#define STM32_SPI_USE_SPI6 FALSE
373#endif
374
375#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
376#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
377#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
378#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
379#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
380#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
381#define STM32_SPI_SPI4_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
382#define STM32_SPI_SPI4_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
383#define STM32_SPI_SPI5_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
384#define STM32_SPI_SPI5_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
385#define STM32_SPI_SPI6_RX_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
386#define STM32_SPI_SPI6_TX_BDMA_STREAM STM32_BDMA_STREAM_ID_ANY
387#define STM32_SPI_SPI1_DMA_PRIORITY 1
388#define STM32_SPI_SPI2_DMA_PRIORITY 1
389#define STM32_SPI_SPI3_DMA_PRIORITY 1
390#define STM32_SPI_SPI4_DMA_PRIORITY 1
391#define STM32_SPI_SPI5_DMA_PRIORITY 1
392#define STM32_SPI_SPI6_DMA_PRIORITY 1
393#define STM32_SPI_SPI1_IRQ_PRIORITY EFI_IRQ_SPI_PRIORITY
394#define STM32_SPI_SPI2_IRQ_PRIORITY EFI_IRQ_SPI_PRIORITY
395#define STM32_SPI_SPI3_IRQ_PRIORITY EFI_IRQ_SPI_PRIORITY
396#define STM32_SPI_SPI4_IRQ_PRIORITY EFI_IRQ_SPI_PRIORITY
397#define STM32_SPI_SPI5_IRQ_PRIORITY EFI_IRQ_SPI_PRIORITY
398#define STM32_SPI_SPI6_IRQ_PRIORITY EFI_IRQ_SPI_PRIORITY
399#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
400
401/*
402 * ST driver system settings.
403 */
404#define STM32_ST_IRQ_PRIORITY EFI_IRQ_SYSTICK_PRIORITY
405#define STM32_ST_USE_TIMER 2
406
407/*
408 * TRNG driver system settings.
409 */
410#define STM32_TRNG_USE_RNG1 FALSE
411
412/*
413 * UART driver system settings.
414 */
415#define STM32_UART_USE_USART1 FALSE
416
417#ifndef STM32_UART_USE_USART2
418#define STM32_UART_USE_USART2 FALSE
419#endif
420
421#define STM32_UART_USE_USART3 TRUE
422#define STM32_UART_USE_UART4 FALSE
423#define STM32_UART_USE_UART5 FALSE
424#define STM32_UART_USE_USART6 FALSE
425#define STM32_UART_USE_UART7 FALSE
426#define STM32_UART_USE_UART8 FALSE
427#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
428#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
429#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
430#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
431#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
432#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
433#define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
434#define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
435#define STM32_UART_UART5_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
436#define STM32_UART_UART5_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
437#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
438#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
439#define STM32_UART_UART7_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
440#define STM32_UART_UART7_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
441#define STM32_UART_UART8_RX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
442#define STM32_UART_UART8_TX_DMA_STREAM STM32_DMA_STREAM_ID_ANY
443#define STM32_UART_USART1_DMA_PRIORITY 0
444#define STM32_UART_USART2_DMA_PRIORITY 0
445#define STM32_UART_USART3_DMA_PRIORITY 0
446#define STM32_UART_UART4_DMA_PRIORITY 0
447#define STM32_UART_UART5_DMA_PRIORITY 0
448#define STM32_UART_USART6_DMA_PRIORITY 0
449#define STM32_UART_UART7_DMA_PRIORITY 0
450#define STM32_UART_UART8_DMA_PRIORITY 0
451#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
452
453/*
454 * USB driver system settings.
455 */
456#define STM32_USB_OTG1_IRQ_PRIORITY EFI_IRQ_USB_PRIORITY
457#define STM32_USB_OTG2_IRQ_PRIORITY EFI_IRQ_USB_PRIORITY
458
459/*
460 * WDG driver system settings.
461 */
462#define STM32_WDG_USE_IWDG TRUE
463
464/*
465 * WSPI driver system settings.
466 */
467#define STM32_WSPI_USE_QUADSPI1 FALSE
468#define STM32_WSPI_QUADSPI1_PRESCALER_VALUE 1
469#define STM32_WSPI_QUADSPI1_MDMA_CHANNEL STM32_MDMA_CHANNEL_ID_ANY
470#define STM32_WSPI_QUADSPI1_MDMA_PRIORITY 1
471#define STM32_WSPI_MDMA_ERROR_HOOK(qspip) osalSysHalt("MDMA failure")
472
473#define STM32_SYSCLK STM32_SYS_CK
474
475/* Some boards need to know clock early on boot. */
476#ifndef STM32_HSECLK
477 // Some boards has no HSE oscillator at all and obviously disable HSE detections
478 #ifndef ENABLE_AUTO_DETECT_HSE
479 // Pretend we have a 25MHz external crystal. This value isn't actually used since we
480 // configure the PLL to start on the HSI oscillator, then compute HSE's speed at runtime
481 // and reconfigure the PLL appropriately.
482 #define STM32_HSECLK 25000000
483
484 // After boot, we will detect the real frequency, and adjust the PLL M value to suit
485 #define ENABLE_AUTO_DETECT_HSE TRUE
486 #endif
487#endif
488
489#endif /* MCUCONF_H */