mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-30 10:47:15 +02:00
Fix PSRAM on S2
This commit is contained in:
@ -51,6 +51,11 @@ bool psramInit(){
|
|||||||
log_w("PSRAM not supported!");
|
log_w("PSRAM not supported!");
|
||||||
return false;
|
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) {
|
if (esp_spiram_init() != ESP_OK) {
|
||||||
spiramFailed = true;
|
spiramFailed = true;
|
||||||
log_w("PSRAM init failed!");
|
log_w("PSRAM init failed!");
|
||||||
@ -61,11 +66,6 @@ bool psramInit(){
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
esp_spiram_init_cache();
|
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()) {
|
if (!esp_spiram_test()) {
|
||||||
spiramFailed = true;
|
spiramFailed = true;
|
||||||
log_e("PSRAM test failed!");
|
log_e("PSRAM test failed!");
|
||||||
|
Reference in New Issue
Block a user