1
\$\begingroup\$

I had a circuit with ATmega644PA and use internal watchdog timer to bring the controller from a hang state to known by a reset. but my code still hangs in some loop somewhere, and causes the system to be non-responsive.

So I need to use an external reset source that can work to monitor a pin of microcontroller, if the pin status remains constant for more than, suppose, 60 secs it will reset the controller.

In my application code I will provide pulse on the pin regularly.

Other suggestions welcome.

\$\endgroup\$
3
\$\begingroup\$

I normally prefer to determine the underlying cause of the periodic failures, especially if it's purely software related, but external power management and watchdog solutions are available. They can help remove the possibility of some software conditions causing the watchdog timer to become disabled or being 'kicked' falsely.

The first manufacturer that comes to my mind is Maxim and they have a Comparison of Internal and External Watchdog Timers application note that is worth reading. The Datasheet that covers the MAX6746-MAX6753 shows some of their parts available. The reset and watchdog delays for those parts may be changed by an external RC network.

If you have software problems you might want to consider the MAX6752 / MAX6753 that have a windowed timer. That means the watchdog will reset if the watchdog is trigerred too fast as well as too slow. If those parts don't seem suitable a search for "watchdog" on Digikey shows many results under the "PMIC - Supervisors" category that may be suitable.

\$\endgroup\$
  • \$\begingroup\$ thanks @Peter, Actually I will be debugging my software but Its already under use and I have to send new board design to manufacture, hence I want to include the external watchdog as well \$\endgroup\$ – dmSherazi Dec 8 '13 at 11:23
1
\$\begingroup\$

Most Semiconductor Manufacturers have Watchdog Timers or Supervisors available. Heck, there are some 555 timer circuits that act like a watchdog. And you could always whip up your own on a spare microcontroller. From the prices of watchdogs in the 1+ dollar per 1000 range, a 25 cent microcontroller might be cheaper.

\$\endgroup\$
1
\$\begingroup\$

Are you really sure using an external watchdog is a good idea? If the hang-ups are caused by the software, I strongly suggest fixing the software.

I have had hang-ups caused by not resetting the interrupt flag, make sure you are setting Yours correctly. Also check the reset flags with your debugger. And use the Brown-out Fuses to protect against PSU problems.

\$\endgroup\$

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.