From a4bc0becb0fcc8ebcaf656e31a960ec7c7156d24 Mon Sep 17 00:00:00 2001 From: Song Ruo Jing Date: Fri, 13 Sep 2024 11:44:51 +0800 Subject: [PATCH] fix(clk): warn the users to avoid using RC32K clock --- components/esp_hw_support/CMakeLists.txt | 4 ++++ components/esp_hw_support/port/esp32c6/Kconfig.rtc | 3 +++ components/esp_hw_support/port/esp32h2/Kconfig.rtc | 3 +++ 3 files changed, 10 insertions(+) diff --git a/components/esp_hw_support/CMakeLists.txt b/components/esp_hw_support/CMakeLists.txt index b29f78b068..f3f2c853a1 100644 --- a/components/esp_hw_support/CMakeLists.txt +++ b/components/esp_hw_support/CMakeLists.txt @@ -16,6 +16,10 @@ if(${target} STREQUAL "esp32c6") list(APPEND priv_requires hal) endif() +if(CONFIG_RTC_CLK_SRC_INT_RC32K) + message(WARNING "Internal RC32K clock is unstable at extreme temperatures and is not recommended for use.") +endif() + set(srcs "cpu.c" "port/${IDF_TARGET}/esp_cpu_intr.c" "esp_memory_utils.c" "port/${IDF_TARGET}/cpu_region_protect.c") if(NOT BOOTLOADER_BUILD) list(APPEND srcs "esp_clk.c" diff --git a/components/esp_hw_support/port/esp32c6/Kconfig.rtc b/components/esp_hw_support/port/esp32c6/Kconfig.rtc index 24a5b8fb94..0b7c9dc517 100644 --- a/components/esp_hw_support/port/esp32c6/Kconfig.rtc +++ b/components/esp_hw_support/port/esp32c6/Kconfig.rtc @@ -14,6 +14,9 @@ choice RTC_CLK_SRC select ESP_SYSTEM_RTC_EXT_OSC config RTC_CLK_SRC_INT_RC32K bool "Internal 32kHz RC oscillator" + help + Internal RC32K clock is unstable at extreme temperatures and is not recommended for use. + This option will be removed in IDF v6.0. endchoice config RTC_CLK_CAL_CYCLES diff --git a/components/esp_hw_support/port/esp32h2/Kconfig.rtc b/components/esp_hw_support/port/esp32h2/Kconfig.rtc index 24a5b8fb94..0b7c9dc517 100644 --- a/components/esp_hw_support/port/esp32h2/Kconfig.rtc +++ b/components/esp_hw_support/port/esp32h2/Kconfig.rtc @@ -14,6 +14,9 @@ choice RTC_CLK_SRC select ESP_SYSTEM_RTC_EXT_OSC config RTC_CLK_SRC_INT_RC32K bool "Internal 32kHz RC oscillator" + help + Internal RC32K clock is unstable at extreme temperatures and is not recommended for use. + This option will be removed in IDF v6.0. endchoice config RTC_CLK_CAL_CYCLES