This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
snippets:watchdog [2015/04/02 10:40] – ba | snippets:watchdog [2017/11/07 22:26] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 20: | Line 20: | ||
====== check if a reset was caused by the watchdog ====== | ====== check if a reset was caused by the watchdog ====== | ||
+ | The following snippet can be used to check if the last reset was caused by the watchdog.\\ | ||
{{: | {{: | ||
+ | |||
+ | The bit 14 of the reset regiter is 1, when a watchdog reset occured. | ||
+ | |||
+ | The bit is 0 when the reset was caused by other reasons. | ||
+ | |||
+ | The bit is 0 when it has been read. Hence it can only be read once per reset. | ||
+ | |||
+ | |||
====== save last programm state ====== | ====== save last programm state ====== |