??? 03/12/10 15:59 Read: times |
#174068 - True, but Responding to: ???'s previous message |
Richard Erlacher said:
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 Yes - that's why I said that he must ensure that his diagnostics are not cleared or overwritten at startup! Of course, it does also need some way to distinguish uninitialised junk after a "cold" start (power cycle) from retained diagnoastics after a "warm" start (no power cycle). 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. Indeed - and the provision of the diagnostic "log" can be one such preparation. ... it will prevent lockups or "freezes" if the code is properly organized.
In the case under discussion is clearly is not. Agreed (with added emphasis). 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. Good point. Modifying the code proves nothing about the initial code I don't know about "nothing" |