2025-08-21 12:25 AM
Hi,
I am currently making a custom pcb that includes an stlink-v3mods in order to program two stm32's.
I am encountering a problem in which the stlink keeps failing and drawing a large amount of current. I am struggling to understand why this could be?
The stlink is powered through its usb port and a switch is used to swap the clock line between the two mcus in order to select which one to program. Both stm32s are on a separate pcb which can be plugged and unplugged from the main pcb (which contains the stlink).
I have attached my schematic regarding the stlink.
Any insight into this would be greatly appreciated,
Thanks.
2025-08-21 12:37 AM
How are the two STM powered? T_VCC is an input to the stlink-v3mod.
hth
KnarfB
2025-08-21 12:39 AM
Yes T_VCC is a 3.3v input to the stlink.
The two MCUs are powered by a 3.3v LDO: XL1509-3.3e1
2025-08-21 1:01 AM
Hi,
check VDD, VCC at your st-link board; is it at 3v3 , never more?
Something there has/gives more voltage to the V3mods.
btw
I also use the V3mods, with an proto-board wired to a pin header. Works fine.
2025-08-21 1:08 AM
It is at 3.3v although the tool can be hot plugged to the stlink pcb.
You dont think it could have anything to do with having two mcus connected? I only switch the clock line (SWO and TMS are connected to both mcus all of the time)
2025-08-21 2:28 AM
>You dont think it could have anything to do with having two mcus connected?
No, not by connecting swc,swd,swo from st-link-cpu to target-cpu ; same as on all nucleo-boards etc..
+
maybe , show your full circuit , mods/link + target + supply.
2025-08-21 2:48 AM
@Josh_W020 wrote:I am encountering a problem in which the stlink keeps failing and drawing a large amount of current.
Define "large amount". 50mA? 500mA? Where does the current flow to/from? What components get warm?
You can add small resistors in series with some pins and measure the voltage drop to measure the current magnitude and direction. Have you measured the supply voltages?
2025-08-21 2:48 AM
AAAAAA > although the tool can be hot plugged to the stlink
THAT could be a problem: just imagine target is floating and has mains supply, so there is a Y cap, for safety , EMC, etc. -> so it could be at +/- 100V level anytime ,ref. ground.
Now "hot plug" , but first contact that touches at the plug is ...maybe swc or swd....not both, target and st-link-cpu get a ESD discharge , the Y cap in the supply discharges through the cpu pins....maybe first contact is also the last.
So this is a very bad idea, if you not 100% sure to connect the grounds first and without any interruption or spike on the wires/lines . And no ESD voltage on any contact, from body or target, when its "hot plugged" , that will/might kill it.