cancel
Showing results for 
Search instead for 
Did you mean: 

Delaying the reset that comes from the NRST

WAdel.1
Associate II

Hi all,

I'm using STM32L562VETQ

my question is:

can i delay the reset for about 20ms when pressing the NRST pin ?

i want to give LED-Indication for the device reset.

in other words, can the reset -that comes from the NRST pin- be delayed for a specific amount of time ?

and if so, how can i read the state of the NRST pin so that to detect that the user has pressed it ?


_legacyfs_online_stmicro_images_0693W00000bl9zFQAQ.png

1 ACCEPTED SOLUTION

Accepted Solutions

Correct.

But you could design an external reset circuitry by delaying the low pulse at NRST accordingly. 

With a few logic gates and an RC element, this should be feasible. For example, you could define the reset as active high, switch the reset switch to VDD, charge a capacitor with it via a resistor (RC low-pass) and then connect the output to an inverting Schmitt trigger, whose output is in turn connected to NRST.

Attention: the output of the logic gate / Schmitt trigger must either be open-drain or converted to something similar with a Schottky diode.

In order 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.

View solution in original post

4 REPLIES 4

How'd that work?

You can add code in ResetHandler() to configure and set GPIO pins, and spin there for a while.

An MCP-120 type POR circuit could hold the NRST low for several hundred ms, and LED could use that as it's ground side, to illuminate briefly if triggered. Perhaps some more exotic reset chips available.

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

thanks for your reply.

so i can't delay the reset of the NRST pin. that reset will get executed immediately right ?

Correct.

But you could design an external reset circuitry by delaying the low pulse at NRST accordingly. 

With a few logic gates and an RC element, this should be feasible. For example, you could define the reset as active high, switch the reset switch to VDD, charge a capacitor with it via a resistor (RC low-pass) and then connect the output to an inverting Schmitt trigger, whose output is in turn connected to NRST.

Attention: the output of the logic gate / Schmitt trigger must either be open-drain or converted to something similar with a Schottky diode.

In order 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.
WAdel.1
Associate II

ok that's helpful

thanks