I developed a program on STM32F4 using keil uV on windows 10, it works perfectly when the target is powered by the computer even after i stop the debugging. Normally after downloading the program in the flash memory it will run automatically when the target became powered by any source of energy. I can't figure why it doesn't work in my case.
When the chip does not start executing on power-on-reset it can have two causes:
- The chip starts in bootloader mode because the boot selection pins have the wrong voltage at powerup.
- Your program is not linked correctly. In other words, it's in the wrong part of flash. (this is unlikely when building from examples)
I also have your same error, I load the program for the MCU then the program runs. When I unplug the STlink V2 charging circuit then power it back up, the circuit doesn't work. Then I discovered that I use a USB to COM kit to debug the program. I unplug both the USB to COM and the STlink V2 charging circuit then power it back up, the circuit runs normally.