I have soldered a STM32F103VF chip (LQFP100) on a breakout board, which I want to connect to via my ST-Link (clone). However, ST-Util (and STM32CubeProgrammer) cannot connect to the chip.

MCU Datasheet: https://www.st.com/resource/en/datasheet/stm32f103vf.pdf

Picture of the setup:




I've made the following connections:

  • VDD_1, VDD_2, VDD_3, VDD_4, VDD_5 to 3.3V
  • VSS_1, VSS_2, VSS_3, VSS_4, VSS_5 to GND
  • VDDA to 3.3V
  • VSSA to GND
  • VREF+ to 3.3V
  • VREF- to GND
  • BOOT0 via 4.7kOhm resistor to either 3.3V or GND (see bottom)
  • PB2 (BOOT1) to GND
  • NRST, PA13 (SWDIO), PA14 (SWCLK) to the ST-Link programmer
  • two 100µF 16V electrolytic capacitors between GND and 3.3V
  • one 2.2nF ceramic capacitor between GND and 3.3V
  • 3.3V and GND are supplied by bench power supply, GND is shared with ST-Link

Schematic diagram: schematic

No matter what setting in ST-Util or STM32CubeProgrammer I try regarding reset mode (Software / Hardware / Core) or frequency, having NRST disconnected or connected, it only says

01:50:32 : Error: No STM32 target found!

Observataions and notes:

  • when BOOT0 is LOW (aka "run firmware") and a reset is performed (NRST touches GND for a second), the current draw is 2mA
  • when BOOT0 is HIGH (aka "run internal bootlaoder") and a reset is performed, current draw jumps to 12mA
  • when NRST is connect to GND, current draw is ~1mA
  • datasheet table 18 says supply current in run mode on HSI 16MHz, all peripherals enabled, is 12.2mA
  • however, per bootloader document, when the bootloader is active, RCC is set to HSI+PLL to 24MHz, equating to 18.9mA (all peripherals enabled) or 11.6mA (all peripherals disabled)
  • oscillator pins (for HSE and LSE) have been left floating, they also shouldn't be necessary
  • chip has not been programmed before by me, comes from RS-Online retailer
  • I checked that 3.3V reaches all VDD pins on the chip, directly on the top side of the pin on the package
  • I checked for shorts after soldering the chip on the breakout board and removed them all before hooking it up (my soldering of that LQFP100 did not go very smoothly.. removing bridges took a dozen attempts with soldering braid)
  • The ST-Link clone has worked absolutely fine in the past, connecting to STM32, STM8 and GD32 chips
  • attempting to connect when the chip was reset with BOOT0 = HIGH or LOW does not make difference, both fail

I'm out of ideas on why I can't connect to the chip via SWD, and also why the current consumption is so low in "run firmware" mode. With nothing programmed, the chip should encounter an invalid instruction pretty soon, hardfault and be stuck in a loop, but consumption does not show that :/.

  • 1
    \$\begingroup\$ Can you draw a real diagram of your connections? It's much easier for the reader, and frankly, probably your best first debugging step. \$\endgroup\$ Jul 23, 2021 at 0:42
  • \$\begingroup\$ I've drawn my connections in EasyEDA and linked the schematic above. \$\endgroup\$ Jul 23, 2021 at 1:03
  • 1
    \$\begingroup\$ Alrigh something is wrong with the SWD connections. When booting the chip into bootlaoder mode and connecting a USB-UART adapter to the bootloader pins (PA10 / PA9), the connection IS SUCCESSFULL. imgur.com/a/8jGHbxe \$\endgroup\$ Jul 23, 2021 at 1:18

1 Answer 1


Mystery is solved.

I did not connect the SWDIO pin PA13 to the ST-Link, but, because I plugged it into the wrong pin on the breakout board, I was connecting it to PA12, some unrelated GPIO pin.

Once that single wrong connection is fixed, the connection works immediately.


What got me onto this path is that per comments, I was able to connect to the chip via the UART bootloader, so the chip was not dead as I thought.

Lesson of the day: Always tripple check your connections.

Also it shows that above schematic works, if properly connected.

Still thanks for the help and nudge to check connections again.

  • \$\begingroup\$ Thanks for taking the time to come back and post an answer! You can accept your own answer, too, if you are so inclined... \$\endgroup\$
    – bitsmack
    Jul 23, 2021 at 2:28
  • \$\begingroup\$ In 2 days I can, says SO :) \$\endgroup\$ Jul 23, 2021 at 2:28
  • \$\begingroup\$ Ah, yes. I had forgotten :) \$\endgroup\$
    – bitsmack
    Jul 23, 2021 at 2:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.