Enable ENABLE_AUTO_DETECT_HSE only if STM32_HSECLK is not defined (#3758)
Some board (like stm32f429-disco) with SDRAM need clock to be enabled in __early_init (before .bss and .data initialization). So if STM32_HSECLK defined - skip clock detection.
This commit is contained in:
parent
d06c157099
commit
0860caa72b
|
@ -335,12 +335,15 @@
|
|||
*/
|
||||
#define STM32_WDG_USE_IWDG FALSE
|
||||
|
||||
// Pretend we have a 25MHz external crystal. This value isn't actually used since we
|
||||
// configure the PLL to start on the HSI oscillator, then compute HSE's speed at runtime
|
||||
// and reconfigure the PLL appropriately.
|
||||
#define STM32_HSECLK 25000000
|
||||
/* Some boards need to know clock early on boot.
|
||||
* F429-Discovery board configures clock and then SDRAM early on boot */
|
||||
#ifndef STM32_HSECLK
|
||||
// Pretend we have a 25MHz external crystal. This value isn't actually used since we
|
||||
// configure the PLL to start on the HSI oscillator, then compute HSE's speed at runtime
|
||||
// and reconfigure the PLL appropriately.
|
||||
#define STM32_HSECLK 25000000
|
||||
|
||||
// After boot, we will detect the real frequency, and adjust the PLL M value to suit
|
||||
|
||||
#define ENABLE_AUTO_DETECT_HSE
|
||||
// After boot, we will detect the real frequency, and adjust the PLL M value to suit
|
||||
|
||||
#define ENABLE_AUTO_DETECT_HSE
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue