| Electronic Components Datasheet Search |
|
PM0073 Datasheet(PDF) 20 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0073 Datasheet(HTML) 20 Page - STMicroelectronics |
|
20 / 34 page ![]() Reading/programming the STM32Wxxx embedded Flash memory PM0073 20/34 Doc ID 17766 Rev 5 The Flash memory is protected when the RDP option byte and its complement contain the pair of values shown in Table 6: Flash memory protection status. Note: Erasing the option byte block will not trigger a Mass Erase as the erased value (0xFF) corresponds to a protected value. Unprotection To disable the read protection from the embedded SRAM: 1. Program the read protection code (RDP) 0x00A5 to protect the memory. This operation will fail since the option bytes are not erased, but it will force a Mass Erase of the main Flash memory which will work regardless of the status of the write protection bytes. 2. Erase the entire option byte area. As a result, the RDP will be 0xFF. At this stage, the read protection is still enabled. 3. Program the correct RDP code 0x00A5 to unprotect the memory. This operation first forces a Mass Erase of the main Flash memory. 4. Reset the device (POR Reset) to reload the option bytes (and the new RDP code), and to disable the read protection. Note: The read protection can be disabled using the bootloader (in this case, only a System Reset is necessary to reload the option bytes). For more details, refer to AN2606. 2.3.2 Write protection Write protection is implemented with a granularity of: ● four pages per bit for 64- and 128-Kbyte Flash memory devices, ● two pages per bit for 192- and 256-Kbyte Flash memory devices. If a program or an erase operation is performed on a protected page, the Flash memory returns a protection error flag on the Flash memory Status Register (FLASH_SR). The write protection is activated by configuring the WRP[3:0] option bytes, and then by applying a system reset to reload the new WRPx option bytes. Unprotection To disable the write protection, two application cases are provided: Case 1 - Read protection disabled after the write unprotection: 1. Erase the entire option byte area by using the OPTER bit in the Flash memory control register (FLASH_CR). 2. Program the correct RDP code 0x00A5 to unprotect the memory. This operation first forces a Mass Erase of the main Flash memory. 3. Reset the device (system reset) to reload the option bytes (and the new WRP[3:0] bytes), and to disable the write protection. Table 6. Flash memory protection status RDP byte value RDP complement value Read protection status 0xFF 0xFF Protected RDPRT Complement of RDP byte Not protected Any value Not the complement value of RDP Protected |
|
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 |