SD-Card reading stutttering from WAV file ... SD_MODE_SPI

ritsch@algo.mur.at
Posts: 9
Joined: Tue Feb 25, 2020 4:57 pm

SD-Card reading stutttering from WAV file ... SD_MODE_SPI

Postby ritsch@algo.mur.at » Sat Oct 07, 2023 8:38 am

Hello,

On an Lyrat V4.3 like board, Olimex ESP-ADF, I tried playing wav file with the 'pipeline_equalizer' example.c. using IDF-5.1.1 and latest ESP-ADF library (installed by PlatformIO IDF extension) and default configuration.

The difference to LyraT SD-card uses SPI and other Pinout, so a did a custom board like described in the "play_mp3_control" example.

Code: Select all

audio_board_sdcard_init(set, SD_MODE_SPI);
When playing the stereo test WAV file as "/sdcard/test.wav" on a class 4 SD-card: the audio is stuttering, playing a mono file gives better results, but still not perfect.

and I get a warning on monitor:

Code: Select all

W (1664) AUDIO_THREAD: Make sure selected the `CONFIG_SPIRAM_BOOT_INIT` and `CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY` by `make menuconfig`
But I cannot find these settings in the menuconfig... and also cannot find in 'sdkconfig'.

Question is:
How can I configure these values and/or increase the SD card read speed ?

mfg winfried

pkme23
Posts: 3
Joined: Wed Jan 18, 2023 1:00 am

Re: SD-Card reading stutttering from WAV file ... SD_MODE_SPI

Postby pkme23 » Mon Oct 09, 2023 4:33 am

I have the same issue when trying to run any example in the ADF repo.

ritsch@algo.mur.at
Posts: 9
Joined: Tue Feb 25, 2020 4:57 pm

Re: SD-Card reading stutttering from WAV file ... SD_MODE_SPI

Postby ritsch@algo.mur.at » Tue Oct 10, 2023 6:11 am

Running the ESP32-audioI2S library example, everthing works fine:

https://github.com/schreibfaul1/ESP32-a ... P32_ES8388

So suspect some wrong settings of the environment like said by the warning.

mfg winfried

ritsch@algo.mur.at
Posts: 9
Joined: Tue Feb 25, 2020 4:57 pm

Re: SD-Card reading stutttering from WAV file ... SD_MODE_SPI

Postby ritsch@algo.mur.at » Thu Oct 19, 2023 1:41 pm

On the ESP32-ADF from Olimex the SPI Port for SD Card has GPIO12 as MISO, which has two issues:

a) GPIO12 is a strapping Pin, which means, resetting during a read can cause GPIO12 to stay High, choosing 1.8V flash voltage instead of 3.3V and reboot fails. Can be avoided by efusing this pin, so it is no strapping pin anymore:

- https://docs.espressif.com/projects/esp ... e-cmd.html

b) MISO needs a pull-up 20k, but it is not populated on the board, so it has to be internal set ?

But I am not sure about this, since I read SD card does it itself with Push/Pull mode.
Anybody knows if this is needed ?

mfg winfried

Who is online

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