Page 1 of 1

PSRAM not working even after sdkconfig has it on!

Posted: Thu Jan 30, 2025 8:00 pm
by themindfactory
In VSCODE I select PSRAM enabled and also chosen MALLOC_CAP_SPIRAM so ps_malloc must be used.

psramInit() fails.

when I right click on the function name and select GOTO DEFINITION it shows me this function!

bool psramInit() {
return false;
}

a hard coded fail... when I look into it further up in the file a few lines it due to the fact that
neither conditions are met #if CONFIG_SPIRAM_SUPPORT || CONFIG_SPIRAM

when they are clearly selected SDK Config Editor, I click SAVE and clean build and compile and the same thing.

Anyone experience this?

Re: PSRAM not working even after sdkconfig has it on!

Posted: Thu Jan 30, 2025 8:15 pm
by themindfactory
Also to note:

And this is even after configuring SPIRAM enabled at boot.

Even though Serial.println(heap_caps_get_largest_free_block(MALLOC_CAP_SPIRAM)); reports 4M

on the first call to ps_malloc(x) it will return NULL!

Richard.

Re: PSRAM not working even after sdkconfig has it on!

Posted: Thu Jan 30, 2025 9:40 pm
by MicroController
Have you tried heap_caps_malloc(...)?

Re: PSRAM not working even after sdkconfig has it on!

Posted: Thu Jan 30, 2025 10:12 pm
by themindfactory
Yes, and same result.

Fact is the initPSRAM() is returning FALSE... so until it returns TRUE I think they will all not work :-)

R.

Re: PSRAM not working even after sdkconfig has it on!

Posted: Thu Jan 30, 2025 11:37 pm
by nopnop2002
For ESP32S3, you may need to specify the mode.

Re: PSRAM not working even after sdkconfig has it on!

Posted: Fri Jan 31, 2025 12:31 am
by themindfactory
I am using VSCODE but the setting are almost the same :-)