summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/stm32/system_stm32f0.c3
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;