aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-standby.c
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-11-20 15:33:43 -0700
committerSelene ToyKeeper2019-11-20 15:33:43 -0700
commit10bd9162c3033f993b98e3c5b96cb95b9205d20e (patch)
treeeded168b91976d43e4f4c15355767646aa2c8653 /spaghetti-monster/fsm-standby.c
parentmerged fsm updates / irq-refactor branch, to get more stable voltage readings (diff)
parentmerged tiny fix from irq-refactor branch (fixed spurious wakeup) (diff)
downloadanduril-10bd9162c3033f993b98e3c5b96cb95b9205d20e.tar.gz
anduril-10bd9162c3033f993b98e3c5b96cb95b9205d20e.tar.bz2
anduril-10bd9162c3033f993b98e3c5b96cb95b9205d20e.zip
merged more updates from fsm / irq-refactor branches, finishing up previous changes
Diffstat (limited to 'spaghetti-monster/fsm-standby.c')
-rw-r--r--spaghetti-monster/fsm-standby.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/spaghetti-monster/fsm-standby.c b/spaghetti-monster/fsm-standby.c
index 4124d92..9398f52 100644
--- a/spaghetti-monster/fsm-standby.c
+++ b/spaghetti-monster/fsm-standby.c
@@ -54,6 +54,7 @@ void sleep_until_eswitch_pressed()
#else
go_to_standby = 0;
#endif
+
// configure sleep mode
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
@@ -89,7 +90,10 @@ void sleep_until_eswitch_pressed()
#endif
// go back to normal running mode
- //PCINT_on(); // should be on already
+ // PCINT not needed any more, and can cause problems if on
+ // (occasional reboots on wakeup-by-button-press)
+ PCINT_off();
+ // restore normal awake-mode interrupts
ADC_on();
WDT_on();
}