From f71d2c7cfc97d3e7964403463e513ac7f9b90050 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 29 Aug 2024 22:31:13 -0400 Subject: stm32: Fix setting USB clock with USB to CANbus mode on stm32g4/stm32l4 Signed-off-by: Kevin O'Connor --- src/stm32/stm32l4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stm32/stm32l4.c') diff --git a/src/stm32/stm32l4.c b/src/stm32/stm32l4.c index 7db15fff..ae099d6b 100644 --- a/src/stm32/stm32l4.c +++ b/src/stm32/stm32l4.c @@ -96,7 +96,7 @@ enable_clock_stm32l4(void) RCC->CR |= RCC_CR_PLLON; // Enable 48Mhz USB clock using clock recovery - if (CONFIG_USBSERIAL) { + if (CONFIG_USB) { RCC->CRRCR |= RCC_CRRCR_HSI48ON; while (!(RCC->CRRCR & RCC_CRRCR_HSI48RDY)) ; -- cgit v1.2.3-70-g09d2