Skip to main content
Associate
August 23, 2025
Solved

Unable to connect to STM32F103TBU with ST-Link

  • August 23, 2025
  • 3 replies
  • 5076 views

Hello all, I have been working on a keyboard PCB with an STM32F103, and I have started trying to program it with the STM32duino bootloader however, I have been unable to connect to the chip. This is my first time using the STM32CubeProgrammer with an ST-Link V2. I have verified the voltage across several points in the PCB. I have previously used similar designs with STM32F07 chips and had no issues.

 

Most of the time, I get an error of "No STM32 Target found" and sometimes I get the error "ST-LINK error (DEV_TARGET_CMD_ERR)".

I have tried my best to look at past posts on the forum, but none of the solutions have fixed my issue. 

I am happy to provide extra measurements and provide more information. Tips on how to troubleshoot this are greatly appreciated. Thank you in advance!

 

Schematic and PCB screenshot.

schem.pngPCB.png

Best answer by MakerJake

Update!!! I have successfully connected to the chip! I used a different PCB from the same batch and connected the ST-Link, and it worked. I am unsure why the first chip didn't work, but I am happy to have it working.

3 replies

Tesla DeLorean
Guru
August 23, 2025

How is the ST-LINK/V2 wired in?

Does STM32 Cube Programmer report the Target voltage correctly?

An authentic pod?

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
MakerJakeAuthor
Associate
August 23, 2025

I have the SWCLK connected to PA14 and SWDIO connected to PA13. I have tried it with the board being powered by USB and the programmer providing power. Gnd is connected the the PCB and programmer. 

The voltage reported is often a little bit under 3.3V. 

I updated the programmer with Cube Programmer before using it.

Brian TIDAL
Technical Moderator
August 25, 2025

Hi,

try connect the NRST pin (MCU Reset pin) to the STLink RESET pin and configure STM32CubeProgrammer to connect under reset (Mode = under reset, reset mode= Hardware reset), or press the reset pin on your board when clicking on Connect and release the reset pin.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Brian TIDAL
Technical Moderator
August 25, 2025

Hi,

check that VDD is 3V3.

Measure the supply current when pressing the reset pin and when the reset pin is released. If there is no significant change, this means the device is not booting. 

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
MakerJakeAuthor
Associate
August 25, 2025

Hello, 

The voltage I measured was often closer to 3.33V. 

I was not able to see a change in current when I pressed the reset button.

Brian TIDAL
Technical Moderator
August 25, 2025

Hi,

check that Vss and Vssa are properly grounded.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
MakerJakeAuthorBest answer
Associate
September 6, 2025

Update!!! I have successfully connected to the chip! I used a different PCB from the same batch and connected the ST-Link, and it worked. I am unsure why the first chip didn't work, but I am happy to have it working.