summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
90ffd12)
Fortunately, WDT reset can be combined with WDT interrupt. The procedure
is to reenable WDIE each time, or the next WDT timeout will be reset.
- WDTCR = _BV(WDIE) | _BV(WDP1); // interrupt mode, 64 ms
+ wdt_enable(WDTO_60MS);
+ WDTCR |= _BV(WDIE); // interrupt mode, 64 ms
if ((jiffies & 0x7FF) == 0)
ambient_log_min_max();
if ((jiffies & 0x7FF) == 0)
ambient_log_min_max();
+
+ WDTCR |= _BV(WDIE); // avoid WDT reset next time