If you don't have an initial value set for a variable (in RAM), it
should
retain it's value through a reset. In other words:
uint8_t some_variable;
uint8_t some_other_variable = 0x80 ;
some_variable, while undefined initially, will hold whatever value it
had
before WatchDog reset, while some_other_variable will *always* get
reset
to 0x80;
Keith
On Tue, 3 Feb 2004, Simon Han wrote:
Hi all,
Does anyone figure out a way to preserve state during watchdog reset?
I am using watchdog to monitor for some of my functions. Before and
after function calls, I do a watchdog reset. Now the problem is how I
can figure out which function caused the watchdog timeout. I was
thinking to store this information in EEPROM, but the delay of doing
this is way too high. Will it be possible to assume certain registers
are not reset?
Any suggestions?
Simon
_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list