RM0461
If the comparison between the word and its complement fails, a status bit OPTVERR is set.
Mismatch values are forced into the option registers as follows:
•
For USR OPT option, the value of mismatch is all options at '1', except for BOR_LEV
that is "000" (lowest threshold).
•
For WRP option, the value of mismatch is the default value "No protection".
•
For RDP option, the value of mismatch is the default value "Level 1".
•
For PCROP, the value of mismatch is "all memory protected".
•
For BOOT_LOCK option, the value of mismatch is "CPU boot lock disabled"
•
For OPTVAL option, the value of mismatch is "not valid". OPTVAL is a check word
programmed at the last user option address. It is used to check if all user options have
been programmed during an OPTSTART. If the user option program sequence has not
terminated completely, OPTVAL is not be programmed and OPTNV is set.
If the OPTVAL option indicates "not valid", SRAM1, SRAM2, and PKA SRAM memories are
erased.
OPTVERR OPTNV
Options correctly loaded and OPTVAL is "Valid".
0
0
Device is non-secure.
0
1
Does not occur
OPTVAL option is correctly loaded as "Valid" but some or all other options and engineering
bits are corrupted: mismatch values are loaded.
– When secure option is loaded correctly, security is applied according to the loaded secure
1
0
– When secure option is corrupted, security is applied on the full memory as indicated by the
Some or all options and engineering bits are corrupted: mismatch values are loaded.
OPTVAL is correctly loaded as "not Valid".
1
1
Security applied on full memories irrespective of the loaded secure option values.
On system reset rising, internal option registers are copied into the following option registers
that can be read and written by software:
•
FLASH_OPTR
•
FLASH_PCROP1xSR (x=A or B)
•
FLASH_PCROP1xER (x=A or B)
•
FLASH_WRP1xR (x=A or B)
These registers are also used to modify the options. If these registers are not modified by
the user, they reflect the options states of the system. See
details.
3.5
Flash memory protection
The main flash memory can be protected against external accesses with the readout
protection (RDP). The pages can also be protected against unwanted write (WRP) due to
loss of program counter context. The write protection WRP granularity is 2 Kbytes.
Table 10. Option loading control
option values.
loaded mismatch value.
Description
RM0461 Rev 5
Embedded flash memory (FLASH)
Modify user options
for more
85/1306
108
Need help?
Do you have a question about the STM32WLEx and is the answer not in the manual?