AN2662
4
DFU bootloader
4.1
Bootloader code sequence
Figure 52. Bootloader for STM32F105xx and STM32F107xx with USB DFU
Generate System
1. After system reset, the device may return to the BL_DFU loop, enter the USART or CAN bootloader loops
or execute code from Flash/RAM depending on the connection states and the boot pins status.
2. Leave DFU is achieved by a 0 Data Download request followed by GetStatus request and Device Reset.
3. After six trials (the three clock configurations are tested twice), a System Reset is generated.
Device USB reset
Increment TrialNum
TrialNum > 6
No (Timeout)
Reset
No
Doc ID 14156 Rev 1
BL_DFU
Configure internal oscillator
mode and re-initialize USB
USB Device
connected
Configure external oscillator
mode and re-initialize USB
Received
correct Packet?
Enumeration Phase
Enter DFU Mode
Wait for
Host commands
DFU requests
DFU Request
routines
Need reset ?
Yes
Generate System
1)
Reset
DFU bootloader
No
Yes
Yes
Leave DFU
2)
Mode
Leave DFU
routine
Jump to
Application Address
and exit DFU mode
Clock Detection
3)
Phase
67/83
Need help?
Do you have a question about the STM32F105 Series and is the answer not in the manual?