ESP-ADF with PSRAM results in choppy recording

JVKran
Posts: 18
Joined: Thu Mar 04, 2021 2:40 pm

ESP-ADF with PSRAM results in choppy recording

Postby JVKran » Sun Jun 06, 2021 9:40 am

Hi there!

First of all; I'm using ESP-IDF 4.2 with the ESP-ADF and have two CMM4030D microphones connected to an ESP32-WROVER-E on a custom board. These microphones should record a wav file to an SPI-Connected SD card.

And that works flawless! But not when PSRAM is enabled, should initialize on boot (which it does) and is allocatable using heap_caps_alloc(). The frequency of PSRAM, as wel as that of the SPI Flash, is set at 80MHz and there isn't anything connected to pins 16 and 17.

So, to conclude; when PSRAM is enabled (boots on startup and is allocatable using heap_caps_alloc), the recording is choppy, but when it's disabled (but still running the same code) it works fine... What on earth could be the cause of this issue?

Kind regards,

A confused Jochem

JVKran
Posts: 18
Joined: Thu Mar 04, 2021 2:40 pm

Re: ESP-ADF with PSRAM results in choppy recording

Postby JVKran » Wed Jun 09, 2021 5:43 pm

Small status-update. I've investigated a little further and found out that the example shows the same behaviour. Simply enabling PSRAM results in a choppy recording. Opened an issue on GitHub.

JVKran
Posts: 18
Joined: Thu Mar 04, 2021 2:40 pm

Re: ESP-ADF with PSRAM results in choppy recording

Postby JVKran » Sun Jun 13, 2021 10:07 am

I'm happy to announce that I've managed to implement a workaround. This workaround consists of initializing PSRAM after startup preventing the ESP-ADF to allocate buffers in PSRAM. More details can be found in the issue over at GitHub.

Who is online

Users browsing this forum: No registered users and 18 guests