cancel
Showing results for 
Search instead for 
Did you mean: 

NRST Hardware difference between Nucleo's ST-Link and dedicated ST-Link V2

MJaworski
Associate II

Dear ST Forum members,

I am developing the Prototype with STM32WL microcontroller to which I provide a schematic snippet below:

MJaworski_3-1758122229402.png

+ SWD 1x5 goldpin connector:

MJaworski_1-1758119917555.png

If the image quality doesn't let you inspect the nets, I will provide a better image later.

The 3V3 voltage is stable, SMPS delivers beautiful 1,55V and I was able to connect to the uC and program it with ST-Link V2.

Here's my problem: when I tried to program my Prototype with Nucleo's ST-Link (N-ST-Link) I was unable to connect to device. N-ST-Link has SW version of V2J46M32 and I use STM32CubeProgrammer Version 2.20.0 I connected VDD, GND, SWCLK, SWDIO and NRST signals between boards, clicked "Connect" and received following message:

MJaworski_2-1758120321839.png

During debugging I checked the voltage of NRST pin. When N-ST-Link's NRST pin is disconnected the Prototype's NRST voltage is equal to 3.3V. When I connect both NRSTs signals, the voltage drops to 1,55V. When Prototype's NRST pin voltage drops for the first time the uC is still running (debugging diode is blinking), but when I hit "Connect" I receive the error message shown above and uC's program halts.

My guess is that the 1,5V on NRST is a result of a voltage divider between Prototype's internal pull-up resistor and N-STLink's possible pull-down resistor. It is just an assumption as I have not noticed any pull-down on N-STLink schematic, so the only possible resistor for a voltage divider may come from internal GPIO structure. Clicking "Connect" in STM32CubeProgrammers drives NRST to 0V and then it comes back to 1,5V and uC stays stuck, as it has not reached a valid "1" state voltage.

Out of curiosity I measured resistances of NRST pins to VCC and GND of both Prototype and N-ST-Link while both were disconnected from each other. Now, I know that it will not measure a proper value of resistance of any of the pins, I just wanted to check whether there is a soft or hard "connection" to any of stable potentials. Both devices were powered while doing the measurements, here are the results:

Prototype: R[NRST-Vcc]: 36kOhm (magnitude of internal pull-up resistor as stated in uC's documentation, R[NRST-GND]: more than 2MOhm.

N-ST-Link: R[NRST-Vcc]: 12,6kOhm (possible parallel connection between external and internal pull-up resistor, still a valid resistance value), R[NRST-GND]: 109kOhm (stronger than Prototype's leakage?)

The possible solution for my problem is that I can disconnect NRST signal and use "Software reset" mode in STM32CubeProgrammer but I do wonder what's wrong with hardware setup. I recreated this experiment with 2nd N-ST-Link and got similar results.

Other solution to my problem is to use dedicated ST-Link V2. When I connected all 5 SWD signals (SWO excluded) I got a stable connection between devices. What's more ST-Link V2 R[NRST-GND] is also more than 2MOhm.

Can anyone of you help me in figuring out why Nucleo's ST-Link fails at connecting to my Prototype while dedicated ST-Link V2 does not? Do I happen to somehow damage two Nucleos?

As usual, if you need more information about my setup, I will gladly provide additional data.

Kind regards
Marek.

 

2 REPLIES 2
Andrew Neil
Super User

Photos of your setup would help.

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.
TDK
Super User

If NRST is going low, possibly you are exceeding the current limit on some regulator, causing a brown-out condition. A measurement of 1.5 V on a multimeter could be a sign the microcontroller is repeatedly resetting rather than a static signal of 1.5 V. I don't think this is a resistor bridge issue. NRST is driven as an open-drain.

If you feel a post has answered your question, please click "Accept as Solution".