diff --git a/firmware/src/watchdog.c b/firmware/src/watchdog.c index 79de96a..384aad4 100644 --- a/firmware/src/watchdog.c +++ b/firmware/src/watchdog.c @@ -39,13 +39,17 @@ struct idle_counter idle_count, idle_count_max; idle_wait_t last_idle_t = IDLE_NONE; -#define kick_external_watchdog() port_pin_toggle_output_level(WDT_WDI_PIN) +#define kick_external_watchdog() do { port_pin_set_output_level(WDT_WDI_PIN, 1); \ + __NOP(); /* > 50ns high */ \ + port_pin_set_output_level(WDT_WDI_PIN, 0); \ + } while(1) /** * Increments the specified idle counter */ void increment_idle_counter(idle_wait_t idle_t) { + switch (idle_t) { case IDLE_TELEMETRY_ACTIVE: idle_count.while_telemetry_active++;