cancel
Showing results for 
Search instead for 
Did you mean: 

Pull-up required on NRST line?

felixzero
Associate II

Hello everybody,

I am quite new from working with STM32 products but recently made the switch from Atmel chips (thanks to the free handout of Nucleo boards at the Eurobot competition I guess :) ). I recently designed a fairly simple board, centered around a STM32F401 chip. The schematics is fairly simple. Here is the MCU part of the schematics (power supply and application circuits aside):

Capture d’écran de 2023-07-02 21-17-59.png

In addition to this custom board, I purchased a ST-Link V3-MINIE programmer board, which connects onto the STDC14 connector for programming and debugging the microcontroller.

My question is about the NRST pin. As explained in the datasheet and the application notes, there is supposed to be a pull-up resistor internal to the chip, so the datasheet recommends only a 0.1uF resistor between NRST and GND. However, I can't make the board work that way: the STM32CubeProgrammer application can recognize the chip, but any flashing attempt fails with a "dev_target_held_under_reset" error, which is self-explanatory.

I thus added a 1k pull-up to 3.3V on the NRST line, and now my board works fine. How come? Did I miss something?

11 REPLIES 11

There's a pull-up internally on the NRST that should suffice.

I would generally caution against clamping BOOT0 to GND, use a pull-down or a jumper arrangement. The ROM based System Loader akin to SAM-BA allows for connectivity and programming, and also a secondary signs-of-life test. See perhaps App Note AN2606 and AN3155

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

@Tesla DeLorean wrote:

There's a pull-up internally on the NRST that should suffice.


Thanks for your reply. However, it seems that on my board, this was not the case, which surprised me (and the result is a board that cannot boot without rework). What could possibly cause the line to remain low?

 


@Tesla DeLorean wrote:

I would generally caution against clamping BOOT0 to GND, use a pull-down or a jumper arrangement. The ROM based System Loader akin to SAM-BA allows for connectivity and programming, and also a secondary signs-of-life test. See perhaps App Note AN2606 and AN3155


I see. I was a bit short in space so I wanted to avoid to put jumpers. Maybe solder bridges would have done the trick. Are there any advantages to program over UART vs SWD?

For one, lot of customers prefer not to have accessible debug interface in finished goods. Also BL can share communication interface with what's also used as same interface in the finished product, so the SWD pins can be repurposed. That's great on small packages.

BR,

J

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

This makes sense indeed. UART or SPI is often already available on a connector.

However, any ideas why my circuit won't boot without a pullup on the NRST line?

KiptonM
Lead

I always use a 10K pullup, a 0.1 uF capacitor and a 1K resistor for my systems, without an issue. It is because I do it with other processors. 

Looking at the datasheet. for the STM32F401 Paragraph 6.3.17 NRST pin characteristics Figure 32 shows just a capacitor.  

They say the pullup is between 30K and 50K which is not very much current. 0.66 uA to 11 uA. 

It may be the programmer load on the reset line is giving you the grief. (I am just guessing) 
I have not seen your issue but I use a 10K pullup which is closer to 33 uA.  The difference can affect the speed of the rising pulse.  It may not make a difference when you are starting up, but it may make a difference when you are programming. 

Since it is too late to put in a 10K resistor, the next thing I would try is to slow down the programmer. 
In the IDE, Project->Properties->Run/Debug Settings-> Select and edit your project. 

Under the Frequency try the lowest setting (on mine it is 140 kHz) .

If that works then try the next speed up, until it breaks so you know what works and what does not work. 

If that does not work, then the only other thing I would try is to add a 10K pullup to your programmer. 
That is a single modification to the programmer as opposed to a modification of every board. 

Kip











 

gbm
Lead III

According to STM32 data sheets there is no need to connect anything to the NRST pin - no capacitor, no resistor. The capacitor could be useful if the NRST pin is routed to a distant connector (like 20 cm long track/wire). None of my PCBs designed in the last 7 years has NRST pin connected - there is no need for such connection.

And "It is because I do it with other processors." is simply funny. The "other processors" (like old 8051) did not contain the built-in reset circuitry like most of modern ones.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

@gbm The datasheet recommends a 0.1uF capacitor to avoid spurious resets.

TDK_0-1688861897074.png

 

If you feel a post has answered your question, please click "Accept as Solution".
They say the pullup is between 30K and 50K which is not very much current. 0.66 uA to 11 uA.
I have not seen your issue but I use a 10K pullup which is closer to 33 uA.

And the difference of more than 10 times didn't raise a suspicion to anyone... Not a single one of those current values is correct:

55k: 66 uA (100x more)
30k: 110 uA (10x more)
10k: 330 uA (10x more)

Fantastic engineering thoroughness! ;)

Fortunately it was only a prototype so I could go forward by hand soldering a 10k resistor and reordered another prototype with the pullup on the reset line. This is an easy fix. I asked the question here because the behavior I observe is quite unexpected, TDK posted the datasheet and there is supposed to be an internal pullup.

Your hypothesis makes sense, but still, beating a 50k pullup is much leakage current.