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-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.
2025-09-09 4:43 AM - edited 2025-09-09 4:45 AM
In theory VDD is required to inform the ST-Link about your CPU voltage.
If you are really out of space for connections it would be possible to fake your CPU voltage for ST-Link without a connection. So if you drive your STM with 3.3V it will work when you present 3.3V on ST-Link between VDD and GND without really connecting it from your STM to ST-Link.
Then you need to connect GND, SWCLK and SWDIO in minimum (provided you set VDD to your CPU voltage at ST-Link side), and optionally NRST for Debugging and optionally SWO for tracing if needed.
2025-09-09 4:50 AM
Dear mfgkw,
thank you for your reply. I did not specify in post above, my Prototype, or should I write my STM32WL is powered from 3,3V stable source. Creating artificial voltage for STLink was my first idea but I thought that there might be some legitimate way developed by tool's manufacturer. If there is no such thing, I will commit a voltage fraud.
Kid regards
Marek Jaworski.
2025-09-09 6:20 AM
It should work. The ST-LINK/V2 operates at 3.3 V regardless of VDD_TARGET level according to the user manual. Are you sure you have this exact debugger? Some debuggers use a level shifter. Perhaps link to the debugger you have.
2025-09-10 7:19 AM
Dear TDK,
Well, apparently it doesn't work for me. I bought ST-Link V2 from TME Retailer:
https://www.tme.eu/pl/details/st-link_v2/programatory/stmicroelectronics/
Here I provide pictures of both sides of my model:
And CubeProgrammer shows such properties of ST-LINK (Prototype not connected)
The Prototype's schematic for SWD connection is depicted below
Still, when connecting Prototype to ST-Link and clicking "Connect" button in STMCubeProgrammer while having "VDD_Target" pin disconnected, it shows the same error from my original post. Do you have any other ideas? Any at this point would be helpful.
2025-09-10 7:36 AM
If you're out of ideas, connecting the VDD_Target pin to 3.3 V so the voltage is displayed in STM32CubeProgrammer correctly and trying to connect seems smart. There are pins on the programmer than supply 3.3 V. Maybe it does have level shifters on one side, or maybe it requires a certain voltage before it even tries.
2025-09-10 7:39 AM
Hi Marek,
what do you mean with "CON1"? Is it a cable to the external ST-Link shown in the picture?
(The pin designation looks like the embedded ST-Link/v2 from NUCLEO boards. The external ST-Link has a completely different assignemnt on its 20 pin connector for STM32.)
2025-09-10 7:45 AM
To both replies above:
TDK: sounds like a last resort, I'm gonna do that when I am really out of options.
mfgkw: that is correct, CON1 is a soldered male goldpin row to which I attached F2F goldpin ribbon which is connected to corresponding pins on 20-pin ST-LinkV2 header. We originally used Nucleo ST-Link but it turned out to be little unresponsive so I exchanged it for proper ST-Link. The electrical connection is solid, I assure you.
2025-09-10 8:13 AM
> We originally used Nucleo ST-Link but it turned out to be little unresponsive
There's no reason why the nucleo wouldn't work correctly. Something in the setup is causing the unreliability and it isn't the nucleo.
2025-09-11 2:47 AM
Thank you for your insight, yet it doesn't answer the original topic. Is there anyone who can check and confirm similar behaviour of STM32WL+ST-LinkV2? If not, we can close this topic as unresolved.