Missing initialiser for PLLQ USB clock source in code generated by CubeMX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-09-20 5:03 AM
CubeMX version: v6.6.1 MacOS
MCU: STM32G0B1CCUx
Issue:
When selecting PLLQ driven from HSE in USB Clock Mux in CubeMX and choosing LL as RCC driver, the clock source for USB is never actually set in the generated code.
This line is missing in the SystemClock_Config function:
LL_RCC_SetUSBClockSource(LL_RCC_USB_CLKSOURCE_PLL);
When selecting HSI48 as USB clock source, this explicit setter is not necessary for some reason.
- Labels:
-
Bug-report
-
RCC
-
STM32CubeMX
-
STM32G0 Series
-
USB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-09-27 8:36 AM
Hello @RWarh.1 ,
Have you check in the stm32g0xx_hal_msp.c ?
There should be a function named void HAL_HCD_MspInit(HCD_HandleTypeDef* hhcd) with this function inside :
LL_RCC_SetUSBClockSource(LL_RCC_USB_CLKSOURCE_PLL);
Best regards,
Simon
