From bbdd0b68ee36d89862b61ea150216d53871e4958 Mon Sep 17 00:00:00 2001 From: Richard Meadows Date: Thu, 16 Jul 2015 20:32:18 +0000 Subject: [PATCH] Added note about `MAXIDLE` values, set to conservative value of 0xFFFF --- firmware/Pre-flight.md | 6 ++++++ firmware/inc/watchdog.h | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/firmware/Pre-flight.md b/firmware/Pre-flight.md index 09aee9b..659d39d 100644 --- a/firmware/Pre-flight.md +++ b/firmware/Pre-flight.md @@ -6,3 +6,9 @@ - `APRS_ENABLE` is set if APRS is to be used on the flight - `APRS_USE_GEOFENCE` is set - `DEBUG_USE_INTWATCHDOG` can be disabled during flight. This saves some power + +- In `watchdog.h` + - Set the various `MAXIDLE` values to values determined during + testing. These define how many sleep cycles are permitted in that + state before we stop kicking the watchdog. 0xFFFF seems like a + good conservative value, but you may want to be more agressive. diff --git a/firmware/inc/watchdog.h b/firmware/inc/watchdog.h index a634479..a8c8821 100644 --- a/firmware/inc/watchdog.h +++ b/firmware/inc/watchdog.h @@ -42,9 +42,9 @@ typedef enum { * Define how many iterations these loops are permitted before a reset * is triggered. */ -#define MAXIDLE_WAIT_FOR_GPS 0xFFFFFFFE -#define MAXIDLE_WHILE_TELEMETRY_ACTIVE 0xFFFFFFFE -#define MAXIDLE_WAIT_FOR_NEXT_TELEMETRY 0xFFFFFFFE +#define MAXIDLE_WAIT_FOR_GPS 0x0000FFFF +#define MAXIDLE_WHILE_TELEMETRY_ACTIVE 0x0000FFFF +#define MAXIDLE_WAIT_FOR_NEXT_TELEMETRY 0x0000FFFF struct idle_counter { uint32_t wait_for_gps;