| Electronic Components Datasheet Search |
|
AN3156 Datasheet(PDF) 12 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3156 Datasheet(HTML) 12 Page - STMicroelectronics |
|
12 / 26 page ![]() DFU_UPLOAD request commands AN3156 12/26 DocID017068 Rev 4 4 DFU_UPLOAD request commands The upload request allows different commands to be performed. The command selection is done through the value of parameter wValue in the USB request structure. The operations described in Section 4.1 to Section 5.5 are supported. 4.1 Read memory The Read memory operation is selected when wValue > 1. The host requests the device to send a specified number of data bytes (wLength) from valid memory address (see note) of the internal Flash memory, embedded RAM, system memory or from the option bytes. Note: Refer to Section 4: DFU_UPLOAD request commands for more details about the valid memory addresses for the device you are using. The allowed number of bytes to be read depends on the memory target: • For the internal Flash memory, embedded RAM and system memory: read size can be from 2 to 2048 bytes • For the option bytes: read size should be equal to the option byte block size • For other memory locations, refer to the section "Important considerations” depending on the product in AN2606. The address, from which the host requests to read data, is computed using the value of wBlockNumber (wValue) and the address pointer according to the following formula: Address = ((wBlockNum – 2) × wTransferSize) + Address_Pointer, where: – wTransferSize is the length of the requested data buffer. The address pointer should be previously specified through a Set Address Pointer command (using a DFU_DNLOAD request). Otherwise (if no address was previously specified) the device assumes that it is the internal Flash start address (0x08000000). If the Flash Read Protection is enabled, the Read operation is not performed and the returned device status is (Status = dfuERROR, State = errVENDOR) whatever the target (internal Flash memory, embedded RAM, system memory or option bytes). 4.2 Get command This command is selected when wValue = 0. 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 STM32 sends bytes as follows (N = 4): Byte 1: 0x00 - Get command Byte 2: 0x21 - Set Address Pointer Byte 3: 0x41 - Erase Byte 4: 0x92 - Read Unprotect |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |