cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0 USB (device) not working with default settings, but works with DFU bootloader

StefanH
Associate III

I have a custom board here using the STM32G0B1CBT6 MCU. After generating a project with CubeMX (6.8.1) the USB device mode isn't recognized by the OS. Neither CDC nor HID. But as soon as I have it jump to the bootloader the DFU USB device shows up just fine (no reboot, just deconfig & jump). The clock is set to use HSI48 so that can't be it?

1 REPLY 1
StefanH
Associate III

Okay, just stubled upon the solution, posting it hoping this will be fixed in CubeMX at some point:

  1. In 'RCC' set 'CRS SYNC' to 'CRS SYNC Source USB'
  2. In 'NVIC' enable the global interrupt for USB

Source:

https://community.st.com/s/question/0D53W00000qwRCQSA2/possible-stm32g0-cube-mx-generation-error-for-usb