cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link V2 minimal SWD connection and flash mechanism

JuiHung
Associate II

Hi,

I have two questions regarding ST-Link V2 programming:

1. For connecting and programming via SWD, is it safe to connect only NRST, GND, SWCLK, SWDIO without the Target VDD pin? We might “fake” the voltage for space reasons. Could this cause any issues?

 

2. I assume ST-Link flashes the MCU memory directly via SWD, not through the bootloader like USB DFU. Can anyone explain in detail how each pin behaves during programming, and if NRST can be omitted in some cases?

 

It would be helpful if there is an official ST document explaining this.

Thanks!

 

1 REPLY 1
Andrew Neil
Super User

@JuiHung wrote:

1. For connecting and programming via SWD, is it safe to connect only NRST, GND, SWCLK, SWDIO without the Target VDD pin? We might “fake” the voltage for space reasons. Could this cause any issues?


When you fake it, it becomes entirely up to you to ensure that your "fake" is correct - anything wrong with it, and you'll end up with connection issues.

The last thing you want is to be deliberately creating issues for yourself!

Unlikely to cause any actual damage, but could waste a lot of time.

 


@JuiHung wrote:

2. I assume ST-Link flashes the MCU memory directly via SWD


Yes.

 


@JuiHung wrote:

if NRST can be omitted in some cases?


Yes, it can.

But, if you find yourself in one of the cases which really does need it - then you're stuck!

Again, better to be prepared than to have to add it later when you're already frustrated and under pressure!

 

Design For Debug

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.