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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/12/10 15:37
Read: times


 
#174065 - Certainly, but it responds to a missing "kick"
Responding to: ???'s previous message
... and one needs to think about what, if any, information that yields. l

Generally speaking, a restart will lead to a code segment that initializes the ports and the internal data memory. If specific provision is not made for exactly the purpose of determining how one has arrived at the present state, there's little to gain from writing to a RAM location since it (a) will be reinitialized on RESET, or it will contain data from the last session before RESET, assuming some defect in code or hardware has led to the watchdog or other restart. When I suggested that, for experimental purposes, one might add a flipflop and LED to indicate that one specific event had occurred, the idea was to indicate that the watchdog had NOT been allowed to time out, yet the code had run amok.

It's true that the watchdog can't "find" anything. However, one can "find" things based on the fact that the watchdog has timed out. That's only possible, though, if certain preparations have been made. I personally have little faith in internal watchdogs, even in those MCU's that tell you that it was the watchdog that caused the last restart. The main reason is that it can't help at all with debugging code unless one changes the code. The only real benefit it provides is that it will prevent lockups or "freezes" if the code is properly organized.

In the case under discussion is clearly is not.

What Kai pointed out is that RESET would disable the watchdog, and the thing would only be turned on if the code managed to get far enough to do that. Modifying the code proves nothing about the initial code, nor does it say much about any code to follow. IMHO, if the watchdog is to be of any use at all, it should be used to recover from failure of timely EXTERNALLY GENERATED events. If one is waiting for serial input, for example, and that doesn't arrive, well, after a prescribed period it would be helpful to restart. Naturally, if the serial input still doesn't arrive, the watchdog will time out again, but at least one has something one can examine.

RE


List of 55 messages in thread
TopicAuthorDate
Micro freeze            01/01/70 00:00      
   I don't understant how micro can freeze            01/01/70 00:00      
   Hang-up or lock-up?            01/01/70 00:00      
   details            01/01/70 00:00      
      You didn't answer the question            01/01/70 00:00      
      Oops, no good at all!            01/01/70 00:00      
      I think what Kai meant was /EA not EW            01/01/70 00:00      
         No, I meant the /EW pin            01/01/70 00:00      
   RST Watchdog            01/01/70 00:00      
      Add diagnostics            01/01/70 00:00      
         That's a good plan ... IF ...            01/01/70 00:00      
            Useful, but not essential            01/01/70 00:00      
               His problem, however ...            01/01/70 00:00      
                  Sorry - missing the point            01/01/70 00:00      
   more details            01/01/70 00:00      
      Don't jump to conclusions            01/01/70 00:00      
         test suggestions            01/01/70 00:00      
            Unlikely to be "random"            01/01/70 00:00      
            Assume nothing! Be very meticulous in your observations            01/01/70 00:00      
               somes evidences            01/01/70 00:00      
                  /EW not /WE!            01/01/70 00:00      
                     /EW not /WE            01/01/70 00:00      
                        that was my confusion, not yours ...            01/01/70 00:00      
                           The Watchdog does not "find" anything            01/01/70 00:00      
                              feed the dog            01/01/70 00:00      
                                 watchdog management            01/01/70 00:00      
                                 Many ideas out there . . .            01/01/70 00:00      
                              Certainly, but it responds to a missing "kick"            01/01/70 00:00      
                                 True, but            01/01/70 00:00      
                                    One simple diagnostic tool            01/01/70 00:00      
                     Oops! Begging your pardon ...            01/01/70 00:00      
   logic analyzer            01/01/70 00:00      
      Could be tricky...            01/01/70 00:00      
         someone doesn't want him to fix it            01/01/70 00:00      
            It isn't clear...            01/01/70 00:00      
         "potted" = what?            01/01/70 00:00      
            got it: "potted" = "drowned in resin"            01/01/70 00:00      
               potting SMD components            01/01/70 00:00      
   Limit Watchdog feed            01/01/70 00:00      
      I would like to write a more suitable code for this algorith            01/01/70 00:00      
         Keil example            01/01/70 00:00      
            The point is...            01/01/70 00:00      
      feed the watchdog in main loop            01/01/70 00:00      
         Non blocking loop            01/01/70 00:00      
            nothing impossible            01/01/70 00:00      
               Breaks on vacation?            01/01/70 00:00      
                  oops            01/01/70 00:00      
            Not at all!            01/01/70 00:00      
               big enought            01/01/70 00:00      
                  Both!            01/01/70 00:00      
                     re both            01/01/70 00:00      
                        You misunderstand            01/01/70 00:00      
         where to feed watchdog            01/01/70 00:00      
            You misunderstand            01/01/70 00:00      
            Watchdog kick in interrupts can often fail badly            01/01/70 00:00      

Back to Subject List