-
Notifications
You must be signed in to change notification settings - Fork 11
DFU on Windows
Many STM32 microcontrollers have a bootloader supporting the USB DFU protocol. So firmware can be installed without the need for a debug adapter. Instead, inexpensive development boards like the Black Pill board are directly connected via USB to a computer.
Even though the DFU protocol is a standardized USB class, Windows does not provide a DFU driver for it. In fact, no driver is installed and the board is not accessible in DFU mode.
For the bootloader to be accessible via USB, the board must be in DFU mode. To achieve it, hold down the BOOT button while connecting the board. Then verify in the Device Manager that the device has appeared as "STM32 BOOTLOADER". If not, try again. The board should also enter boot mode by holding down the BOOT button, then pressing the RESET button and finally releasing the BOOT button.
In the device manager, it will look like this. The board is connected in bootloader/DFU mode but is not usable (not the warning sign on the device icon):
DFU software can access the board if the WinUSB driver is installed. This is a standard driver of Windows (since about Windows 8). Unfortunately, it is not installed automatically.
In order to install it, a software called Zadig must be downloaded and installed.
When it is run, it will automatically detect USB devices without driver and directly propose to install the WinUSB driver.
Click Install Driver to start the installation. It can take a minute.
After the installation, it should look like this:
In the device manager, the warning sign should have disappeared as well: