Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

RE: [AVR-Chat] Re:Watchdog and sleep modes

2004-04-27 by Larry Barello

Yep. This is the most effective way to do a hard reset... The registers and SRAM shouldn't be affected, but if you are using C the startup runtime will clear everything out for you. The hardware registers (e.g. I/O & peripherals) will be wiped out.
You might get away with a bit of assembly code, intercept the reset vector (can't help you with how...) check to see the reset source and skip the C-runtime init code if it were watchdog. However, there would be a host of issues to resolve: which C variables need initializing, and which you want to save, etc. Not a trivial problem.
-----Original Message-----
From: jamie pollock

I am using the watchdog to come out of sleep mode. The watchdog seems to work fine ( i can turn it off sucessfully and re-enable it). My trouble is that when the watchdog resets it doesnot resume after the sleep. The controller begins at the reset vector and clears my registers. Is this what it is supposed to do? I think the documentation states that the registers would be intact.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.