DocID025202 Rev 7
80/1080
RM0365
Option byte description
80
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
(FLASH_WRPR). Each option byte also has its complement in the information block. During
option loading, by verifying the option bit and its complement, it is possible to check that the
loading has correctly taken place. If this is not the case, an option byte error (OPTERR) is
generated. When a comparison error occurs, the corresponding option byte is forced to
0xFF. The comparator is disabled when the option byte and its complement are both equal
to 0xFF (Electrical Erase state).
0x1FFF F808
WRPx
: Flash memory write protection option bytes
Bits [31:24]:
nWRP1
Bits [23:16]:
WRP1
(stored in FLASH_WRPR[15:8])
Bits [15:8]:
nWRP0
Bits [7:0]:
WRP0
(stored in FLASH_WRPR[7:0])
0: Write protection active
1: Write protection not active
Refer to
Section 4.3.2: Write protection
for more details.
Note: Even if WRP2 and WRP3 are not available, they must be kept at reset
value.
0x1FFF F80C
WRPx
: Flash memory write protection option bytes (available only on
STM32F302xB/C)
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])
One bit of the user option bytes WRPx is used to protect 2 pages of 2 Kbytes in
the main memory block.
0: Write protection active
1: Write protection not active
In total, 4 user option bytes are used to protect the whole 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
on STM32F302xB/C, pages 63 to 255 on STM32F302xD/E
(1)
1. Even if WRP2 and WRP3 are not available on the STM32F302x6/8, they must not be re-
programmed and must be kept at reset value 0xFF.
Table 13. Description of the option bytes (continued)
Flash memory
address
Option bytes