mirror of https://github.com/Desuuuu/klipper.git
stm32: Only use the HSI48 clock when doing "usb clock recovery"
The HSI48 clock on the stm32f042 isn't as accurate as the main HSI clock. So, only use the HSI48 clock when using USB to synchronize that clock. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
6bbfc869a1
commit
39a04eac5f
|
@ -211,7 +211,8 @@ armcm_main(void)
|
||||||
FLASH->ACR = (1 << FLASH_ACR_LATENCY_Pos) | FLASH_ACR_PRFTBE;
|
FLASH->ACR = (1 << FLASH_ACR_LATENCY_Pos) | FLASH_ACR_PRFTBE;
|
||||||
|
|
||||||
// Configure main clock
|
// Configure main clock
|
||||||
if (CONFIG_MACH_STM32F042 && CONFIG_STM32_CLOCK_REF_INTERNAL)
|
if (CONFIG_MACH_STM32F042 && CONFIG_STM32_CLOCK_REF_INTERNAL
|
||||||
|
&& CONFIG_USBSERIAL)
|
||||||
hsi48_setup();
|
hsi48_setup();
|
||||||
else
|
else
|
||||||
pll_setup();
|
pll_setup();
|
||||||
|
|
Loading…
Reference in New Issue