Skip to main content
Visitor II
May 19, 2017
Solved

STM32 strange flashing process

  • May 19, 2017
  • 3 replies
  • 1140 views
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.
    Best answer by Tim Baures
    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

    Visitor II
    May 19, 2017
    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-

    Graduate II
    May 19, 2017
    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.

    Tim BauresAuthorAnswer
    Visitor II
    May 22, 2017
    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...)