cancel
Showing results for 
Search instead for 
Did you mean: 

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

JBond.1
Senior

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

3 REPLIES 3

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?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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?

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..