Skip to main content
Senior
May 19, 2026
Solved

Initial programming via USB (DFU) without external crystal - Specifically for STM32C071K8U6

  • May 19, 2026
  • 6 replies
  • 219 views

Hi all,

I'm planning to use USB (DFU mode) for production programming of the STM32C071K8U6 — including the very first firmware upload. The board has no external crystal; I intend to rely solely on the internal RC oscillator.

 

A few questions:

1) Is USB DFU feasible on this specific part without an external crystal? I've read that not all STM32 variants support USB boot without an external crystal (due to clock accuracy requirements for USB). Can anyone confirm whether the STM32C071K8U6's internal oscillator is sufficiently accurate for this?

 

2) Are there any specific hardware or configuration requirements I should be aware of for first-time USB DFU programming on this part? As the moment I just have the two USB traces connected to the USB connector but no 5V (VBUS) connected anywhere to the micro. I also have a pushbutton on the BOOT0 pin.

 

3) What USB speed does the built-in bootloader use, and is it possible to force a lower speed? The reason I ask is that the USB D+/D− lines have relatively long stubs — because after programming, these traces are repurposed for other functionality and never for USB, so they branch out to various areas of the PCB. USB is used exclusively for programming, and I'd like to understand whether the stub lengths could be problematic and whether reducing the speed would help mitigate signal integrity issues.

Thank you in advance

Best answer by FBL

Hi @Ricko 

The STM32C071K8U6 can use its built-in USB DFU bootloader without requiring an external crystal. The device uses its internal HSI48 oscillator, and the CRS ensures the oscillator is accurate enough for USB device operation.

The STM32C071K8U6 USB DFU bootloader operates at USB Full Speed. You can refer to AN2606.

About required hardware connections for USB DFU programming, you can refer to schematics provided on our reference board. If VBUS is not connected or not sensed properly, the ROM bootloader may not enumerate over USB as expected.

6 replies

Andrew Neil
Super User
May 20, 2026

@Ricko wrote:

I'm planning to use USB (DFU mode) for production programming of the STM32C071K8U6 — including the very first firmware upload.


For the very first firmware load, you would have to rely on the built-in System bootloader - so see Application Notes: 

AN2606, Introduction to system memory boot mode on STM32 MCUs.

AN3156How to use USB DFU protocol in bootloader on STM32 MCUs.

AN5673, Getting started with STM32C0 MCU hardware development.

AN4879Introduction to USB hardware and PCB guidelines using STM32 MCUs.

 

Also: https://wiki.st.com/stm32mcu/wiki/Introduction_to_USB_with_STM32

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
waclawek.jan
Super User
May 20, 2026

As @Andrew Neil said above, you'll find all answers to your questions in the documents he listed. I'd just want to add some details:

> Can anyone confirm whether the STM32C071K8U6's internal oscillator is sufficiently accurate for this?

The 'C071 DFU bootloader does not need an external crystal or external crystal oscillator.

The internal oscillator (HSI48) in itself wouldn't be sufficiently accurate, but it uses what ST calls clock recovery system (CRS), which esentially is a PLL which locks the HSI48 to the incoming USB signal (more exactly to the 1ms SOF timestamps). So, with this PLL/lock, the internal oscillator is then sufficiently precise and stable for USB FS operation.

> What USB speed does the built-in bootloader use, and is it possible to force a lower speed?

Full Speed (i.e. 12MBaud). The USB device module in 'C071 does not support other speed. The only lower speed would be Low Speed (1.5MBaud), but no STM32 USB device supports that.

JW

FBLAnswer
Technical Moderator
May 20, 2026

Hi @Ricko 

The STM32C071K8U6 can use its built-in USB DFU bootloader without requiring an external crystal. The device uses its internal HSI48 oscillator, and the CRS ensures the oscillator is accurate enough for USB device operation.

The STM32C071K8U6 USB DFU bootloader operates at USB Full Speed. You can refer to AN2606.

About required hardware connections for USB DFU programming, you can refer to schematics provided on our reference board. If VBUS is not connected or not sensed properly, the ROM bootloader may not enumerate over USB as expected.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL
waclawek.jan
Super User
May 20, 2026

Hi @FBL ,

> you can refer to schematics provided on our reference board

Which board in this case is the reference board you're referring to?

> If VBUS is not connected or not sensed properly, the ROM bootloader may not enumerate over USB as expected.

There's no pin listed in AN2606 to connect VBUS to.

JW

Technical Moderator
May 20, 2026

Hi @waclawek.jan 

I answered 2 questions here 

2) Are there any specific hardware or configuration requirements

I meant he can refer to MB2046 

FBL_0-1779274083951.png

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL
waclawek.jan
Super User
May 20, 2026

Hi @FBL ,

 

thanks for the explanation. I wasn't aware of the fact that Nucleo64 now contain more than the bare chip and STLink, so I looked at the 144 Nucleos, there's no 'C0 there (logically, but I gave it a try).

(Btw, pity that ST decided to remove the infographics which contained *all* Nucleos at one place, which was very convenient to find the proper board to start with. The multiple subpages are very clumsy to navigate. In that infographics, it would be also very easy to indicate (using graphical symbols or in color), which of the boards do contain extra circuitry such as the USB here.)

I still don't think the factory bootloader does detect VBUS. I believe that would be documented in AN2606, wouldn't it?

JW

Technical Moderator
May 20, 2026

Yess @waclawek.jan , I got the confirmation, vbus sensing is not required. An internal ticket CDM0062785 is submitted to add this info in AN2606.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL
RickoAuthor
Senior
May 20, 2026

Thank you all for the feedback! :)