Skip to main content
Visitor II
June 29, 2025
Solved

Unable to Connect to Custom Target STM32F412CEU6 via SWD

  • June 29, 2025
  • 5 replies
  • 471 views

Hi , I am also making custom board for GPS, and same issue I am facing, unable to connect via SWD, Please help to debug.

MCU.jpg

    This topic has been closed for replies.
    Best answer by ashishkv29

    Solved, Issue was on ST-Link v3 Mini, via connector pin head able to access but not via solder pads.

     

    Thanks.

    5 replies

    Visitor II
    July 2, 2025

    Remove the diodes on the debug port, it will work. 

    Visitor II
    July 3, 2025

    Removed all 4, but still same issue

    Super User
    July 3, 2025

    How are you trying to connect and how, exactly, is it failing? Show logs & screenshots.

    Has this board ever worked?

    If it's brand new, have you checked basics: power supplies; component orientations; current draw; etc?

    You don't have NRST on your debug header; Have you tried adding that, and then connecting under hardware reset?

    How to solve connection errors when connecting and programming the STM32 target board.

    How to solve debugger connection issues

    Visitor II
    July 3, 2025

    How are you trying to connect and how, exactly, is it failing? Show logs & screenshots.

    Ans: Connected ST-Link v3 SWDIO to MCU SWDIO and CLK to CLK, and GND and VCC from MCU Board.

    ST-Link Log

    Screenshot 2025-07-03 230946.png

    Traces and Component Placement :

    Screenshot 2025-07-03 224429.png

    Red is top layer and Blue is Bottom layer

    Screenshot 2025-07-03 232512.png

    Schematic:

    MCU.jpg

    Board Stackup:

    ashishkv29_0-1751565756566.png

    Also maintaned impedance for signal = 50 and for CAN=120

    Has this board ever worked?

    Ans: No.

    If it's brand new, have you checked basics: power supplies; component orientations; current draw; etc?

    Ans: Yes MCU & Oscillator placed in correct orientation. and current draw is 6.84 mA ( While not coneting ST-Link USB to PC) and 6 mA ( while connecting ST-Link USB to PC).

    You don't have NRST on your debug header; Have you tried adding that, and then connecting under hardware reset?

    Ans: Yes I tired MCU NRST(Pull High SCH - test point TD11) Joining directly to ST-Link RST pin and even by MCU NRST (pull low joing -SCH test point TD11 to GND )

    ashishkv29AuthorAnswer
    Visitor II
    July 11, 2025

    Solved, Issue was on ST-Link v3 Mini, via connector pin head able to access but not via solder pads.

     

    Thanks.