summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2014-12-10 18:06:33 +0100
committerMichael Buesch <m@bues.ch>2014-12-10 18:06:33 +0100
commit394d5d20d2d6c16988d9fc6b140283699691ea9c (patch)
tree2aa35a054f57b1035f9ed75b67f7e637f41799eb
parentf26587571f5d63cd1084aa5fd190b7cc7a52edd3 (diff)
downloadmoistcontrol-394d5d20d2d6c16988d9fc6b140283699691ea9c.zip
moistcontrol-394d5d20d2d6c16988d9fc6b140283699691ea9c.tar.xz
Reduce watchdog timeout for main loop
Signed-off-by: Michael Buesch <m@bues.ch>
-rw-r--r--firmware/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/main.c b/firmware/main.c
index a45dd40..5d780d0 100644
--- a/firmware/main.c
+++ b/firmware/main.c
@@ -424,7 +424,7 @@ int main(void)
irq_disable();
- wdt_enable(WDTO_1S);
+ wdt_enable(WDTO_2S);
/* Initialize the system. */
onoffswitch_init();
@@ -439,7 +439,8 @@ int main(void)
/* Sanity checks. */
build_assert(sizeof(struct msg_payload) <= COMM_PAYLOAD_LEN);
- /* Enable interrupts and enter the mainloop. */
+ /* Enable watchdog, interrupts and enter the mainloop. */
+ wdt_enable(WDTO_250MS);
irq_enable();
while (1) {
/* Poke the watchdog. */
bues.ch cgit interface