From c15953acee687e9f8ba7bb560710a3a4cb997e3a Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Mon, 17 Feb 2025 10:52:06 +0800 Subject: [PATCH] fix(lpwdt): P4 LP-WDT now takes into account the EFUSE_WDT_DELAY forthe timeout --- components/hal/esp32p4/include/hal/lpwdt_ll.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/hal/esp32p4/include/hal/lpwdt_ll.h b/components/hal/esp32p4/include/hal/lpwdt_ll.h index af2078acd7..e19b9ba0f8 100644 --- a/components/hal/esp32p4/include/hal/lpwdt_ll.h +++ b/components/hal/esp32p4/include/hal/lpwdt_ll.h @@ -121,7 +121,8 @@ lpwdt_ll_config_stage(lp_wdt_dev_t *hw, wdt_stage_t stage, uint32_t timeout_tick switch (stage) { case WDT_STAGE0: hw->config0.wdt_stg0 = behavior; - hw->config1.wdt_stg0_hold = timeout_ticks; + //Account of implicty multiplier applied to stage 0 timeout tick config value + hw->config1.wdt_stg0_hold = timeout_ticks >> (1 + REG_GET_FIELD(EFUSE_RD_REPEAT_DATA1_REG, EFUSE_WDT_DELAY_SEL)); break; case WDT_STAGE1: hw->config0.wdt_stg1 = behavior;