| Electronic Components Datasheet Search |
|
AN3156 Datasheet(PDF) 17 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3156 Datasheet(HTML) 17 Page - STMicroelectronics |
|
17 / 26 page ![]() DocID017068 Rev 4 17/26 AN3156 DFU_DNLOAD request commands 25 5.1 Write memory The Write memory operation is selected when wValue > 1. The host requests the device to receive a specified number of data bytes (wLength) to load them into valid memory addresses (see note) in internal Flash memory, embedded RAM or 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 written depends on the memory target: • For the internal Flash memory and embedded RAM: write size can be from 2 to 2048 bytes • For the option bytes: write 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. Note: A different write size is possible for the option bytes but it is recommended to write the entire block at a time in order to ensure data integrity. When the target is the option byte area, the address pointer must always be the start address of the option bytes, otherwise, the request is not performed. The Write memory operation is effectively executed only when a DFU_GETSTATUS request is issued by the host. If the status returned by the device is not dfuDNBUSY, then an error has occurred. A second DFU_GETSTATUS request is needed to check if the command has been correctly executed, except when the destination is the option byte area (in this case the device is immediately reset after the write operation completion). If the received address is wrong or unsupported, the device status is then (Status = dfuERROR, State = errTARGET). The address, to which the host requests to write data, is computed using the value of wBlockNumber (wValue) and the address pointer according to the same formula as for an upload request: Address = ((wBlockNum – 2) × wTransferSize) + Addres_Pointer, where: – wTransferSize: length of the data buffer sent by the host – wBlockNumber: value of the wValue parameter If the Flash Read Protection is enabled, the Write memory operation is not performed and the returned device status is (Status = dfuERROR, State = errVENDOR) whatever the target (internal Flash, embedded RAM or option bytes). If the Write memory command is issued to the option byte area, all options are erased before writing the new values, and at the end of the command the bootloader generates a system reset to take into account the new configuration of the option bytes. Note: 1 When writing to the RAM, you should take care not to overlap the first RAM memory used by the bootloader firmware. 2 No error is returned when performing write operations on write protected sectors. |
|
|
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 |