Page 1 of 2
MP3 decoding with stm32
Posted: Mon Sep 21, 2020 11:33 am
by saeed144
Hi, Is there any library or way to decode mp3 with stm32f10vet6?
I know this micro has enough power to decode mp3 files but I don't know how!
Adafruit mp3 library does not support stm32
Please help
Re: MP3 decoding with stm32
Posted: Mon Sep 21, 2020 2:51 pm
by mrburnette
Re: MP3 decoding with stm32
Posted: Mon Sep 21, 2020 2:57 pm
by fpiSTM
Thanks
@mrburnette 
Re: MP3 decoding with stm32
Posted: Sat Sep 26, 2020 8:08 am
by saeed144
I saw that link, thanks but I want to use stm32f103 internal DAC to play mp3, they used MAX08357 module no description about internal DAC, Dose any one can help?
Re: MP3 decoding with stm32
Posted: Sat Sep 26, 2020 8:33 am
by stevestrong
Native MP3 decoder:
https://learn.adafruit.com/native-mp3-d ... on-arduino
https://github.com/adafruit/Adafruit_MP3
Adafruit uses SAMD51 chip but it should work on M3 / M4 Cortex core (like STM32F1 or STM32F4 family).
The first link indicated by Ray leads you to the adapted version for STM32:
http://stm32duinoforum.com/forum/viewto ... _3405.html
Code was developed by Victor for the libmaple core:
https://github.com/victorpv/Adafruit_MP3
Re: MP3 decoding with stm32
Posted: Sat Sep 26, 2020 8:45 am
by saeed144
I get the victorpv modified Adafruit_Mp3 for STM32f103 but still have error:
Code: Select all
C:\Users\lenovo\Documents\Arduino\libraries\Adafruit_MP3\src/mp3dec.h:75:2: error: #error No platform defined. See valid options in mp3dec.h
75 | #error No platform defined. See valid options in mp3dec.h
Re: MP3 decoding with stm32
Posted: Sat Sep 26, 2020 2:01 pm
by stevestrong
You have to be sure that you are using the Libmaple (Roger's) core.
Re: MP3 decoding with stm32
Posted: Sun Sep 27, 2020 5:52 am
by saeed144
You mean that does not work with stm32duino core ?
So sad

Re: MP3 decoding with stm32
Posted: Sun Sep 27, 2020 7:50 am
by stevestrong
Well, I don't know, but the error generated in line 75 is due to missing platform definition.
I think Frederic could tell us what kind of define should be instead:
in order to use the official core.
Re: MP3 decoding with stm32
Posted: Sun Sep 27, 2020 8:06 am
by fpiSTM
I need to check further but I guess a simple define will not be enough. The library uses a timer so it would require to add HardwareTimer part.