cancel
Showing results for 
Search instead for 
Did you mean: 

startup_stm32f4xx.s VS startup_stm32f4xx.c

dbilancione
Associate II
Posted on July 20, 2013 at 02:53

Hello everybody.

I am trying to implement the Audio_playback_and_record project from the STM32F4-DISCOVERY board on CoIDE. I have managed to do so but the only way it would work is by flashing the processor using MDK_Keil first, then flash it again with CoFLASH. Whenever I reset the board, it still works; however, when I unplug the board then plug it back I cannot hear any sound. The Audio Codec gets initiated but it seems like it can fetch the audio file from the internal flash.

My question is: is there something that startup_stm32f4xx.s (from MDK-Keil) does that startup_stm32f4xx.c (CoIDE) does not do?

Thank you in advance for you replies!

#stm32f4-discovery #stm32f4discovery-audio-codec
This discussion is locked. Please start a new topic to ask your question.
4 REPLIES 4
Posted on July 20, 2013 at 14:06

My question is: is there something that startup_stm32f4xx.s (from MDK-Keil) does that startup_stm32f4xx.c (CoIDE) does not do?

Probably not much, you could surely inspect both? In Keil it basically calls SystemInit() (in system_stm32f4xx.c) to set up the clocks and some hardware, initializes the C runtine/statics and calls main() via __main

If you have a problem, then start by looking at the clocks and PLL settings, and whether peripheral clocks have been properly enabled. You could dump out some critical registers and compare/contrast a function vs non-function system.

If the problem lies with CooCox, there is always their forum.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
stm32forum
Associate II
Posted on July 20, 2013 at 14:22

There's a problem in Coide that it won't download the flash correctly on a F4.

Here's a patch you can try

http://www.coocox.org/Tools/CoIDE-1.7.3.2-Patch-For-1.7.3.exe

dbilancione
Associate II
Posted on July 20, 2013 at 15:08

hey clive. I did inspect both and they do the same stuff. I retrieved the clock settings and printed on screen via the serial port and are identical. On the CooCox forum they suggested me to have

DMA_InitTypeDef DMA_InitStructure;

globally defined as, for some reason, the MCU get stuck in the DMA IRQHandler. I had it globally defined like so

static DMA_InitTypeDef DMA_InitStructure;

I have changed like above but still nothing. I am not using any optimization. What is baffling me is that it works but only after having flashed the MCU via MDK-Keil and then CoFLASH (keeping the MCU plugged in).

as always, thank you for your tips!

dbilancione
Associate II
Posted on July 20, 2013 at 15:10

hey edje. I am running CoIDE 1.7.4 - I would thought the patch for the 1.7.3 would have been included into the new version. I tried with 1.7.4 but it does not work.

Unistalled that, installed the 1.7.3 version again and tried the patch you've suggested but nothing.

thank you!

Announcement

We’re moving the ST Community to a new platform to give you a better and more reliable community experience.