Skip to main content
Graduate
April 20, 2020
Question

STM32 ST-link utility: mcu restarts before flash and timeouts

  • April 20, 2020
  • 1 reply
  • 797 views

Hi, I am trying to flash my STM32F103 MCU but when I press START button MCU restarts and flashing timouts and fails. How do I disable MCU restart before flash? How do I flash it?

18:06:05 : ST-LINK SN : 0669FF484956827867191823
18:06:05 : V2J34M25
18:06:05 : Connected via SWD.
18:06:05 : SWD Frequency = 4,0 MHz.
18:06:05 : Connection mode : Normal.
18:06:05 : Device ID:0x410 
18:06:05 : Device flash Size : 128KBytes
18:06:05 : Device family :STM32F10xx Medium-density
18:06:12 : Timeout during flash programming
18:06:12 : Error occured during erase operation!
18:07:36 : Unable to run verification!
18:07:37 : Device memory program canceled

    This topic has been closed for replies.

    1 reply

    Graduate II
    April 20, 2020

    Is this some custom board?

    Double check power supplies, and if board has watchdog, or other external circuitry that might drive/impact NRST signal.

    Check NRST with a scope, is it being triggered when it fails as described?

    JBond.1Author
    Graduate
    April 20, 2020

    It was working before, after I tried to connect Reset pin to SWD it seems it does not work any more. Could it demage reset pi or enabled write protection or something?

    Graduate II
    April 20, 2020

    I'm afraid I don't know what changed between the time it worked and failed. Could you have damaged it? Well that's clearly one possibility.

    One thing you might try is pulling the BOOT0 pin high, and see if the behaviour changes.

    Other than that, check connectivity, check pin 1 for the ST-LINK is powered.