forked from espressif/arduino-esp32
fix psram init
This commit is contained in:
@ -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
|
||||
|
@ -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!");
|
||||
|
Reference in New Issue
Block a user