cancel
Showing results for 
Search instead for 
Did you mean: 

[HELP]STM32F4-DISCOVERY with MP3 Player

dree86
Associate II
Posted on March 02, 2016 at 08:02

Hei there

Is there any working mp3 player using this eval board ?

Right now I try helix mp3 decoder but cannot compile using keil v4.

There are some error on assembly.h i cannot understand.

Please guide me thanks.

#mp3-stm32f4 #mp3-player
16 REPLIES 16
Radosław
Senior II
Posted on March 07, 2016 at 12:53

wrong memory map in linker script.

dree86
Associate II
Posted on March 08, 2016 at 05:30

Hellow dembek

thank for your reply. I never change linker script it still same by default except --fpu part but it didn't affect anything.

-cpu Cortex-M4.fp *.o 
--entry Reset_Handler --first __Vectors --strict 
--fpu=vfpv4_d16 --summary_stderr --info summarysizes --map --xref --callgraph --symbols 
--info sizes --info totals --info unused --info veneers 
--list ''.\MP3Player.map'' 
-o MP3Player.axf 

I am also looking mapping file and it seem normal. Maybe there are something that i don't know about.
Posted on March 08, 2016 at 17:10

Maybe there are something that i don't know about.

The linker script (GUI or Scatter File) needs to describe the FLASH as being at 0x08000000, not ZERO or 0x8000

The flashing software says it can't write at 0x8000, because there is no flash memory there. Reflect on what the errors tell you.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
dree86
Associate II
Posted on March 10, 2016 at 02:48

Yup its working now. But still cannot play the mp3 lol.

Thank you all for guiding me step by step :)

dree86
Associate II
Posted on March 10, 2016 at 09:10

Now I face debug problem on keil. It said cannot access memory.

I trace and it stuck in startupxxxx.asm

Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT __main
IMPORT SystemInit 
LDR R0, =SystemInit
BLX R0
LDR R0, =__main
BX R0 ; 

got stuck here it goes to hard fault

handler
ENDP

I try to lower debug frequency but still nothing.
lucas239955
Associate
Posted on September 04, 2016 at 15:12

Hello,

my compilation is successful. But you can not hear the music. Check where the errors are.

________________

Attachments :

mp3sample20120318-chiny.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I06a&d=%2Fa%2F0X0000000bTU%2F3EPNVxx6qKtVulMJykcMwsnFhEbaXhAF3PC7P5jZqQs&asPdf=false
Posted on September 04, 2016 at 15:30

Not sure there are a wealth of people here to review the code. Would suggest two courses of action, a) write the decoded PCM data into a file, or .WAV file, and confirm the audio signal is present, and b) prove that a sine-wave data sample generates the frequency output expected on the audio channel(s). Instrument the decode process to confirm it is working, like the PCM data is 10x bigger than the input MP3 @ 128kbps for example.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..