2024-10-29 02:54 AM - last edited on 2024-10-30 05:37 AM by Andrew Neil
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!
2024-10-29 03:08 AM
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.
2024-10-29 03:14 AM
thank you friend, take a look at what you forwarded me
2024-10-30 12:45 AM
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.
2024-10-30 01:10 AM
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.
2024-10-30 01:16 AM - edited 2024-10-30 01:44 AM
The "MCU Finder" is also available for Windows/Mac/Linux:
https://www.st.com/en/development-tools/st-mcu-finder-pc.html
2024-10-30 05:19 AM
What is the SDIO port used for?
2024-10-30 05:23 AM
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?
2024-10-30 05:26 AM
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
2024-10-30 05:32 AM - edited 2024-10-30 05:36 AM
@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 ?