Getting stlink error while flashing

Post Reply
Posts: 64
Joined: Sun Feb 19, 2017 8:41 am

Getting stlink error while flashing

Post by dev » Wed Aug 09, 2017 2:40 pm

I use STM32 ST-LINK Utility for flashing stm32f103xxx.
Till yesterday it was working like charm but now it is not at all working. I did usual stuff only. flashed small code for i2c scanner.
But now it is giving error while flashing.
I have attached screenshot.
Capture.JPG (32.46 KiB) Viewed 182 times

Posts: 1821
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Getting stlink error while flashing

Post by stevestrong » Wed Aug 09, 2017 2:51 pm

You may have used PB3/PB4 in your code as GPIO pins, and used

Code: Select all

You can use STlink probe only when you don't use PB3/4 in your code.

You upload via USB DFU a code in which you remove the above mentioned function, or specify:

Code: Select all

This will turn on the SWD capability.

User avatar
Posts: 7474
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia

Re: Getting stlink error while flashing

Post by RogerClark » Wed Aug 09, 2017 9:26 pm

It doesn't normally connect at all if the debug pins are disabled

But if they are disabled, use Connect Under Reset

It could be the MCU os defective

Post Reply