Flash Memory Protection; Readout Protection (Rdp); Table 18. Flash Memory Readout Protection Status - STMicroelectronics STM32WL5 Series Reference Manual

Advanced arm-based 32-bit mcus with sub-ghz radio solution
Table of Contents

Advertisement

Embedded flash memory (FLASH)
RSSLIB_PFUNC->CloseExitHDP(RSSLIB_HDP_AREA1, 0x8020000);
4.6

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.
Apart from the RDP and WRP, the flash memory can also be protected against read and
write from third parties (PCROP). The PCROP granularity is 1 Kbyte.
Part of the flash main memory can be secured, granting exclusive access to this part of the
memory to CPU2.
4.6.1

Readout protection (RDP)

The readout protection is activated by setting the RDP option byte and performing an option
byte programming with OPTSTRT followed by a OBL_LAUNCH, POR or wake-up from
Standby or Shutdown mode. The readout protection protects the main flash memory, the
option bytes, the backup registers (TAMP_BKPxR in TAMP) and SRAM2.
There is no exception while the debugger is connected.
There are three levels of readout protection from no protection (level 0) to maximum
protection or no debug (level 2).
The flash memory is protected when the RDP option byte and its complement contain the
pair of values shown in the table below.
RDP byte value
0xAA
Any value except 0xAA or 0xCC
0xCC
The system memory area is read accessible whatever the protection level. It is never
accessible for program/erase operation.
Level 0: no protection
Read, program and erase operations into the main flash memory area are possible. The
option bytes, SRAM2 and backup registers are also accessible by all operations.
Level 1: readout protection
This is the default protection level when the RDP option byte is erased. It is defined as well
when the RDP value is at any value different from 0xAA and 0xCC, or even if the
complement is not correct.
User mode
The code executing in user mode (Boot flash) can access the main flash memory,
option bytes, SRAM2 and backup registers with all operations.
118/1450

Table 18. Flash memory readout protection status

RDP complement value
0x55
Any value (not necessarily
complementary), except 0x55 and 0x33
0x33
RM0453 Rev 5
RM0453
RDP level
Level 0
Level 1 (default)
Level 2

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32WL5 Series and is the answer not in the manual?

This manual is also suitable for:

Stm32wl55 seriesStm32wl54 series

Table of Contents