Code: Select all
#include <Arduino.h>
byte PSRAMFlag=0;
void setup() {
Serial.begin(115200);
// Initialize PSRAM
if (!psramInit()) {
Serial.println("PSRAM initialization failed!");
PSRAMFlag=0;
}
else {
PSRAMFlag=1;
}
if (PSRAMFlag){
// Check PSRAM size
size_t psramSize = ESP.getPsramSize();
Serial.print("Total PSRAM: ");
Serial.print(psramSize);
Serial.println(" bytes");
size_t freePsram = ESP.getFreePsram();
Serial.print("Free PSRAM: ");
Serial.print(freePsram);
Serial.println(" bytes");
}
}
void loop() {
}
I'm not sure where to go from here.
Should there be some other code to setup the PSRAM for use with the ESP32 WROOM?
Should the CS and SCK pins be explicitly assigned/initialised somewhere?
Any advice appreciated...