Skip to main content
Visitor II
August 14, 2025
Solved

STM32F405 SWD and JTAG don't work

  • August 14, 2025
  • 1 reply
  • 893 views

For some reason I am unable to connect to my custom STF32F405RGT6 board via SWD or JTAG.

I originally had my board wired as this table below:

ST-LINK/V2ST-LINK/V2My BoardMy Board
Pin NumberConnector CN3MCU PinMCU Pin
1Target VCC  
2Target VCC VCC
3TRST  
4GND GND
5TDIPA15TDI
6GND GND
7TMS_SWDIOPA13TMS
8GND GND
9TCK_SWCLKPA14TCK
10GND GND
11Not connected  
12GND  
13TDO_SWOPB3TDO
14GND  
15NRST7nRST
16GND  
17Not connected  
18GND  
19VDD  
20GND  

This is from the ST-LinkV2 documentation Table 4: https://www.st.com/resource/en/user_manual/um1075-stlinkv2-incircuit-debuggerprogrammer-for-stm8-and-stm32-stmicroelectronics.pdf

I have tried both SWD and JTAG with all possible reset methods through the CubeProgrammer and IDEDebug configuration:

Parker_0-1755188289359.png

My schematics look like this:

Parker_1-1755188359888.png

 

Parker_3-1755188548492.png

Parker_4-1755188601896.png

Parker_6-1755188900986.png

 

I have 3V3, 3V3A up and measured as 3.26V on my multimeter, and VCAP is at 1.2V.

I tried both versions (high or low) of the BOOT0 pin and saw no difference.

I kept getting one of these two errors:

Parker_5-1755188801133.png

I then removed R501 and still saw these errors.

I also tried a few variations of pulling nRST high or low, as well as PB4 high or low, or even connecting PB4 to R501 which would allow the nRST from the STLinkV2 to be connected to TRST of the STM32.

Why am I not able to communicate through this interface?

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

    Hey! Its working! My push button was holding the STM32 in reset because I accidentally rotated it 90 degrees during assembly! I reconnected the nRST pin to the JTAG header and am able to flash my blinky project! Thank you everyone!

    1 reply

    Graduate II
    August 14, 2025

    >>Why am I not able to communicate through this interface?

    Part not viable?

    Pin header mirrored?

    The 1.2V on VCAP suggests the part orientation is good. Schematic look Ok.

    Picture of board, with debug header and ST-LINK attached? To see if anything obviously wrong there.

    swddebugheader.png

    ParkerAuthor
    Visitor II
    August 14, 2025

    Thanks for the quick reply,

    On your 10-pin JTAG/SWD connector where is your nRESET signal routed? Pin 7 of the STM32 or Pin PB4? Does this matter?

    I can confirm that the pin header is not mirrored or rotated improperly:

    Parker_0-1755192512615.png

    Parker_1-1755192607391.png

    The key is on the same side as pin1.

    I checked my wiring from ST-LinkV2 through to the board. I am using CN3 on the ST-LinkV2 through an ARM-JTAG-20-10 to my board with no hacks or modifications to those wires.

    Any other reasons?

     

    Graduate II
    August 14, 2025

    Not sure why you're involving PB4  the NRST/NRESET Pin 7 of the STM32F4 looks appropriate

    Make sure you've identified Pin 1 correctly, one of you screen shots reports 0.01 V, so no power to buffers there.

    SWD20PINSTLINK.jpg