DFU bootloader
The host requests the device to send a specified number of data bytes (
Internal Flash, Embedded RAM (starting from 0x2000 1000 address), System Memory or
from Option Bytes. The allowed number of bytes to be read depends on the memory target:
●
For internal Flash, embedded RAM and System Memory: read size can be from 2 to
2048 bytes.
●
For Option Bytes: read size should be 16 bytes.
The address, from which the Host requests to read data, is computed using the value of
wBlockNumber (
Address = ((wBlockNum - 2) * wTransferSize) + Address_Pointer.
Where wTransferSize is the length of the requested data buffer.
The Address Pointer should have been previously specified through a Set Address Pointer
command (using a DFU_DNLOAD request). Otherwise (if no address is previously
specified) the device assumes that it will be the internal Flash start address (0x08000000).
If the Flash Read Protection is enabled, the Read operation is not performed and the device
status returned is (Status = dfuERROR, State = errVENDOR) whatever the target (internal
Flash, embedded RAM, System Memory or Option Bytes).
4.4.2
Get commands
This command is selected when
The Host requests to read the commands supported by the bootloader. After receiving this
command, the device returns N bytes representing the command codes.
The STM32F105xx and STM32F107xx sends the bytes as follows (N = 4):
Byte 1:
Byte 2:
Byte 3:
Byte 4:
The processing of DFU_UPLOAD command is shown in
70/83
) and the Address Pointer according to the following formula:
wValue
wValue
0x00
- Get command
0x21
- Set Address Pointer
0x41
- Erase
0x92
- Read Unprotect
Doc ID 14156 Rev 1
= 0.
Figure 53
AN2662
) from
wLength
and
Figure
54.
Need help?
Do you have a question about the STM32F105 Series and is the answer not in the manual?