diff --git a/drivers/VirtualWatchdog.cpp b/drivers/VirtualWatchdog.cpp index afab4a4fc5..04b4ae428a 100644 --- a/drivers/VirtualWatchdog.cpp +++ b/drivers/VirtualWatchdog.cpp @@ -36,6 +36,7 @@ VirtualWatchdog::VirtualWatchdog(uint32_t timeout, const char *const str): _name if (watchdog.is_running() == true) { MBED_MAKE_ERROR(MBED_MODULE_DRIVER_WATCHDOG, MBED_ERROR_INITIALIZATION_FAILED); } + // we use default hw timeout provided by config watchdog.start(&VirtualWatchdog::process, Watchdog::watchdog_timeout); _is_hw_watchdog_running = true; } diff --git a/drivers/VirtualWatchdog.h b/drivers/VirtualWatchdog.h index cb67720ce4..54f637ea3b 100644 --- a/drivers/VirtualWatchdog.h +++ b/drivers/VirtualWatchdog.h @@ -54,6 +54,9 @@ class VirtualWatchdog { public: /** Constructor configured with timeout and name for this software watchdog instance. + * + * We start hardware watchdog on the first run. This set-up uses default watchdog timeout set via config value + * MBED_CONF_TARGET_WATCHDOG_TIMEOUT. * */ VirtualWatchdog(uint32_t timeout = 1, const char *const str = NULL);