PSRAM Not Detected on ESP32-S3-N16R8 with Arduino IDE

I'm using the ESP32-S3-N16R8 with Arduino IDE, and I'm trying to enable PSRAM for my project. I’ve enabled the PSRAM (QSPI PSRAM) and set the flash size to 8MB (64MB) in the Arduino IDE settings.

Here’s the code I flashed to check the PSRAM availability:

void setup() {
Serial.begin(115200);
delay(1000);

if (psramFound()) {
Serial.println(":white_check_mark: PSRAM is available and working!");
Serial.print("Total PSRAM: ");
Serial.println(ESP.getPsramSize());
Serial.print("Free PSRAM: ");
Serial.println(ESP.getFreePsram());
} else {
Serial.println(":cross_mark: PSRAM not detected or not working.");
}
}

void loop() {
}

However, when I run the code, I get the following output:

E (90) quad_psram: PSRAM ID read error: 0x00ffffff, PSRAM chip not found or not supported, or wrong PSRAM line mode
:cross_mark: PSRAM not detected or not working.

Could someone please help me with enabling PSRAM on the ESP32-S3-N16R8? I have checked the PSRAM setting and flash size (8MB) and tried reflashing the code, but the issue persists.

Try psramInit() at first. Then the bool variable spiramDetected is set to true and psramFound() returns spiramDetected, e.g. true.

16MB would fit better.
What board you have selected?

I’m using the Arduino IDE for that. What can I configure?

Configure what?
board or code?

Both those setings are wrong!
For PSRAM, select OPI PSRAM
For Flash size select 16MB
For Flash Mode select QIO 80