cancel
Showing results for 
Search instead for 
Did you mean: 

I want to program an STM32F103C8T6 in-circuit using the SWD interface and an ST-Link. If I don't have a reset button, do I still need to connect a capacitor and pullup resistor to the NRST pin?

SCook.1
Associate III
 
11 REPLIES 11
KnarfB
Principal III

The stm32f103c8.pdf data sheet "NRST pin characteristics" says "The reset network protects the device against parasitic resets." which means the 0.1µF C. A pull-up R is strictly not required but does not hurt and gives you an extra test point if not populated.

TDK
Guru

There have been reports on this forum of getting spurious resets when not including the 0.1uF capacitor, so it is not something I would skip here. It will be application dependent on if you actually need it or not.

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

Thank you for your answers. So the C and R are nothing to do with any reset button per se, they are there to force a reset on power-up, and to prevent spurious resets when running. Would that be a fair interpretation of your answers?

TDK
Guru

> they are there to force a reset on power-up, and to prevent spurious resets when running. Would that be a fair interpretation of your answers?

They don't force a reset on power-up. The POR does that by keeping NRST low until voltage is stable. The C prevents spurious resets. I would skip the R if it were my board, especially if space is a concern, but as KnarfB says, it will do no harm.

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

The C is there to introduce additional delay when POR and all other reset sources have given "good to go". The MCU already has an integrated pull-up for charging that C. By adding additional R, one decreases the effect (delay) for which the C is put there in the first place. Actually reduced delay time can cause problems in some situations and there are topics with those problems in this forum as well. Read the AN2586 section 1.3 and look at figure 5.

Why do so many people put that wrong R there? Because of copy-paste designing from the deficient BluePill?

https://freeelectron.ro/wp-content/uploads/2019/12/blue-pill-schematic.png

SCook.1
Associate III

Okay, so from AN2586 it seems that I'm recommended to use an external capacitor, but I don't need an external resistor, as there's an internal pullup. Just to be sure, will this arrangement still allow me to program my STM32 in-circuit using the SWD interface?

TDK
Guru

Yes, provided your SWD is wired correctly.

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

So my SWD wiring consists of a 4-pin header connected to SWCLK (Pin 37) and SWDIO (Pin 34), together with ground and +vcc. Is that correct?

I would add NRST but it's not strictly necessary. It's correct provided your pin numbers are correct.
If you feel a post has answered your question, please click "Accept as Solution".