HW Watchdog and SW watchdog interface

- Added Hw watchdog periodic kick calls software watchdog is_alive check
pull/10645/head
Rajkumar Kanagaraj 2019-01-18 17:02:17 +00:00 committed by Filip Jagodzinski
parent bcea865db2
commit 3ea9521408
2 changed files with 3 additions and 0 deletions

View File

@ -24,6 +24,7 @@ static bool is_watchdog_started = false; //boolean to control watchdog start and
MBED_STATIC_ASSERT((HW_WATCHDOG_TIMEOUT >= 0),"Timeout must be greater than zero"); MBED_STATIC_ASSERT((HW_WATCHDOG_TIMEOUT >= 0),"Timeout must be greater than zero");
Watchdog watchdog(0,"Platform Watchdog");
/** Create singleton instance of LowPowerTicker for watchdog periodic call back of kick. /** Create singleton instance of LowPowerTicker for watchdog periodic call back of kick.
*/ */
@ -44,6 +45,7 @@ static void mbed_wdog_manager_kick()
{ {
core_util_critical_section_enter(); core_util_critical_section_enter();
hal_watchdog_kick(); hal_watchdog_kick();
watchdog.is_alive();
core_util_critical_section_exit(); core_util_critical_section_exit();
} }

View File

@ -25,6 +25,7 @@
#include "mbed.h" #include "mbed.h"
#include "platform/mbed_critical.h" #include "platform/mbed_critical.h"
#include "LowPowerTicker.h" #include "LowPowerTicker.h"
#include "Watchdog.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {