bootloader: set the initial XTAL frequency based on the Kconfig option

This commit is contained in:
Ivan Grokhotkov
2022-07-01 20:27:31 +02:00
committed by songruojing
parent 672e70a023
commit f0f9890096

View File

@@ -45,7 +45,10 @@ __attribute__((weak)) void bootloader_clock_configure(void)
#if CONFIG_IDF_TARGET_ESP32
clk_cfg.xtal_freq = CONFIG_ESP32_XTAL_FREQ;
#endif
/* Except ESP32, there is no XTAL_FREQ choice */
#if CONFIG_IDF_TARGET_ESP32C2
clk_cfg.xtal_freq = CONFIG_ESP32C2_XTAL_FREQ;
#endif
/* For other chips, there is no XTAL_FREQ choice */
clk_cfg.cpu_freq_mhz = cpu_freq_mhz;
clk_cfg.slow_clk_src = rtc_clk_slow_src_get();
if (clk_cfg.slow_clk_src == SOC_RTC_SLOW_CLK_SRC_INVALID) {