soc/rtc: warn if detected XTAL frequency does not match configured one

Since 9a8c0392, XTAL frequency is set to 40MHz by default, and users
of 26MHz boards need to select 26MHz manually. Most users are not aware
of this change, and existing getting started guides do not mention that
XTAL frequency needs to be set for some boards. So users are left with
garbage output from UART without any clue what to check.

This change adds a warning in case specific XTAL frequency was set, and
it does not match automatically detected one. This should help users
fix the issue.
This commit is contained in:
Ivan Grokhotkov
2017-09-11 11:42:26 +08:00
parent 050ae50e83
commit 5a88f90a33
3 changed files with 14 additions and 3 deletions

View File

@@ -753,7 +753,6 @@ static void clock_configure(void)
cpu_freq = RTC_CPU_FREQ_240M;
}
uart_tx_wait_idle(0);
rtc_clk_config_t clk_cfg = RTC_CLK_CONFIG_DEFAULT();
clk_cfg.xtal_freq = CONFIG_ESP32_XTAL_FREQ;
clk_cfg.cpu_freq = cpu_freq;