Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/14/06 07:32
Read: times


 
#120246 - WD with indication
Responding to: ???'s previous message
Anders Sandström said:
for your processor, it will tell you if your processor has a builtin watchdog and if it sets a bit to indicate if a reset comes from a watchdog reset.


As said above, some of the internal WD's are a crap.

The "good" WD must:

  1. be clocked from clock source independent from the mcu clock (ring oscillator) or not clocked at all - in order to facilitate reset (mainly for the attached peripherals - see the next item) when the mcu clock stops (e.g. crystal failure)
  2. if internal to mcu, upon firing, drive low the reset pin (or any other pin) - to facilitate reset (bringing into defined state) the attached peripherals
  3. once started, be stoppable only by a rather complex operation (e.g. two subsequent writes to different predetermined address) or not stoppable at all
  4. allow the designer to choose the period for feeding (i.e. the maximum reaction time)
  5. when fires, set some flipflop (register bit) to be able do distinguish between normal reset and WD reset
  6. (this is not the property of reset, but a good practice for using it) feed it in a complex way; e.g. in case of a pulsed WD feed, set the signal in a different place of the SW then clearing it; if timer interrupts are running, subject one of the edges to pass through all of the interrupts (-> all interrupts + main must run) etc. For internal reset, it means, it is not enough to clear the reset by a single write to a single address.


Most of the internal resets barely fulfill half of the above requirements - check out e.g. the mentioned AT89S5x's WD, it fulfills (for me quite surprisingly) item 2 and 3 and the last item.

Still, one can use external WD's. If you can't find a suitable IC which "tells" the reason of reset, make one yourself - use two reset circuits, one with WD and an another without WD, and catch the output of the WD-containing one into a latch, which output (and reset) is connected to the mcu. The mcu after being reset thus can "see" what was the reason of reset.

Also, a good practice is to facilitate debugging in some way - if possible, make a "core dump" upon WD reset, or log the circumstances of it somehow.

Of course, the choice of using WD at all depends on the particular application - WD itself can introduce errors (if you fail to feed it fast enough), and can hide software errors. It's a balancing act.

Jan Waclawek


List of 30 messages in thread
TopicAuthorDate
processor fault            01/01/70 00:00      
   Use Watchdog            01/01/70 00:00      
      Not necessarily            01/01/70 00:00      
         Spec of AT89S51            01/01/70 00:00      
            Still too specific            01/01/70 00:00      
   There is no one such thing!            01/01/70 00:00      
   Undefined state !            01/01/70 00:00      
      processor fault            01/01/70 00:00      
         RTFM            01/01/70 00:00      
            reset            01/01/70 00:00      
               Read the data sheet            01/01/70 00:00      
                  WD with indication            01/01/70 00:00      
                     I, too, can visualize some exotic conditions where            01/01/70 00:00      
                        to bite or not to bite            01/01/70 00:00      
                           the REAL issue            01/01/70 00:00      
                              Marketing trick            01/01/70 00:00      
                                 to be dramatic            01/01/70 00:00      
                                    It is helpful, of course.            01/01/70 00:00      
                                 let's put it this way:            01/01/70 00:00      
                           I doubt that it's 10 transistors ...            01/01/70 00:00      
                              the context            01/01/70 00:00      
                     Can you name an example of this sort?            01/01/70 00:00      
                  reset            01/01/70 00:00      
                     AT89S51 WD            01/01/70 00:00      
         How do you propose to make the processor "illumina            01/01/70 00:00      
   Software hang-up, hardware lock-up            01/01/70 00:00      
      How about redundancy?            01/01/70 00:00      
         paranoia            01/01/70 00:00      
            ... but it WILL detect a processor fault!            01/01/70 00:00      
               The ultimate misconception            01/01/70 00:00      

Back to Subject List