Table 5. Flash Memory Read Protection Status - STMicroelectronics STM32F05 series Reference Manual

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

Embedded Flash memory
The Flash memory is protected when the RDP option byte and its complement contain the
pair of values shown in
Table 5.
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 are as well accessible by all operations.
Level 1: read protection
This is the default protection level when RDP option byte is erased. It is defined as well
when RDP value is at any value different from 0xAA and 0xCC, or even if the complement is
not correct.
User mode: Code executing in user mode can access main Flash memory and option
bytes with all operations.
Debug, boot RAM and boot loader modes: In debug mode (with SWD) or when code
is running from boot RAM or boot loader, the main Flash memory and the backup
registers (RTC_BKPxR in the RTC) are totally inaccessible.
In these modes, even a simple read access generates a bus error and a Hard Fault
interrupt. The main Flash memory is program/erase protected to prevent malicious or
unauthorized users from reprogramming any of the user code with a dump routine. Any
attempted program/erase operation sets the PGERR flag of Flash status register
(FLASH_SR).
When the RPD is reprogrammed to the value 0xAA to move back to Level 0, a mass
erase of the main Flash memory is performed and the backup registers (RTC_BKPxR
in the RTC) are reset.
Level 2: no debug
In this level, the protection level 1 is guaranteed. In addition, the CortexM0 debug
capabilities are disabled. Consequently, the debug port (SWD), the boot from RAM (boot
RAM mode) and the boot from System memory (boot loader mode) are no more available.
In user execution mode, all operations are allowed on the Main Flash memory. On the
contrary, only read and program operations can be performed through option bytes. Option
bytes are accessible for erase operations.
50/742
Table
5.
Flash memory read protection status
RDP complement value
0x55
Any value
(not necessarily complementary)
except 0x55 and 0x33
0x33
Doc ID 018940 Rev 1
RM0091
Read protection level
Level 0 (ST production
configuration)
Level 1
Level 2

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F05 series and is the answer not in the manual?

Table of Contents