Skip to content

Commit 78783c5

Browse files
committed
fix psram init
1 parent 1bb7abe commit 78783c5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

boards.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3376,6 +3376,7 @@ m5stack-core2.upload.tool=esptool_py
33763376
m5stack-core2.upload.maximum_size=6553600
33773377
m5stack-core2.upload.maximum_data_size=4521984
33783378
m5stack-core2.upload.wait_for_upload_port=true
3379+
m5stack-core2.upload.flags=
33793380

33803381
m5stack-core2.serial.disableDTR=true
33813382
m5stack-core2.serial.disableRTS=true

cores/esp32/esp32-hal-psram.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ bool psramInit(){
5151
log_w("PSRAM not supported!");
5252
return false;
5353
}
54-
esp_spiram_init_cache();
55-
#elif CONFIG_IDF_TARGET_ESP32S2
56-
extern void esp_config_data_cache_mode(void);
57-
esp_config_data_cache_mode();
58-
Cache_Enable_DCache(0);
59-
#endif
6054
if (esp_spiram_init() != ESP_OK) {
6155
spiramFailed = true;
6256
log_w("PSRAM init failed!");
@@ -67,6 +61,11 @@ bool psramInit(){
6761
return false;
6862
}
6963
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
7069
if (!esp_spiram_test()) {
7170
spiramFailed = true;
7271
log_e("PSRAM test failed!");

0 commit comments

Comments
 (0)