Embedded Flash memory (FLASH) for category 3 devices
Bits 22:16 WRP2B_END: WRP second area "B" end offset
Securable memory area Bank 2 option bytes
Flash memory address: 0x1FFF F828
ST production value: 0xFF00 FF00
31
30
29
Res.
Res.
Res.
15
14
13
Res.
Res.
Res.
3.4.2
Option bytes programming
After reset, the options related bits in the
protected. To run any operation on the option bytes page, the option lock bit OPTLOCK in
the
Flash control register (FLASH_CR)
unlock this register:
1.
Unlock the FLASH_CR with the LOCK clearing sequence (refer to
memory).
2.
Write OPTKEY1 = 0x08192A3B in the
3.
Write OPTKEY2 = 0x4C5D6E7F in the FLASH_OPTKEYR register.
The user options can be protected against unwanted erase/program operations by setting
the OPTLOCK bit by software.
Note:
If LOCK is set by software, OPTLOCK is automatically set too.
114/2083
DBANK=1
WRP2B_END contains the last page of the WRP second area for bank2.
DBANK=0
WRP2B_END contains the last page of the WRP fourth area for all memory.
Bits 15:7 Reserved, must be kept at reset value.
Bits 6:0 WRP2B_STRT: WRP second area "B" start offset
DBANK=1
WRP2B_STRT contains the first page of the WRP second area for bank2.
DBANK=0
WRP2B_STRT contains the first page of the WRP second area for all memory.
28
27
26
25
Res.
Res.
Res.
Res.
12
11
10
9
Res.
Res.
Res.
Res.
Bits 31:8 Reserved, must be kept at reset value.
Bits 7:0 SEC_SIZE2: Securable memory area size contains the number of Securable
Flash memory pages.
24
23
22
Res.
Res.
Res.
8
7
6
Res.
rw
rw
Flash control register (FLASH_CR)
must be cleared. The following sequence is used to
Flash option key register
RM0440 Rev 1
21
20
19
18
Res.
Res.
Res.
Res.
5
4
3
2
SEC_SIZE2[7:0]
rw
rw
rw
rw
Unlocking the Flash
(FLASH_OPTKEYR).
RM0440
17
16
Res.
Res.
1
0
rw
rw
are write-
Need help?
Do you have a question about the STM32G4 Series and is the answer not in the manual?