2025-09-09 4:25 AM
Dear ST Community.
I am designing devices with STM32WL microcontrollers with highly limited board space. I routed out traces for all SWD signals (VDD, GND, NRST, SWDIO, SWCLK)
I have my Prototype Board, original ST-Link V2 with V2J45S7 Firmware and STM32CubeProgrammer version v2.20.0. During testing I realized that the connection to Prototype is stable only when I connect all 5 signals. For some reason I thought that "VDD_Target" pin on ST-Link side can be left floating.
I have found a previous post:
https://community.st.com/t5/stm32-mcus-boards-and-hardware/how-to-connect-the-stlink-v2-to-my-board/m-p/94389
but unfortunately in my case I have to have "VDD_Target" signal connected on both ends. When disconnected STMCubeProgrammer responds with error shown below:
Do I need to have all SWD signals being connected in order to program my Prototype or is there any hidden option in ST-Link/STMCubeProgrammer that I can turn on, so in final design I can omit routing VDD pin for SWD connector?
Kind regards
Marek Jaworski.
Solved! Go to Solution.
2025-09-11 3:49 AM
I have no STM32WL handy. But regarding ST-Link a STM32L should behave similiar, which I can use on a breakout board. With one of these I could try to reproduce it.
Which WL do you have? M0+ or M4?
2025-09-11 3:58 AM
I have STM32WLE5CCU6 so M4 version. Thank you in advance for your check.
2025-09-12 12:39 AM - edited 2025-09-12 12:44 AM
So I tried this night with an STM32F303 (M4F) successfully with ST-Link's VDD from an external source. It worked as expected.
Setup:
- Power supply A (3v3)
- Power supply B (3v3) (MUST BE THE SAME VOLTAGE AS POWER SUPPLY A!!!)
- STM32F303CBT6 on a breakout board
- standalone ST-LINK/V2, updated to "V2J46S7 STM8/STM32 Debugger"
Connections:
- all VDD for STM32F303CBT6 (1, 9, 24, 36, 48) from power supply A
- all GND for STM32F303CBT6 (8, 23, 35, 47) from power supply A
- connections between STM32F303CBT6 and ST-LINK/V2: RST (7), SWCLK (37), SWDIO (34)
- ST-LINK/V2.VDD from power supply B
- GND from power supply A to GND from power supply B
Attached you find a pic with power supply A with 3v3 and GND for the breakout board and another pic with ST-Link connected to the MCU, except VDD from another power supply B (right hand).
Note the GND connection between A and B...
Connection from CubeIDE to STM32 works fine for flashing, debugging etc..
(I expect this to work for all STM32 with ST-Link/v2, since VDD is only used for sensing the MCU's voltage.)
Since it does not work in your case: did you connect the GND of the two power supplies (internal from your board against the GND belonging to your external VDD supply)?
(This can be done with the GND of ST-Link to GND of external power of course)
2025-09-12 4:57 AM
Thank you very much for your experiment mfgkw, it proves that STLink can be deceived by external power supply.
I do have a question though: does your setup work when you have Supply B disconnected from STLink's VDD? If so, I then believe that there is some error in my Prototype, I will look on signal lines with oscilloscope to detect possible faulty behaviour.
2025-09-12 5:06 AM
> I do have a question though: does your setup work when you have Supply B disconnected from STLink's VDD?
no, then I have no connection.
2025-09-12 6:57 AM
Alright, correct me if I'm wrong but then it means that STLink-V2 requires "VDD_Target" to be connected in order to work properly. That's a bummer.
2025-09-12 8:06 AM
VDD has to be provided to the ST-Link, but not necessarily from your board.
2025-09-15 4:30 AM
@mfgkw wrote:VDD has to be provided to the ST-Link
... or must it?
@Suresh_M in this thread claims to have it working in Keil without a Target VDD connection ...
2025-09-15 4:39 AM
> ... working in Keil without a Target VDD connection
To be honest I have doubts - but I can not verify.
2025-09-16 3:21 AM - edited 2025-09-16 3:22 AM
Okay people, let's wrap the thread up.
Thank you very much mfgkw and other users for help with this one, now jumping to conclusion:
1. STLink-V2 requires "VDD_TARGET" Pin connected in order to establish a connection with the Prototype BUT, it doesn't have to be connected to the Prototype itself, any other source of valid voltage on this pin allows to establish a connection between ST-Link and Prototype
2. When using ST-Link from Nucleo Boards, there is no need for connecting "VDD_TARGET" to Prototype. From what I saw an Nucleo schematics (Document MB1136, p. 4):
there is a pullup resistor on the VDD_TARGET pin, so without connecting it to the Prototype, pullup provides a valid voltage to PA0(AIN_1) Pin
3. There is unverified claim that this pin doesn't have to be connected when using Keil software.
If there is nothing more to add, we can close this thread and let it get indexed by google for future generations.