From a9fcf0d57a570110ad294675146f215225807d2b 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 +++ components/esp_hw_support/port/esp32p4/Kconfig.rtc | 3 +++ components/esp_hw_support/test_apps/dma/README.md | 4 ++-- 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/components/esp_hw_support/CMakeLists.txt b/components/esp_hw_support/CMakeLists.txt index 7ede9c33d7..bfff27248c 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 180a559f38..4a2e10d181 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 180a559f38..4a2e10d181 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 diff --git a/components/esp_hw_support/port/esp32p4/Kconfig.rtc b/components/esp_hw_support/port/esp32p4/Kconfig.rtc index a69c765a5f..b9ff11608d 100644 --- a/components/esp_hw_support/port/esp32p4/Kconfig.rtc +++ b/components/esp_hw_support/port/esp32p4/Kconfig.rtc @@ -11,6 +11,9 @@ choice RTC_CLK_SRC select ESP_SYSTEM_RTC_EXT_XTAL 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/test_apps/dma/README.md b/components/esp_hw_support/test_apps/dma/README.md index 3a9c73a780..4fc69c16b6 100644 --- a/components/esp_hw_support/test_apps/dma/README.md +++ b/components/esp_hw_support/test_apps/dma/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | +| ----------------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |