diff --git a/components/esp_hw_support/Kconfig b/components/esp_hw_support/Kconfig index d10007399d..241415ecc0 100644 --- a/components/esp_hw_support/Kconfig +++ b/components/esp_hw_support/Kconfig @@ -219,6 +219,12 @@ menu "Hardware Settings" menu "RTC Clock Config" orsource "./port/$IDF_TARGET/Kconfig.rtc" + + config RTC_CLK_FUNC_IN_IRAM + bool "Place RTC clock module functions into IRAM" + default y + help + Place RTC clock module (all rtc clock functions and const data) into IRAM. endmenu menu "Peripheral Control" diff --git a/components/esp_hw_support/linker.lf b/components/esp_hw_support/linker.lf index 48fb35f098..f19df19e5d 100644 --- a/components/esp_hw_support/linker.lf +++ b/components/esp_hw_support/linker.lf @@ -14,9 +14,10 @@ entries: esp_memory_utils (noflash) clk_utils (noflash) if PM_SLP_IRAM_OPT = y: - rtc_clk (noflash) rtc_time (noflash_text) esp_clk_tree: esp_clk_tree_enable_src (noflash) + if RTC_CLK_FUNC_IN_IRAM = y: + rtc_clk (noflash) if IDF_TARGET_ESP32 = y: rtc_clk:rtc_clk_cpu_freq_to_pll_mhz (noflash) rtc_clk:rtc_clk_cpu_freq_to_xtal (noflash)