From 04429c9042b8a82cc545239193f79c9715886bae Mon Sep 17 00:00:00 2001 From: wuzhenghui Date: Mon, 29 Apr 2024 11:57:28 +0800 Subject: [PATCH] change(esp_hw_support): update xtal_freq after assume to avoid mass print in DFS --- components/esp_hw_support/port/esp32c6/rtc_clk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/esp_hw_support/port/esp32c6/rtc_clk.c b/components/esp_hw_support/port/esp32c6/rtc_clk.c index 3beac67c3c..015a002562 100644 --- a/components/esp_hw_support/port/esp32c6/rtc_clk.c +++ b/components/esp_hw_support/port/esp32c6/rtc_clk.c @@ -362,6 +362,7 @@ soc_xtal_freq_t rtc_clk_xtal_freq_get(void) uint32_t xtal_freq_mhz = clk_ll_xtal_load_freq_mhz(); if (xtal_freq_mhz == 0) { ESP_HW_LOGW(TAG, "invalid RTC_XTAL_FREQ_REG value, assume 40MHz"); + clk_ll_xtal_store_freq_mhz(SOC_XTAL_FREQ_40M); return SOC_XTAL_FREQ_40M; } return (soc_xtal_freq_t)xtal_freq_mhz;