cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 strange flashing process

Tim Baures
Associate
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
1 ACCEPTED SOLUTION

Accepted Solutions
Tim Baures
Associate
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...)

View solution in original post

3 REPLIES 3
Nesrine M_O
Lead II
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-

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
Up vote any posts that you find helpful, it shows what's working..
Tim Baures
Associate
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...)