2013-07-19 05:53 PM
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-codec2013-07-20 05:06 AM
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.2013-07-20 05:22 AM
There's a problem in Coide that it won't download the flash correctly on a F4.
Here's a patch you can tryhttp://www.coocox.org/Tools/CoIDE-1.7.3.2-Patch-For-1.7.3.exe
2013-07-20 06:08 AM
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 sostatic 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!2013-07-20 06:10 AM
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!