Skip to main content
Graduate
June 1, 2023
Question

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

  • June 1, 2023
  • 1 reply
  • 1169 views

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?

    This topic has been closed for replies.

    1 reply

    StefanHAuthor
    Graduate
    June 1, 2023

    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