From b612044a93c90adb25a4a34c82991d50ceff7f6c Mon Sep 17 00:00:00 2001 From: Ioannis Damigos Date: Wed, 8 Jan 2025 15:28:01 +0200 Subject: [PATCH] smartbond_timer: If PM is set, take into account watchdog for timeout ticks If PM is enabled, adjust timeout ticks according to watchdog expiration. Signed-off-by: Ioannis Damigos --- drivers/timer/smartbond_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/timer/smartbond_timer.c b/drivers/timer/smartbond_timer.c index 34af8b7caf7..0e4e0a021fa 100644 --- a/drivers/timer/smartbond_timer.c +++ b/drivers/timer/smartbond_timer.c @@ -103,7 +103,7 @@ void sys_clock_set_timeout(int32_t ticks, bool idle) * as soon as system is awaken. Following code makes sure that * system never goes to sleep for longer time that watchdog reload value. */ - if (!IS_ENABLED(CONFIG_WDT_SMARTBOND) && IS_ENABLED(CONFIG_PM)) { + if (IS_ENABLED(CONFIG_PM)) { uint32_t watchdog_expire_ticks; if (CRG_TOP->CLK_RCX_REG & CRG_TOP_CLK_RCX_REG_RCX_ENABLE_Msk) {