Hallo

...kann man mit dem Watchdog in eine Interruptschleife springen.
Das können wohl nur die kleinen Tinies, der 13er kann das auch. Bei dessen Watchdog lauert aber eine ganz versteckte Gefahr:

Zitat Zitat von Datenblatt des Tiny13 S. 37/38
Note: If the Watchdog is accidentally enabled, for example by a runaway pointer or
brown-out condition, the device will be reset and the Watchdog Timer will stay enabled.
If the code is not set up to handle the Watchdog, this might lead to an eternal loop of
time-out resets. To avoid this situation, the application software should always clear the
Watchdog System Reset Flag (WDRF) and the WDE control bit in the initialisation routine,
even if the Watchdog is not in use.
(Aus: https://www.roboternetz.de/phpBB2/ze...=336549#336549)

Den entsprechenden Hinweis habe ich im Mega32-Datenblatt noch nicht entdeckt. Vermutlich habe ich mir aber vor ein paar Tagen durch einen verirrten Zeiger möglicherweise deshalb einen Mega8 abgeschossen. Die von Atmel für den Tiny13 gemachte Empfehlung habe ich bei den Megas natürlich nicht eingebaut. (btw. wüßte ich auch gar nicht, wie man das Setzen der WD-Bits soweit vorne ins Programm bekommt, dass es ausgeführt wird, bevor der WD bellt)

Gruß

mic