English
Language : 

AN3156 Datasheet, PDF (5/26 Pages) STMicroelectronics – USB DFU protocol used in the STM32 bootloader
AN3156
1
Bootloader code sequence
Bootloader code sequence
There is no difference in terms of protocol (requests and commands) between different
Bootloader DFU versions. For detailed difference list please refer to Section 6.
Once the system memory boot mode is entered and the STM32 device has been configured
(for more details refer to AN2606), the bootloader code configures the USB and its
interrupts, and waits for the "enumeration done" interrupt.
The USB enumeration is performed as soon as the USB cable is plugged (or immediately if
the cable is already plugged). If you do not want the STM32 to enter the USB DFU
bootloader application, the USB cable has to be unplugged before reset.
The bootloader version is returned in the device descriptor in the MSB of the bcd Device
field (example: 0x2000 = Version 2.0).
For Connectivity line USB DFU bootloader, the device first tries the 25 MHz configuration,
then, if it fails, the 14.7456 MHz configuration, and finally, if it fails, the 8 MHz configuration.
If it still fails, this operation is repeated with a large timeout value (the three configurations
are tested again). If the second trial also fails, a system reset is generated.
DocID017068 Rev 4
5/26
25