cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103 SWD Design Problems

JMora.2
Associate II

Hello all, 

I'm designing a num pad using the STMF103 MCUs you can find on the Blue Pill board. However, I am having issues uploading the code to my board via SWD. I get this classic error: 

Error in initializing ST-LINK device.

Reason: (4) No device found on target .

I've tried tampering with the debug settings but I guess it might just be a matter of me designing the interface wrong, which confuses me because I cross-referenced the schematic of the Blue Pill board I prototyped my project with, and they have the exact same setup with SWDIO and SWCLK going directly to the MCU. Anyways I've linked my schematic and I'd appreciate if someone more seasoned than me tells me where my hang-up is.

Thanks.

6 REPLIES 6

Usually means the chip is non-functional / non-responsive.

Check Power, Check part orientation

Check Voltage on VDDA, Check level observed on NRST

For an External ST-LINK, make sure pin 1/2 is connected to the 3V supply

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

NRST and VBAT unconnected... Seriously? And it is highly recommended to bring NRST out to debug interface to be able to use "Connect Under Reset" mode. Instead of copying cheap Chinese crap, you should copy the reference schematic from AN2586 and ST's Nucleo and other boards.

Also consider moving to more decent STM32 series.

Indeed it is time to stop using the "F103 blue pill" and to switch to the "F411 Black pill". Like this one:

 https://www.cnx-software.com/2019/12/24/stm32-black-pill-board-features-stm32f4-cortex-m4-mcu-optional-spi-flash/

https://forum.micropython.org/viewtopic.php?t=7154

Why do I need NRST and VBAT connected? The datasheet shows an active internal pullup on NRST, and states that VBAT is a backup voltage pin when VCC is not present. I don't see how that is relevant to the SWD interface not working. And yes I've looked at other schematics as well. Thanks.

Thanks for the recommendation, I will check it out for sure, but for now I have a couple of F103 MCUs that I would like to use and I would rather try to solve the problem instead of discarding it and switching over, unless it really is the MCUs fault (it's probably mine).

Thank you clive1. It was indeed the chip and not the routing. You are a hero! 8)