You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
can have unexpected wake (depending on how app is coded), so in case of using SLEEP_FOREVER parameter calling powerDown() the function should disable the watchdog (just in case, and it does not hurt because this is exactly what we want to do)
if (period == SLEEP_FOREVER)
{
// we don't want to be waked by the watchdog, so be // sure to disable it by changing the config// This has been tried and works
WDTCSR = _BV(WDCE) | _BV(WDE);
WDTCSR = 0;
// but may be just following also// wdt_disable();
}
else
{
wdt_enable(period);
WDTCSR |= (1 << WDIE);
}
The text was updated successfully, but these errors were encountered:
This is a bad idea, because if the programmer DOES want the watchdog working as a watchdog (not a timer) he will wonder why it keeps turning off, and will have to edit the library
If for any reason (for example the application start/stop playing with watchdog while not in sleep mode) then a call to
can have unexpected wake (depending on how app is coded), so in case of using
SLEEP_FOREVER
parameter callingpowerDown()
the function should disable the watchdog (just in case, and it does not hurt because this is exactly what we want to do)should becomes something like that
The text was updated successfully, but these errors were encountered: