cancel
Showing results for 
Search instead for 
Did you mean: 

a low-price micro STM32 to read .mp3 file from SD Card ?

MBertocchi
Associate II

Hello friends,
I write this post to ask for a hand in choosing a low -price micro stm32 that can read an .mp3 file from an SD card. The customer wants a really low cost and therefore I cannot go to use microcontroller with 100 pins, but I have to use a really cheap micro that gives me the opportunity to read a .mp3 file from SD. I ask for your willingness to help me!

14 REPLIES 14
Andrew Neil
Evangelist III

Just read it?

Just reading files from SD Cards can be done (and has been widely done) on simple 8-bit microcontrollers - so (pretty much) any STM32 will be able to do it.

At minimum, all you need is an SPI port.

http://elm-chan.org/fsw/ff/

 

thank you friend, take a look at what you forwarded me

QSHAO.1
ST Employee

If a SPI port is not enough for your application, you may need a SDIO interface on your STM32.  Anyway, you may install App STM32 Finder from STM32-FINDER - STM32 product finder for mobile devices - STMicroelectronics, and select right MCU for your application.

Ozone
Lead

As pointed out, reading a file (.mp3 or otherwise) is pretty pointless as such.
More important is, what you want to do with it.
The request suggests you need a MCU capable of decoding MP3, and feeding it to an audio amp.
I'm not sure if small and cheap 8-bit MCUs would suffice for this use case.

OTOH, I haven't dealt with MP3 encoding/decoding yet.
You might need to experiment with M0/M0+/M3 cores to check your performance requirements.
File reading (SPI/SDIO) and serial audio data output (SPI, I2S) are relatively light on pin count, you can get away with small packages.
You only need to make sure every interface you need is routed to the available pins, and all interfaces are routable simultaneously.

The "MCU Finder" is also available for Windows/Mac/Linux:

https://www.st.com/en/development-tools/st-mcu-finder-pc.html

What is the SDIO port used for?

FATFS is already present as "middleware and Softwrae Packs" of the microcontroller I chose "STM32G431KBU6" CAN IT WORK OR DO I HAVE TO USE THE EXTERNAL LIBRARIES YOU SAID?. Do you know how I have to configure the SPI1: Full-Duplex Master is ok?

MBertocchi_1-1730291028848.png

 

MBertocchi_0-1730291004570.png

 

can you tell me exactly if I should use SPI or SDIO? I chose the µ STM32G431KBU6 which reads the .mp3 file and translates it into a DAC value with low precision


@MBertocchi wrote:

CAN IT WORK OR DO I HAVE TO USE THE EXTERNAL LIBRARIES YOU SAID?.


You can use either.

ISTR it's been reported that the version in Cube is rather out-of-date ?