avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] known issues with Mega168 and wdt.h?


From: Steve Franks
Subject: Re: [avr-chat] known issues with Mega168 and wdt.h?
Date: Mon, 1 May 2006 14:11:33 -0700

In addition (and this is, well, a bit hidden in the docs, and comes
out rather unexpectedly at first), the WDRF bit in MCU[C]SR, while
active (indicating a watchdog reset happened), prevents the watchdog
from being disabled.  Thus, a simple wdt_disable() is not sufficient
after a watchdog reset.  You *must* clear WDRF at some point before
that.

Ah, that's it.  wdt_disable() at the top of main() on the old
architecture is sufficient.  I guess *reading* wdt.h instead of
*skimming* wdt.h would be advised.  In hindshight I realised I opened
wdt.h mostly to make sure #ifdef Mega168 was in it and glossed over
the commentary.

Thanks,
Steve




reply via email to

[Prev in Thread] Current Thread [Next in Thread]