diff --git a/flight/pios/common/pios_flashfs_logfs.c b/flight/pios/common/pios_flashfs_logfs.c index ed6b95131..b2c106473 100644 --- a/flight/pios/common/pios_flashfs_logfs.c +++ b/flight/pios/common/pios_flashfs_logfs.c @@ -32,7 +32,7 @@ #include #include #include - +#include #include "pios_flashfs_logfs_priv.h" /* @@ -193,6 +193,9 @@ static int32_t logfs_erase_all_arenas() for (uint16_t arena = 0; arena < num_arenas; arena++) { #ifdef PIOS_LED_HEARTBEAT PIOS_LED_Toggle(PIOS_LED_HEARTBEAT); +#endif +#ifdef PIOS_INCLUDE_WDG + PIOS_WDG_Clear(); #endif if (logfs_erase_arena(arena) != 0) return -1; @@ -307,6 +310,10 @@ static int32_t logfs_find_active_arena() /* This is the first active arena */ return arena_id; } +#ifdef PIOS_INCLUDE_WDG + PIOS_WDG_Clear(); +#endif + } /* Didn't find an active arena */ @@ -584,6 +591,9 @@ static int32_t logfs_garbage_collect (void) { } dst_slot_id++; } +#ifdef PIOS_INCLUDE_WDG + PIOS_WDG_Clear(); +#endif } /* Activate the destination arena */ @@ -640,6 +650,9 @@ static int16_t logfs_object_find_next (struct slot_header * slot_hdr, uint16_t * *curr_slot = slot_id; return 0; } +#ifdef PIOS_INCLUDE_WDG + PIOS_WDG_Clear(); +#endif } /* No matching entry was found */ diff --git a/flight/targets/boards/revolution/firmware/pios_board.c b/flight/targets/boards/revolution/firmware/pios_board.c index febdf32d2..d4feaae4e 100644 --- a/flight/targets/boards/revolution/firmware/pios_board.c +++ b/flight/targets/boards/revolution/firmware/pios_board.c @@ -375,7 +375,7 @@ void PIOS_Board_Init(void) { PIOS_IAP_WriteBootCmd(1,0); PIOS_IAP_WriteBootCmd(2,0); } - + PIOS_WDG_Init(); /* Initialize UAVObject libraries */ EventDispatcherInitialize(); UAVObjInitialize();