diff --git a/components/esp_hw_support/Kconfig b/components/esp_hw_support/Kconfig index d0a0914af83..a0b51b48499 100644 --- a/components/esp_hw_support/Kconfig +++ b/components/esp_hw_support/Kconfig @@ -224,6 +224,12 @@ menu "Hardware Settings" default y help Place RTC clock module (all rtc clock functions and const data) into IRAM. + + config RTC_TIME_FUNC_IN_IRAM + bool "Place RTC time module functions into IRAM" + default y + help + Place RTC time module (all rtc clock functions) into IRAM. endmenu menu "Peripheral Control" diff --git a/components/esp_hw_support/linker.lf b/components/esp_hw_support/linker.lf index 48ab825a3a6..9b81716d8b6 100644 --- a/components/esp_hw_support/linker.lf +++ b/components/esp_hw_support/linker.lf @@ -14,7 +14,6 @@ entries: esp_memory_utils (noflash) clk_utils (noflash) if PM_SLP_IRAM_OPT = y: - rtc_time (noflash_text) esp_clk_tree: esp_clk_tree_enable_src (noflash) esp_clk_tree: esp_clk_tree_enable_power (noflash) esp_clk_tree: esp_clk_tree_is_power_on (noflash) @@ -23,6 +22,8 @@ entries: if IDF_TARGET_ESP32 = y: rtc_clk:rtc_clk_cpu_freq_to_pll_mhz (noflash) rtc_clk:rtc_clk_cpu_freq_to_xtal (noflash) + if RTC_TIME_FUNC_IN_IRAM = y: + rtc_time (noflash_text) if SOC_CONFIGURABLE_VDDSDIO_SUPPORTED = y: rtc_init:rtc_vddsdio_get_config (noflash) rtc_init:rtc_vddsdio_set_config (noflash)