PM0075 Reading/programming the embedded Flash memory
Doc ID 17863 Rev 1 21/31
On every system reset, the option byte loader (OBL) reads the information block and stores
the data into the Option byte register (FLASH_OBR) and the Write protection register
0x1FFF F80C
WRPx: Flash memory write protection option bytes
Bits [31:24]: nWRP3
Bits [23:16]: WRP3 (stored in FLASH_WRPR[31:24])
Bits [15:8]: nWRP2
Bits [7:0]: WRP2 (stored in FLASH_WRPR[23:16])
● For low-density devices, one bit of the user option bytes WRPx is used to
protect 4 pages of 1 Kbyte in main memory block.
– 0: Write protection active
– 1: Write protection not active
In total, one user option byte is used to protect the 32-Kbyte main Flash memory.
WRP0: Write-protects pages 0 to 31
● For medium-density devices, one bit of the user option bytes WRPx is used to
protect 4 pages of 1 Kbyte in main memory block.
– 0: Write protection active
– 1: Write protection not active
In total, four user option bytes are used to protect the 128-Kbyte main Flash
memory.
WRP0: Write-protects pages 0 to 31
WRP1: Write-protects pages 32 to 63
WRP2: Write-protects pages 64 to 95
WRP3: Write-protects pages 96 to 127
● For high-density devices, one bit of the user option bytes WRPx is used to
protect 2 pages of 2 Kbytes in main memory block. However, the bit 7 of
WRP3 write protects pages 62 to 255.
– 0: Write protection active
– 1: Write protection not active
In total, four user option bytes are used to protect the 512-Kbyte main Flash
memory.
WRP0: Write-protects pages 0 to 15.
WRP1: Write-protects pages 16 to 31.
WRP2: Write-protects pages 32 to 47.
WRP3: bits 0-6 write-protect pages 48 to 61
bit 7 write-protects pages 62 to 255.
● For connectivity line devices, one bit of the user option bytes WRPx is used to
protect 2 pages of 2 Kbytes in main memory block. However, the bit 7 of
WRP3 write-protects pages 62 to 127.
– 0: Write protection active
– 1: Write protection not active
In total, four user option bytes are used to protect the 256-Kbyte main Flash
memory.
WRP0: Write-protects pages 0 to 15.
WRP1: Write-protects pages 16 to 31.
WRP2: Write-protects pages 32 to 47.
WRP3: bits 0-6 write-protect pages 48 to 61
bit 7 write-protects pages 62 to 127.
Table 8. Description of the option bytes (continued)
Flash memory
address
Option bytes