stm32: Fix setting USB clock with USB to CANbus mode on stm32g4/stm32l4

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor committed 2024-08-29 22:31:13 -04:00
1 parent 81de9a8615
commit f71d2c7cfc
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -104,7 +104,7 @@ enable_clock_stm32g4(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))
;
+1 -1
View File
@@ -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))
;