AN2662
A second DFU_GETSTATUS request is needed to check if the command has been correctly
executed. If the received address is wrong or unsupported, the device status will then be
(Status = dfuERROR, State = errTARGET).
The allowed locations for Address Pointer values are:
●
Internal Flash and embedded RAM addresses.
●
System Memory addresses
●
Option Byte addresses
Note:
The Set Address Pointer command is allowed and executed when the Flash Read
Protection is enabled.
Figure 58. Set Address Pointer Command: Device side
Status = errTARGET
4.5.3
Erase command
The Erase command is selected when wValue = 0 and the first byte of the buffer sent by the
Host is 0x41. The Buffer length may be 5 bytes (the four remaining bytes are the address
bytes, LSB first) for the page erase operation or only 1 byte (only the command byte) for the
Mass erase operation.
The Host sends a DFU_DNLOAD request with the above parameters to erase one page of
the internal Flash memory or to perform a mass erase of this Flash.
The STM32F105xx and STM32F107xx receives the bytes as follows (Page erase):
Byte 1:
Byte 2:
Byte 3:
Byte 4:
Byte 4:
Or, if a 1-byte command is received:
State = dfuERROR
0x41
- Erase command
A[7:0]
- LSB of the Page address
A[15:8]
- Second byte of the Page address
A[22:16] - Third byte of the Page address
A[31:23] - MSB of the Page address
Doc ID 14156 Rev 1
Set Address Pointer
command
Compute
address
No
Address allowed?
Yes
Set the new value of
address pointer
State = dfuDNLOAD-IDLE
Status = OK
DFU bootloader
77/83
Need help?
Do you have a question about the STM32F105 Series and is the answer not in the manual?
Questions and answers