[SOLVED] Problem when using PSRAM

l.wuyts
Posts: 7
Joined: Wed Mar 24, 2021 12:48 pm

[SOLVED] Problem when using PSRAM

Postby l.wuyts » Thu Mar 25, 2021 7:49 am

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
Last edited by l.wuyts on Fri Mar 26, 2021 9:32 am, edited 2 times in total.

kentavr
Posts: 25
Joined: Fri Nov 08, 2019 2:39 pm

Re: Problem when using PSRAM

Postby kentavr » Thu Mar 25, 2021 1:11 pm

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.

l.wuyts
Posts: 7
Joined: Wed Mar 24, 2021 12:48 pm

Re: Problem when using PSRAM

Postby l.wuyts » Fri Mar 26, 2021 6:40 am

Hello,

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

Kind regards
Laurens

ESP_Sprite
Posts: 9772
Joined: Thu Nov 26, 2015 4:08 am

Re: Problem when using PSRAM

Postby ESP_Sprite » Fri Mar 26, 2021 9:20 am

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).

l.wuyts
Posts: 7
Joined: Wed Mar 24, 2021 12:48 pm

Re: Problem when using PSRAM

Postby l.wuyts » Fri Mar 26, 2021 9:32 am

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!

Who is online

Users browsing this forum: andy_wharton_uk and 81 guests