1
\$\begingroup\$

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.

\$\endgroup\$
3
  • \$\begingroup\$ so, without knowing your board, the way it's powered, and what your program does, and whether the same applies to e.g. a simpler program, how are we supposed to guess? \$\endgroup\$ Jul 13, 2017 at 9:12
  • \$\begingroup\$ the board is stm32F407VG, it is powered by a USB type B port, 2.9V, the debug was with an SWD port on connect under reset mode, it dosen't matter what the program do because it is working on another target with the same type that is mean on another STM32F407VG \$\endgroup\$ Jul 13, 2017 at 9:36
  • 1
    \$\begingroup\$ well, then find the difference between the board you're looking at now and the one that works. Something we can't help you with, I'm afraid. Also, yes, the firmware does matter, assuming it interacts with the hardware. \$\endgroup\$ Jul 13, 2017 at 9:46

2 Answers 2

3
\$\begingroup\$

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)
\$\endgroup\$
0
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.