Skip to content

Commit c48422f

Browse files
katyofabiobaltieri
authored andcommitted
drivers: clock_control: stm32f3: Enable PWR clock to access BDCR and PWR_CR
BDCR and PWR_CR could be required for LSE or RTC for instance. Enable it here as for now, no sophisticated PM handling is available on F0 and F3 series. Fixes #56449 Fixup for #56505 Signed-off-by: Kay P <[email protected]>
1 parent e2c3931 commit c48422f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/clock_control/clock_stm32f0_f3.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,15 @@ uint32_t get_pllout_frequency(void)
144144
*/
145145
void config_enable_default_clocks(void)
146146
{
147+
/* Enable PWR clock, required to access BDCR and PWR_CR */
148+
LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR);
149+
147150
#ifndef CONFIG_SOC_SERIES_STM32F3X
148151
#if defined(CONFIG_EXTI_STM32) || defined(CONFIG_USB_DC_STM32)
149152
/* Enable System Configuration Controller clock. */
150153
LL_APB1_GRP2_EnableClock(LL_APB1_GRP2_PERIPH_SYSCFG);
151154
#endif
152155
#else
153-
/* Enable PWR clock, required to access BDCR */
154-
LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR);
155-
156156
#if defined(CONFIG_USB_DC_STM32) && defined(SYSCFG_CFGR1_USB_IT_RMP)
157157
/* Enable System Configuration Controller clock. */
158158
/* SYSCFG is required to remap IRQ to avoid conflicts with CAN */

0 commit comments

Comments
 (0)