Skip to main content
WAdel.1
Associate
May 30, 2023
Solved

Delaying the reset that comes from the NRST

  • May 30, 2023
  • 3 replies
  • 3592 views

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

This topic has been closed for replies.
Best answer by Peter BENSCH

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.

3 replies

Tesla DeLorean
Guru
May 30, 2023

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 VenmoUp vote any posts that you find helpful, it shows what's working..
WAdel.1
WAdel.1Author
Associate
May 30, 2023

thanks for your reply.

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

Peter BENSCH
Peter BENSCHBest answer
Technical Moderator
May 30, 2023

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
WAdel.1Author
Associate
May 30, 2023

ok that's helpful

thanks