AnsweredAssumed Answered

SOS:Why the main function will automatically cycle three times??

Question asked by lee.nate.001 on Apr 20, 2017
Latest reply on Apr 21, 2017 by lee.nate.001

To who may help:

    I am a beginer with stm32. Today, I have some promble with my board(stm32f407xx): the main fuction will automatically cycle three times. codes are follow:

#include "stm32f4xx.h"

int main(void)

   /* this function just do some init work for uart1 */


   /* printf already redirect to UART1 */
   return 0;

    the result from Serial debugging assistant:

        My friend told me I should add while(1) at the end of code. But I have write some test code without while(1) before, and it work well. It is really puzzled me. Why?Why?Why?  By the way, I use Keil MDK5 to build my code. hope someone can help me.