diff --git a/components/esp_system/port/soc/esp32p4/clk.c b/components/esp_system/port/soc/esp32p4/clk.c index 03a62d2c18e..33a8b950163 100644 --- a/components/esp_system/port/soc/esp32p4/clk.c +++ b/components/esp_system/port/soc/esp32p4/clk.c @@ -99,9 +99,14 @@ void IRAM_ATTR esp_rtc_init(void) */ static void IRAM_ATTR esp_clk_cpu_freq_set_config_isolated(const rtc_cpu_freq_config_t *config) { + /* esp_cache_utils.c is not built for pure-ram apps. */ +#if !CONFIG_APP_BUILD_TYPE_PURE_RAM_APP esp_cache_suspend_ext_mem_cache(); +#endif rtc_clk_cpu_freq_set_config(config); +#if !CONFIG_APP_BUILD_TYPE_PURE_RAM_APP esp_cache_resume_ext_mem_cache(); +#endif } __attribute__((weak)) void esp_clk_init(void) diff --git a/components/spi_flash/test_apps/flash_encryption/sdkconfig.ci.xip_psram b/components/spi_flash/test_apps/flash_encryption/sdkconfig.ci.xip_psram index f0341170088..3a8a55bdbf5 100644 --- a/components/spi_flash/test_apps/flash_encryption/sdkconfig.ci.xip_psram +++ b/components/spi_flash/test_apps/flash_encryption/sdkconfig.ci.xip_psram @@ -2,10 +2,7 @@ # Places .ext_ram.bss in external PSRAM so a boot-time CPU frequency switch # under PSRAM-XIP can be exercised; without the fix the external .bss is # corrupted during boot. -# On esp32p4, CONFIG_CACHE_L2_CACHE_LINE_128B is required to reproduce. -CONFIG_CACHE_L2_CACHE_LINE_128B=y CONFIG_SPIRAM=y CONFIG_SPIRAM_BOOT_INIT=y CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y -CONFIG_SPIRAM_SPEED_250M=y CONFIG_SPIRAM_XIP_FROM_PSRAM=y diff --git a/components/spi_flash/test_apps/flash_encryption/sdkconfig.ci.xip_psram.esp32p4 b/components/spi_flash/test_apps/flash_encryption/sdkconfig.ci.xip_psram.esp32p4 new file mode 100644 index 00000000000..9297379f35e --- /dev/null +++ b/components/spi_flash/test_apps/flash_encryption/sdkconfig.ci.xip_psram.esp32p4 @@ -0,0 +1,3 @@ +# On esp32p4, CONFIG_CACHE_L2_CACHE_LINE_128B is required to reproduce IDF-15875. +CONFIG_CACHE_L2_CACHE_LINE_128B=y +CONFIG_SPIRAM_SPEED_250M=y