diff options
author | Damien George <damien.p.george@gmail.com> | 2019-04-18 15:36:59 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-04-18 15:36:59 +1000 |
commit | f1774fa049afc6f35192ff0f60ac5486cd9d3b08 (patch) | |
tree | 3324f04d0b18e38e5e52ff916fdc7068183b890f | |
parent | eb1f81b209f0d13059ebb4fa2ed105a0d6a4b0d0 (diff) |
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.
-rw-r--r-- | ports/stm32/system_stm32f0.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ports/stm32/system_stm32f0.c b/ports/stm32/system_stm32f0.c index 9d4b06e56..afabdb667 100644 --- a/ports/stm32/system_stm32f0.c +++ b/ports/stm32/system_stm32f0.c @@ -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; |