From b80d2f77060f15ed955cd00776c201391a401a83 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 28 May 2020 15:53:30 -0400 Subject: [PATCH] stm32: Fix typo causing internal clock to always be used on stm32f042 Reported by Pontus Borg. Signed-off-by: Kevin O'Connor --- src/stm32/stm32f0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stm32/stm32f0.c b/src/stm32/stm32f0.c index 4153f5265..9c5369156 100644 --- a/src/stm32/stm32f0.c +++ b/src/stm32/stm32f0.c @@ -211,7 +211,7 @@ armcm_main(void) FLASH->ACR = (1 << FLASH_ACR_LATENCY_Pos) | FLASH_ACR_PRFTBE; // Configure main clock - if (CONFIG_MACH_STM32F042 || CONFIG_STM32_CLOCK_REF_INTERNAL) + if (CONFIG_MACH_STM32F042 && CONFIG_STM32_CLOCK_REF_INTERNAL) hsi48_setup(); else pll_setup();