Skip to content

Commit c983691

Browse files
committed
drivers/clock_control: stm32h7: Add support for CKPER clock mux
Add support for CKPER clock mux. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent c2c6ac0 commit c983691

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/clock_control/clock_stm32_ll_h7.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ static int enabled_clock(uint32_t src_clk)
327327
{
328328

329329
if ((src_clk == STM32_SRC_SYSCLK) ||
330+
((src_clk == STM32_SRC_CKPER) && IS_ENABLED(STM32_CKPER_ENABLED)) ||
330331
((src_clk == STM32_SRC_HSE) && IS_ENABLED(STM32_HSE_ENABLED)) ||
331332
((src_clk == STM32_SRC_HSI_KER) && IS_ENABLED(STM32_HSI_ENABLED)) ||
332333
((src_clk == STM32_SRC_CSI_KER) && IS_ENABLED(STM32_CSI_ENABLED)) ||
@@ -476,6 +477,11 @@ static int stm32_clock_control_get_subsys_rate(const struct device *clock,
476477
case STM32_SRC_SYSCLK:
477478
*rate = get_hclk_frequency();
478479
break;
480+
#if defined(STM32_CKPER_ENABLED)
481+
case STM32_SRC_CKPER:
482+
*rate = LL_RCC_GetCLKPClockFreq(LL_RCC_CLKP_CLKSOURCE);
483+
break;
484+
#endif /* STM32_CKPER_ENABLED */
479485
#if defined(STM32_HSE_ENABLED)
480486
case STM32_SRC_HSE:
481487
*rate = STM32_HSE_FREQ;

0 commit comments

Comments
 (0)