Fix PSRAM on S2

This commit is contained in:
me-no-dev
2020-11-17 01:13:23 +02:00
parent e0f8b845fb
commit cbafe67ee1

View File

@ -51,6 +51,11 @@ bool psramInit(){
log_w("PSRAM not supported!");
return false;
}
#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!");
@ -61,11 +66,6 @@ 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!");