MP3 decoding with stm32

Post here first, or if you can't find a relevant section!
saeed144
Posts: 36
Joined: Mon Sep 21, 2020 10:11 am

MP3 decoding with stm32

Post 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
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: MP3 decoding with stm32

Post by mrburnette »

User avatar
fpiSTM
Posts: 1746
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: MP3 decoding with stm32

Post by fpiSTM »

Thanks @mrburnette ;)
saeed144
Posts: 36
Joined: Mon Sep 21, 2020 10:11 am

Re: MP3 decoding with stm32

Post 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?
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: MP3 decoding with stm32

Post 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
saeed144
Posts: 36
Joined: Mon Sep 21, 2020 10:11 am

Re: MP3 decoding with stm32

Post 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
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: MP3 decoding with stm32

Post by stevestrong »

You have to be sure that you are using the Libmaple (Roger's) core.
saeed144
Posts: 36
Joined: Mon Sep 21, 2020 10:11 am

Re: MP3 decoding with stm32

Post by saeed144 »

You mean that does not work with stm32duino core ?
So sad :cry:
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: MP3 decoding with stm32

Post 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:

Code: Select all

#elif defined(__STM32F1__)
in order to use the official core.
Last edited by stevestrong on Sun Sep 27, 2020 9:22 am, edited 1 time in total.
User avatar
fpiSTM
Posts: 1746
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: MP3 decoding with stm32

Post 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.
Post Reply

Return to “General discussion”