File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
components/esp_hw_support Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -519,6 +519,12 @@ static int s_cache_suspend_cnt = 0;
519519static void IRAM_ATTR suspend_cache (void ) {
520520 s_cache_suspend_cnt ++ ;
521521 if (s_cache_suspend_cnt == 1 ) {
522+ #if CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION && CONFIG_IDF_TARGET_ESP32P4
523+ // The implementation of P4 L2 cache suspend is to shut down MSPI AXI instead of shutting down Cache BUS.
524+ // If the access to external memory hits in the cache, it will not trigger a cache error. So in order to
525+ // fully check the access to external memory, writeback & invalidate is needed here.
526+ Cache_WriteBack_Invalidate_All (CACHE_MAP_MASK );
527+ #endif
522528 spi_flash_disable_cache (esp_cpu_get_core_id (), NULL );
523529 }
524530}
You can’t perform that action at this time.
0 commit comments