diff --git a/drivers/timers/Kconfig b/drivers/timers/Kconfig index 877827baf8..8fa06cb4b7 100644 --- a/drivers/timers/Kconfig +++ b/drivers/timers/Kconfig @@ -400,13 +400,12 @@ if !WATCHDOG_AUTOMONITOR_BY_CAPTURE && !WATCHDOG_AUTOMONITOR_BY_IDLE config WATCHDOG_AUTOMONITOR_PING_INTERVAL int "Auto-monitor keep a live interval" - default WATCHDOG_AUTOMONITOR_TIMEOUT - range 1 WATCHDOG_AUTOMONITOR_TIMEOUT + range 0 WATCHDOG_AUTOMONITOR_TIMEOUT + default 0 ---help--- - If the interval is same as WATCHDOG_AUTOMONITOR_TIMEOUT - the default value will change to (WATCHDOG_AUTOMONITOR_TIMEOUT / 2). - This interval will only be used by auto-monitor by Worker callback - or by Timer callback. + If the interval is 0, it will change to (WATCHDOG_AUTOMONITOR_TIMEOUT / 2). + This interval will only be used by auto-monitor in oneshot, timer, wdog or + worker case. endif # !WATCHDOG_AUTOMONITOR_BY_CAPTURE && !WATCHDOG_AUTOMONITOR_BY_IDLE diff --git a/drivers/timers/watchdog.c b/drivers/timers/watchdog.c index d8e69d172f..7d03da9896 100644 --- a/drivers/timers/watchdog.c +++ b/drivers/timers/watchdog.c @@ -53,8 +53,7 @@ (CONFIG_WATCHDOG_AUTOMONITOR_TIMEOUT * MSEC_PER_SEC) # if !defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_CAPTURE) && \ !defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_IDLE) -# if CONFIG_WATCHDOG_AUTOMONITOR_TIMEOUT == \ - CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL +# if CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL == 0 # define WATCHDOG_AUTOMONITOR_PING_INTERVAL \ (CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL / 2) # else