Skip to content

Commit bfdd4fb

Browse files
lucbeaufilsTanguy Raufflet
authored andcommitted
clock_control: clock_stm32_ll_mp2: add wwdg1 clock support
WWDG1 clock = ((MCU clock / LSMCU div) /APB3 prescaler) Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
1 parent 4ff5a14 commit bfdd4fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/clock_control/clock_stm32_ll_mp2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ static int stm32_clock_control_get_subsys_rate(const struct device *dev,
8686
break;
8787
case STM32_CLOCK_PERIPH_I2C7:
8888
*rate = LL_RCC_GetI2CClockFreq(LL_RCC_I2C7_CLKSOURCE);
89+
case STM32_CLOCK_PERIPH_WWDG1:
90+
/* The WWDG1 clock is derived from the APB3 clock */
91+
int clock = 400000000 >> LL_RCC_Get_LSMCUDIVR();
92+
*rate = clock >> LL_RCC_GetAPB3Prescaler();
8993
break;
9094
default:
9195
return -ENOTSUP;

0 commit comments

Comments
 (0)