2025-08-14 9:35 AM
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/V2 | ST-LINK/V2 | My Board | My Board |
Pin Number | Connector CN3 | MCU Pin | MCU Pin |
1 | Target VCC | ||
2 | Target VCC | VCC | |
3 | TRST | ||
4 | GND | GND | |
5 | TDI | PA15 | TDI |
6 | GND | GND | |
7 | TMS_SWDIO | PA13 | TMS |
8 | GND | GND | |
9 | TCK_SWCLK | PA14 | TCK |
10 | GND | GND | |
11 | Not connected | ||
12 | GND | ||
13 | TDO_SWO | PB3 | TDO |
14 | GND | ||
15 | NRST | 7 | nRST |
16 | GND | ||
17 | Not connected | ||
18 | GND | ||
19 | VDD | ||
20 | GND |
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:
My schematics look like this:
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:
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?
2025-08-14 10:09 AM
>>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.
2025-08-14 10:33 AM
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:
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?
2025-08-14 11:06 AM
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.
2025-08-14 11:07 AM
With the STLink disconnected, does the nRST line go high? Does your STLink with the 20-to-10 pin adapter work on other boards?
2025-08-14 11:13 AM
Double checked that and it is correctly going to pin 1 of the ST-LinkV2.
Thank you for clarifying that PB4 is not necessary to be involved, I was confused.
2025-08-14 11:27 AM
I will double check the nRST voltage tonight. From my memory it was low but I will double check. With the internal pullup it should be high? Maybe my push button is shorting to GND? I will get back to you if this is not the case.
I don't have other boards where I have used this STLink + 20-to-10 pin adapter. This is my first STM32 board.
2025-08-14 11:32 AM
With the STM32's internal pullup and your external cap the nRST should go high shortly after the main power rail. If it doesn't, check your switch and/or shorts across the cap (C201) or the STM32 pins.