Skip to content

Commit cbafe67

Browse files
committed
Fix PSRAM on S2
1 parent e0f8b84 commit cbafe67

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cores/esp32/esp32-hal-psram.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ bool psramInit(){
5151
log_w("PSRAM not supported!");
5252
return false;
5353
}
54+
#elif CONFIG_IDF_TARGET_ESP32S2
55+
extern void esp_config_data_cache_mode(void);
56+
esp_config_data_cache_mode();
57+
Cache_Enable_DCache(0);
58+
#endif
5459
if (esp_spiram_init() != ESP_OK) {
5560
spiramFailed = true;
5661
log_w("PSRAM init failed!");
@@ -61,11 +66,6 @@ bool psramInit(){
6166
return false;
6267
}
6368
esp_spiram_init_cache();
64-
#elif CONFIG_IDF_TARGET_ESP32S2
65-
extern void esp_config_data_cache_mode(void);
66-
esp_config_data_cache_mode();
67-
Cache_Enable_DCache(0);
68-
#endif
6969
if (!esp_spiram_test()) {
7070
spiramFailed = true;
7171
log_e("PSRAM test failed!");

0 commit comments

Comments
 (0)