From 900757c3e266df2e7d6a7d11f806f0d053aaa67e Mon Sep 17 00:00:00 2001 From: Yong Cong Sin Date: Thu, 30 Dec 2021 21:09:53 +0800 Subject: [PATCH] drivers: watchdog: STM32G0X: clock DBGMCU before configuring Enable the clock for the DBGMCU peripherals so that it can be configured. Signed-off-by: Yong Cong Sin --- drivers/watchdog/wdt_iwdg_stm32.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/watchdog/wdt_iwdg_stm32.c b/drivers/watchdog/wdt_iwdg_stm32.c index b0bd45d26c..3ab0fd9788 100644 --- a/drivers/watchdog/wdt_iwdg_stm32.c +++ b/drivers/watchdog/wdt_iwdg_stm32.c @@ -83,6 +83,8 @@ static int iwdg_stm32_setup(const struct device *dev, uint8_t options) if (options & WDT_OPT_PAUSE_HALTED_BY_DBG) { #if defined(CONFIG_SOC_SERIES_STM32F0X) LL_APB1_GRP2_EnableClock(LL_APB1_GRP2_PERIPH_DBGMCU); +#elif defined(CONFIG_SOC_SERIES_STM32G0X) + LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_DBGMCU); #elif defined(CONFIG_SOC_SERIES_STM32L0X) LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_DBGMCU); #endif