fix psram init

This commit is contained in:
me-no-dev
2020-11-06 12:20:20 +02:00
parent 1bb7abe271
commit 78783c5183
2 changed files with 6 additions and 6 deletions

View File

@ -3376,6 +3376,7 @@ m5stack-core2.upload.tool=esptool_py
m5stack-core2.upload.maximum_size=6553600
m5stack-core2.upload.maximum_data_size=4521984
m5stack-core2.upload.wait_for_upload_port=true
m5stack-core2.upload.flags=
m5stack-core2.serial.disableDTR=true
m5stack-core2.serial.disableRTS=true

View File

@ -51,12 +51,6 @@ bool psramInit(){
log_w("PSRAM not supported!");
return false;
}
esp_spiram_init_cache();
#elif CONFIG_IDF_TARGET_ESP32S2
extern void esp_config_data_cache_mode(void);
esp_config_data_cache_mode();
Cache_Enable_DCache(0);
#endif
if (esp_spiram_init() != ESP_OK) {
spiramFailed = true;
log_w("PSRAM init failed!");
@ -67,6 +61,11 @@ bool psramInit(){
return false;
}
esp_spiram_init_cache();
#elif CONFIG_IDF_TARGET_ESP32S2
extern void esp_config_data_cache_mode(void);
esp_config_data_cache_mode();
Cache_Enable_DCache(0);
#endif
if (!esp_spiram_test()) {
spiramFailed = true;
log_e("PSRAM test failed!");