AnsweredAssumed Answered

STM32F4 Discovery UART works fine in debug mode but not without debug mode

Question asked by arlen on Oct 1, 2014
Latest reply on Oct 1, 2014 by arlen
Hi everybody, currently I'm working on STM32F4 discovery using Keil software, I'm implementing USART transmission at 9600 of baudrate.

I've defined USE_STDPERIPH_DRIVER and HSE_VALUE=8000000 using the toolchain and it's works well , the baudrate is 9600, but when I exit the debug mode and press the reset button the STM32F4 transmit with a higher baudrate (100kbps).
the pictures below are some screenshot of the options window

also i've added a code in stm32f4xx_conf.h

#if defined  (HSE_VALUE)
/* Redefine the HSE value; it's equal to 8 MHz on the STM32F4-DISCOVERY Kit */
 #undef HSE_VALUE
 #define HSE_VALUE    ((uint32_t)8000000)
#endif /* HSE_VALUE */
and i've removed the HSE_VALUE=8000000, and it works fine in debug mode but this still does not work without debug mode.

I hope someone can help me