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:
parent
81de9a8615
commit
f71d2c7cfc
@ -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))
|
||||
;
|
||||
|
@ -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))
|
||||
;
|
||||
|
Loading…
x
Reference in New Issue
Block a user