cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to connect to STM32F103TBU with ST-Link

MakerJake
Associate

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

10 REPLIES 10

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 Venmo
Up vote any posts that you find helpful, it shows what's working..

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.

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.

Hello!

Thank you for the tip. I ran a jumper from the NRST pin to the programmer, and it is still not working. 

I fear something else is going wrong as the voltage on the NRST pin when the board is powered, but the programmer is not connected, is 0V. From my understanding of the data sheet, there is a pull-up on the NRST pin, so the voltage should be 3.3V. I tried to measure the continuity between NRST and GND, and my DMM said it was not connected.

I don't have the other PCBs from the batch on hand, but I can test them later. If you have any other troubleshooting advice, that would be greatly appreciated. 

Brian TIDAL
ST Employee

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.

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.

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.

The POR circuit is on the analogue supply side.

Make sure also you have a common ground and with the ST-LINK. 

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

I have the QFN package, so it was not super easy to get a good reading on the pins, but all 4 have continuity to ground.