From f1d80b3f02ad9af09ae959474cefce507c4106b4 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 8 May 2020 12:33:36 +0100 Subject: [PATCH] drivers: clock_control: stm32: Enable SYSCFG on STM32L0 The entropy driver needs to use the SYSCFG block to control VREF on the STM32L0. Clock the block if the entropy driver has been enabled. Signed-off-by: Andreas Sandberg --- drivers/clock_control/clock_stm32l0_l1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clock_control/clock_stm32l0_l1.c b/drivers/clock_control/clock_stm32l0_l1.c index 2915bb6a03b..a62c743341d 100644 --- a/drivers/clock_control/clock_stm32l0_l1.c +++ b/drivers/clock_control/clock_stm32l0_l1.c @@ -38,7 +38,9 @@ void config_pll_init(LL_UTILS_PLLInitTypeDef *pllinit) */ void config_enable_default_clocks(void) { -#if defined(CONFIG_EXTI_STM32) || defined(CONFIG_USB_DC_STM32) +#if defined(CONFIG_EXTI_STM32) || defined(CONFIG_USB_DC_STM32) || \ + (defined(CONFIG_SOC_SERIES_STM32L0X) && \ + defined(CONFIG_ENTROPY_STM32_RNG)) /* Enable System Configuration Controller clock. */ LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_SYSCFG); #endif