Go Down

Topic: Atmega328p Reset Button Pulse Duration. (Read 473 times) previous topic - next topic

oliverboom

I was studying how to reset atmega328p using the reset pin so i check the datasheet and I found that I can reset the microcontroller if I apply logic low voltage for a minimum pulse width. However, I was not able to find what that minimum pulse width is for atmega328p. 

yasinzaii

The information of "Minimum pulse width on RESET Pin" is provided in table 26-3 on page 320 of the datasheet and it is specified to be 2.5 ┬Ás. 

So, if you want to reset the microcontroller using the external reset pin you should give a logic low pulse for at least 2.5us to be sure that atmega328p resets.

Author of Adduino.com. Loves to talk and share about Microcontrollers.

6v6gt

If you want a programming running on the atmega328p to reset the same MCU (in other words, reset itself), the most reliable method is to use the watch dog timer to force a system reset.

yasinzaii

If you want a programming running on the atmega328p to reset the same MCU (in other words, reset itself), the most reliable method is to use the watch dog timer to force a system reset.

I guess he is asking about the minimum pulse duration to keep the reset button active low. So the microcontroller can reset with absolute surity.
Author of Adduino.com. Loves to talk and share about Microcontrollers.

6v6gt

I guess he is asking about the minimum pulse duration to keep the reset button active low. So the microcontroller can reset with absolute surity.
That is probably so. This question normally arise when someone is attempting to force a system reset by bringing the MCU's own reset pin low using another pin, then discovering that those attempts fail because, during the early part of the reset cycle, all pins go in a high impedance mode, breaking the attempt.

Hence my suggestion to use the Watchdog timer.

yasinzaii

That is probably so. This question normally arise when someone is attempting to force a system reset by bringing the MCU's own reset pin low using another pin, then discovering that those attempts fail because, during the early part of the reset cycle, all pins go in a high impedance mode, breaking the attempt.

Hence my suggestion to use the Watchdog timer.
i agree 
Author of Adduino.com. Loves to talk and share about Microcontrollers.

Smajdalf

when someone is attempting to force a system reset by bringing the MCU's own reset pin low using another pin, then discovering that those attempts fail because, during the early part of the reset cycle, all pins go in a high impedance mode, breaking the attempt.
Is this really tested or is it only a wild theory based on other (probably ancient) devices? The reset is always extended by at least 14 CK: I expect as soon as the reset is accepted (there is a spike filter) it is latched internally and extended so all the reset tasks can be carried out. With all this complexity it would be surprising if a partial resets were possible.

6v6gt

Is this really tested or is it only a wild theory based on other (probably ancient) devices? The reset is always extended by at least 14 CK: I expect as soon as the reset is accepted (there is a spike filter) it is latched internally and extended so all the reset tasks can be carried out. With all this complexity it would be surprising if a partial resets were possible.
Well, I am not sure if this comes within the scope of your definition of wild theory, but I did find this: https://www.avrfreaks.net/comment/385019#comment-385019 . Unfortunately the Atmel link no longer works, but the author's assessment of its contents is still there.

Smajdalf

Well answer from a "random Atmel guy" answering a question from another "random guy" counts as a "wild theory" in my definition. If he had a deep understanding he would be in a better position than answering questions of hobbyists (= customers where profit is unlikely). If it were answer to "I want to buy millions of chips but only if resetting by own pin is possible" I would consider "no" as truthworthy. Otherwise it is only the simplest safe answer.

After all some people in the linked posts claim it "seem to work for some people" or "No-one seems to take any notice [of partial reset]" while noone reports any evidence it is possible.

Another important factor: the pins are only tri-stated, so the reset pin stays in the LOW state until the weak pull-up brings it HIGH again. This may take considerable time if a cap is on the reset pin but it can be hastened by an external pull-up.

If I get some time I will try to do some experiments. But of course testing one cup for a few hours cannot be taken as a "proof" of behaviour of any other chip or the same chip in other conditions.

6v6gt

. . .
If I get some time I will try to do some experiments. But of course testing one cup for a few hours cannot be taken as a "proof" of behaviour of any other chip or the same chip in other conditions.
Exactly. Even if you succeeded, you'd only end up adding to the substantial body of wild theories, speculation and anecdotes which have built up over the years concerning this topic. And all that from some random guy on the Arduino forum which probably also does give it much authority.

My own personal opinion is that high weight should be given to the standard, supplied mechanism for doing something. If there are overriding reasons why that cannot be employed (onerous licencing conditions, expensive components etc. etc.) then make sure that any substitute is well tested in the target environment.


Go Up