Page 1 of 1

[SOLVED] Problem when using PSRAM

Posted: Thu Mar 25, 2021 7:49 am
by l.wuyts
Hello everyone,

I'm facing a problem when I try to use the PSRAM of an ESP32-WROVER-B.
I'm using the mp3 pipeline example in my own code.
Everything works fine when I disable SPI RAM in menuconfig, but when I enable it (with or without malloc support), my code fails when calling heap_caps_malloc in the adf code. When it does, the esp panic's and does a reset.

Does anyone have had the same problem and know a solution?
I'm stuck here as I'll need the extra RAM space to be able to run my application.

(I can't share my code, as it is for my company, but it works without PSRAM)

Kind regards
Laurens

Re: Problem when using PSRAM

Posted: Thu Mar 25, 2021 1:11 pm
by kentavr
Hi.

Have you tried "malloc()" function?

Manual says that: For most purposes, the standard libc malloc() and free() functions can be used for heap allocation without any special consideration.

Re: Problem when using PSRAM

Posted: Fri Mar 26, 2021 6:40 am
by l.wuyts
Hello,

I have not changed any code, because this was code in the adf components from Espressif themselves.

Kind regards
Laurens

Re: Problem when using PSRAM

Posted: Fri Mar 26, 2021 9:20 am
by ESP_Sprite
Hard to say. Does your backtrace indicates why the crash is? Also, are you 100% sure you don't reconfigure the pins the PSRAM is connected to? (Especially GPIO16/17).

Re: Problem when using PSRAM

Posted: Fri Mar 26, 2021 9:32 am
by l.wuyts
Thank you very much! I checked my code for a usage of GPIO 16/17, and I found that from some previous project, a uart was configured on these pins. :oops:

The problem is now fixed, thanks again!