0
\$\begingroup\$

In order to program a target MCU with STLink you need to connect 4 wires - SWCLK, SWDIO, GND and VCC (3.3V). STLink v2 programmer has 3.3V pin already present and ready to use. But let's say I would like to use my STM32F401 Nucleo-64 development board as a programmer. In this case, I need to remove CN2 jumpers and use SWD connector. The problem is, SWD connector does not have target power (3.3V) pin. Where do I get 3.3V? Can I just take it from nucleo board?

\$\endgroup\$
  • 1
    \$\begingroup\$ you can take power from the nucleo board yes, within limits of course. \$\endgroup\$ – old_timer Jan 2 at 15:01
3
\$\begingroup\$

Even an ST Link does not provide target power. You connect Vcc to power the level shifter in the ST Link. Such that the ST Link does not blow up an 1.8V target.

The budget version of the ST Link on the development boards do not offer this, and are only capable of interfacing with 3.3V targets. If your target is 3.3V, and not powered from elsewhere, you can connect 3.3V. If it is self-powered you can omit 3.3V.

I cannot find a board photo or circuit of the ST Link V2, but it will have some logic IC that provides level shifting/buffering between the STM32F103 (used in ST Link) and the target connector.

From the user manual of ST Link V2:

JTAG/serial wire debugging (SWD) specific features
– 1.65 V to 3.6 V application voltage supported on the JTAG/SWD interface and 5 V tolerant inputs

And the remark at the pinout table:

  1. The power supply from the application board is connected to the ST-LINK/V2 debugging and programming board to ensure signal compatibility between both boards.
\$\endgroup\$
  • \$\begingroup\$ I am talking about ST Link interface like this: electrodragon.com/wp-content/uploads/2013/09/… \$\endgroup\$ – jurij Jan 2 at 19:53
  • \$\begingroup\$ @jurij that's a budget version. Do not assume any level shifting is available. Skip the 3.3V wire. \$\endgroup\$ – Jeroen3 Jan 3 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.