Skip to main content
Tim Baures
Associate
May 19, 2017 3:25 PM UTC
Solved

STM32 strange flashing process

Posted on May 19, 2017 at 17:25

Hi!

When I flash a .hex or .bin file with a ST-LINK V2 device on my STM32F4 microcontroller (with ST-LINK utility), the program only works if both the ST-LINK V2 and my MCU board stay connected to the computer (through a USB cable). Whenever I unplug one of them the program just flashed on the board does not run anymore.

Does anyone have any idea of what is happening ?

Thanks for your help!

#st-link #flash-stm32 #st-link-utility
This topic has been closed for replies.
Tim Baures
Tim BauresBest answer
Associate
May 22, 2017 11:46 AM UTC
Posted on May 22, 2017 at 13:46

Thank you both of you but I managed to solve the problem.

It was actually due to the ST-Link device that was still plug to the MCU board and keeping it from running the program (even though it wasn't plug to the computer and not powered on...)

3 replies

Nesrine M_O
Associate
May 19, 2017 3:45 PM UTC
Posted on May 19, 2017 at 17:45

Hi

baures.tim

,

  1. where your code is located? may be the flashed .bin and .hex are located in RAM!
  2. Pl

    ease refer tothis application note to verifyyour hardware implementation:

    http://www.st.com/content/ccc/resource/technical/document/application_note/76/f9/c8/10/8a/33/4b/f0/DM001157pdf/files/DM001157pdf/jcr:content/translations/en.DM001157pdf

-Nesrine-

Tesla DeLorean
Guru
May 19, 2017 6:07 PM UTC
Posted on May 19, 2017 at 20:07

Does your design pull BOOT0 Low?

Do you initialize all the clocks and pins your application needs? Debugger gets chip in a viable state for it's own needs.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Tim Baures
Tim BauresAuthorBest answer
Associate
May 22, 2017 11:46 AM UTC
Posted on May 22, 2017 at 13:46

Thank you both of you but I managed to solve the problem.

It was actually due to the ST-Link device that was still plug to the MCU board and keeping it from running the program (even though it wasn't plug to the computer and not powered on...)