Skip to content

Commit 630549c

Browse files
lucbeaufilsTanguy Raufflet
authored andcommitted
drivers: watchdog: wdt_iwdg_stm32.c: freeze watchdog in debug mode for mp2x SoCs
The IWDG4 is on the APB3 bus on STM32MP2x SoCs. When the system is in debug mode, the watchdog should be frozen to prevent it from expiring and resetting the system during debugging sessions. Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
1 parent 30b4007 commit 630549c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/watchdog/wdt_iwdg_stm32.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ static int iwdg_stm32_setup(const struct device *dev, uint8_t options)
105105
LL_DBGMCU_APB4_GRP1_FreezePeriph(LL_DBGMCU_APB4_GRP1_IWDG1_STOP);
106106
#elif defined(CONFIG_SOC_SERIES_STM32H7RSX)
107107
LL_DBGMCU_APB4_GRP1_FreezePeriph(LL_DBGMCU_APB4_GRP1_IWDG_STOP);
108+
#elif defined(CONFIG_SOC_SERIES_STM32MP2X)
109+
LL_DBGMCU_APB3_GRP1_FreezePeriph(LL_DBGMCU_APB3_GRP1_IWDG4_STOP);
108110
#else
109111
LL_DBGMCU_APB1_GRP1_FreezePeriph(LL_DBGMCU_APB1_GRP1_IWDG_STOP);
110112
#endif

0 commit comments

Comments
 (0)