cancel
Showing results for 
Search instead for 
Did you mean: 

Minimum connections needed between MCU and the st-link programmer?

maryam magdy
Associate II

My MCU is stm32L432kc. I've concluded that we need a minimum of 4 connections: SWCLK, SWIO, vcc and gnd. Can someone from here confirm that?

And another question is I'm confused how to connect the Vdda/Vref+ pin 5 and the NRST pin4. Do I have to connect them? I have the schematic of nucleo board for my MCU attached. Should I just connect them the same way?

5 REPLIES 5

I'd lean toward having a pull-up on NRST, and also providing it on a debug interface, will help recover when the code does odd things, or sleeps the processor.

PB3/SWO/TDO is also recommended for a CM4 debug communication channel, ie SWV Serial Wire Viewer.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Uwe Bonnes
Principal III

SWCLK and SWDIO and GND may also be enough. E.g. if VCC on your board is 3.3 Volt and you connect to the SWD connector on a nucleo or discovery board. NRST should have a 100 n to round. VDDA should at least be connected to VDD or clean voltage derived from VDD

S.Ma
Principal

GND, SWDIO, SWDCLK and MCU Vdd (for monitoring purpose) are the minimum required connectivity with ST Link for debugging.

maryam magdy
Associate II

@Community member​  I'm guessing the SWO is the MCO in my nucleo board in the pic I attached. So without it I can't use the printf function and debug through serial?

No, I'm talking about PB3

The MCO (from PA8 on an ST-LINK) is presumably a clock source.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..