Skip to main content
Visitor II
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

    This topic has been closed for replies.
    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

    Graduate II
    August 23, 2025

    How is the ST-LINK/V2 wired in?

    Does STM32 Cube Programmer report the Target voltage correctly?

    An authentic pod?

    MakerJakeAuthor
    Visitor II
    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.

    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

    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

    MakerJakeAuthor
    Visitor II
    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.

    Technical Moderator
    August 25, 2025

    Hi,

    check that Vss and Vssa are properly grounded.

    Rgds

    BT

    MakerJakeAuthorAnswer
    Visitor II
    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.