Page 1 of 1

Music Data From SPI Instead of SD Card

Posted: Thu Jan 23, 2025 11:49 am
by hamzatamer76
Hello,

in ADF there is example for playing music from sd card. But I want to play music from spi peripheral. ESP32 will be slave microcontroller STM32 will be Master. STM32 will transmit mp3 data via SPI. So;
This is for sd card example
[sdcard]-->fatfs_stream-->mp3_decoder-->resample-->i2s_stream-->[codec_chip]

I want to do this
[STM32]-->spi_reader-->mp3_decoder-->i2s_stream-->[codec_chip]
Is there helpful example in ADF or IDF for my project. How can i do this.
Thank you

Re: Music Data From SPI Instead of SD Card

Posted: Sat Jan 25, 2025 4:36 pm
by nopnop2002
Here is the official SPI SLAVE sample.

However, I don't know if it can communicate correctly with the STM32 SPI Master.

https://github.com/espressif/esp-idf/tr ... /spi_slave

[STM32]--SPI->[ESP32]-->mp3_decoder-->i2s_stream-->[codec_chip]