0
\$\begingroup\$

I have been facing a reset issue.

My controller resets randomly. I have Codded for the source of reset at the begin of the routine.

For the testing the code I made the system reset on purpose and was able to find flags set for BOR, Software reset, Internal watchdog timer, external PIN reset. so the logic works.

The issue i'am facing rite now is that the system gets resets randomly in about an hour or so(generic time..no specific pattern observed) and the only flag that is set is External PIN flag.

Now according to STM32 manuals it says External PIN flag will always be set if other source of reset is there and the block diagram shown clarifies it, and have observed to in my testing, every reset source is accompanied by External PIN flag set. and only External PIN flag is set when i purpose fully press the reset switch.

1) I want to ask the scenarios under which the External pin Flag can alone be set. 2) Which flag will be set in case the code crashes and the system restarts Automatically. (read on internet that system can crash because of stack,memory leaks, etc.. and cause reset.)

Any insight on the matter would be of great help.

\$\endgroup\$
  • 1
    \$\begingroup\$ For readers here who are interested in this topic, the OP has asked the same question at the ST Community. There are now further details and some replies at that link. \$\endgroup\$ – SamGibson Jan 30 at 23:44
0
\$\begingroup\$

I have to ask, do you have the reference circuit on your NRST pin?

Meaning you have a 100nF cap to ground across the reset switch. To conserve power, that could be reduced to 10nF, but unless I'm running on a small battery, I never go below about 47nF.

What kind of signals do you have around the reset switch/nrst trace?

(I looked at the ST forum, but with the OP having it narrowed down to an EXTERNAL reset, the suggestions about watchdogs and such are almost worthless, the micro will let you where any internal reset comes from)

\$\endgroup\$
  • \$\begingroup\$ Thanks GB, I do have 100nF Cap to ground across the reset switch and a 10K pullup too. as to signal around reset trace..what kind of signal can prove to be an issue. \$\endgroup\$ – Mohit Aggarwal Feb 4 at 9:28
  • \$\begingroup\$ I'm at a loss here, sorry. I'm trying to imagine what could cause that reset with that combo of cap and resistor. It would take a hell of transient to cause a reset. \$\endgroup\$ – GB - AE7OO Feb 5 at 14:33
  • \$\begingroup\$ I,am also stuck. Is there any slightest chance of a faulty cap(mlcc) behavior. \$\endgroup\$ – Mohit Aggarwal Feb 7 at 10:08
  • \$\begingroup\$ It could happen... I guess. But the biggest problem I'm having is the simple fact that normally these things are rock solid. I've built plenty of boards with NRST tied directly to ground with nary a problem. Some of those boards are used in VERY noisy environments, including automotive engine compartments. \$\endgroup\$ – GB - AE7OO Feb 9 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.