1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

cpu/stm32gx: disable hsi only if unused

This commit is contained in:
Alexandre Abadie 2020-09-03 16:32:11 +02:00
parent 20894e47a6
commit 2d603269dd
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -239,8 +239,11 @@ void stmclk_init_sysclk(void)
#endif
}
stmclk_disable_hsi();
irq_restore(is);
if (!IS_ACTIVE(CONFIG_USE_CLOCK_HSI) ||
(IS_ACTIVE(CONFIG_USE_CLOCK_PLL) && IS_ACTIVE(CONFIG_BOARD_HAS_HSE))) {
/* Disable HSI only if not used */
stmclk_disable_hsi();
}
#if defined(CPU_FAM_STM32G4)
if (IS_USED(MODULE_PERIPH_HWRNG)) {
@ -260,4 +263,6 @@ void stmclk_init_sysclk(void)
}
}
#endif
irq_restore(is);
}