feed wdt in bootloader if enabled. Since it is impossible to disable wdt
This commit is contained in:
@ -27,6 +27,7 @@
|
||||
#include "app_scheduler.h"
|
||||
|
||||
#include "nrfx.h"
|
||||
#include "nrf_wdt.h"
|
||||
#include "app_timer.h"
|
||||
|
||||
#include "boards.h"
|
||||
@ -116,6 +117,13 @@ static void wait_for_events(void)
|
||||
// uint32_t err_code = sd_app_evt_wait();
|
||||
// APP_ERROR_CHECK(err_code);
|
||||
|
||||
// Feed all Watchdog just in case application enable it
|
||||
// WDT cannot be disabled once started. It even last through soft reset (NVIC Reset)
|
||||
if ( nrf_wdt_started() )
|
||||
{
|
||||
for (uint8_t i=0; i<8; i++) nrf_wdt_reload_request_set(i);
|
||||
}
|
||||
|
||||
// Event received. Process it from the scheduler.
|
||||
app_sched_execute();
|
||||
|
||||
|
Reference in New Issue
Block a user