stm32/system_stm32f0: Enable PWR clock on startup.

To be consistent with how F4/F7/H7/L4 works in system_stm32.c.  The power
control peripheral is needed at least for the RTC.
This commit is contained in:
Damien George 2019-04-18 15:36:59 +10:00
parent eb1f81b209
commit f1774fa049

View File

@ -129,6 +129,9 @@ void SystemInit(void) {
}
void SystemClock_Config(void) {
// Enable power control peripheral
__HAL_RCC_PWR_CLK_ENABLE();
// Set flash latency to 1 because SYSCLK > 24MHz
FLASH->ACR = (FLASH->ACR & ~0x7) | 0x1;