aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'spaghetti-monster/fsm-wdt.c')
-rw-r--r--spaghetti-monster/fsm-wdt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/spaghetti-monster/fsm-wdt.c b/spaghetti-monster/fsm-wdt.c
index 847c7fd..7c25e9f 100644
--- a/spaghetti-monster/fsm-wdt.c
+++ b/spaghetti-monster/fsm-wdt.c
@@ -123,9 +123,10 @@ void WDT_inner() {
return; // no sleep LVP needed if nothing drains power while off
#else
// stop here, usually... but proceed often enough for sleep LVP to work
- if (0 != (ticks_since_last & 0x3f)) return;
+ if (0 != (ticks_since_last & 0x07)) return;
adc_trigger = 0; // make sure a measurement will happen
+ adc_active_now = 1; // use ADC noise reduction sleep mode
ADC_on(); // enable ADC voltage measurement functions temporarily
#endif
}