PSRAM not working even after sdkconfig has it on!

themindfactory
Posts: 79
Joined: Mon Mar 26, 2018 7:57 pm

PSRAM not working even after sdkconfig has it on!

Postby themindfactory » Thu Jan 30, 2025 8:00 pm

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?
Attachments
spi.png
spi.png (40.65 KiB) Viewed 1886 times
Last edited by themindfactory on Thu Jan 30, 2025 8:15 pm, edited 1 time in total.

themindfactory
Posts: 79
Joined: Mon Mar 26, 2018 7:57 pm

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

Postby themindfactory » Thu Jan 30, 2025 8:15 pm

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.

MicroController
Posts: 2661
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

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

Postby MicroController » Thu Jan 30, 2025 9:40 pm

Have you tried heap_caps_malloc(...)?

themindfactory
Posts: 79
Joined: Mon Mar 26, 2018 7:57 pm

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

Postby themindfactory » Thu Jan 30, 2025 10:12 pm

Yes, and same result.

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

R.

nopnop2002
Posts: 347
Joined: Thu Oct 03, 2019 10:52 pm
Contact:

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

Postby nopnop2002 » Thu Jan 30, 2025 11:37 pm

For ESP32S3, you may need to specify the mode.
Attachments
psram-esp32s3.jpg
psram-esp32s3.jpg (145.93 KiB) Viewed 1766 times

themindfactory
Posts: 79
Joined: Mon Mar 26, 2018 7:57 pm

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

Postby themindfactory » Fri Jan 31, 2025 12:31 am

I am using VSCODE but the setting are almost the same :-)

Who is online

Users browsing this forum: Baidu [Spider] and 7 guests