Skip to main content
Graduate
July 8, 2025
Solved

Programming the STM32G030K6T6 via USB (DFU)

  • July 8, 2025
  • 1 reply
  • 582 views

Hi,

I originally planned to program my STM32G030K6T6 via USB using the DFU bootloader, but the datasheet doesn’t mention USB_DM/USB_DP, and STM32CubeIDE’s .ioc file shows no USB option under Connectivity, so I believe USB DFU isn’t supported. What’s the best and easiest way to program this MCU, considering future mass production? I’m looking for a reliable, scalable method.

Thank you for the assistance!

STM32G0 Series Bootloader

    This topic has been closed for replies.
    Best answer by TDK

    SWD is typically the best way to program as it's always active.

    USB is not available on STM32G030K6T6. You can use the UART bootloaders. See AN2606 for supported pins. You can use the bootloader but you will need to ensure the bootloader is active. It'll start when the chip is empty, but after that, you will need to jump into it or program option bytes appropriately.

    1 reply

    TDKAnswer
    Super User
    July 8, 2025

    SWD is typically the best way to program as it's always active.

    USB is not available on STM32G030K6T6. You can use the UART bootloaders. See AN2606 for supported pins. You can use the bootloader but you will need to ensure the bootloader is active. It'll start when the chip is empty, but after that, you will need to jump into it or program option bytes appropriately.

    MattH2Author
    Graduate
    August 4, 2025

    I plan to mass produce the product I'm currently designing. The board itself is very simple, it reads sensor data from an IMU and provides basic feedback to the user via a strip of NeoPixel LEDs. Once I’ve ironed out any bugs, I assume that having only an SWD (Serial Wire Debug) interface on the production boards will be sufficient. That said, I’d like to confirm: will a single SWD interface be adequate for both programming and the relatively basic debugging required, even on the initial versions of the board?

    Super User
    August 4, 2025

    An SWD interfaces provides programming and debugging capabilities and should be all you need. Only SWDIO/SWCLK/GND need connected. The SWO pin is optional and generally not used on simple projects.

    You mention:

    > Once I’ve ironed out any bugs, I assume that having only an SWD (Serial Wire Debug) interface on the production boards will be sufficient.

    By the work "only" it implies have something else on the development (non-production) boards, but SWD is sufficient there too.