Skip to main content
Visitor II
June 13, 2020
Question

STM32F103 SWD Design Problems

  • June 13, 2020
  • 2 replies
  • 2829 views

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.

    This topic has been closed for replies.

    2 replies

    Graduate II
    June 13, 2020

    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

    JMora.2Author
    Visitor II
    June 13, 2020

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

    Graduate II
    June 13, 2020

    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.

    Explorer II
    June 13, 2020

    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

    JMora.2Author
    Visitor II
    June 13, 2020

    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).