Embedded Flash memory (FLASH)
Table 15. Access status versus protection level and execution modes (continued)
Protection
Area
level
1
OTP
2
1
Backup
registers
2
1
SRAM2
2
1. When the protection level 2 is active, the Debug port, the boot from RAM and the boot from system memory are disabled.
2. The system memory is only read-accessible, whatever the protection level (0, 1 or 2) and execution mode.
3. The Flash main memory is erased when the RDP option byte is programmed with all level protections disabled (0xAA).
4. OTP can only be written once.
5. The backup registers are erased when RDP changes from level 1 to level 0.
6. The SRAM2 is erased when RDP changes from level 1 to level 0.
3.5.2
Proprietary code readout protection (PCROP)
Apart of the flash memory can be protected against read and write from third parties. The
protected area is execute-only: it can only be reached by the STM32 CPU, as an instruction
code, while all other accesses (DMA, debug and CPU data read, write and erase) are
strictly prohibited. One area per bank can be selected, with double word (64-bit)
granularity.An additional option bit (PCROP_RDP) allows to select if the PCROP area is
erased or not when the RDP protection is changed from Level 1 to Level 0 (refer to
Changing the Read protection
Each PCROP area is defined by a start page offset and an end page offset related to the
physical Flash bank base address. These offsets are defined in the PCROP address
registers
PCROP End address register
register
(FLASH_PCROP2SR),
(FLASH_PCROP2ER).
The Bank "x" PCROP (x=1,2) area is defined from the address: Bank "x" Base address +
[PCROPx_STRT x 0x8] (included) to the address: Bank "x" Base address +
[(PCROPx_END+1) x 0x8] (excluded). The minimum PCROP area size is two double-words
(128 bits).
118/1830
User execution (BootFromFlash)
Read
Write
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Flash Bank 1 PCROP Start address register
(FLASH_PCROP1ER),
DocID024597 Rev 5
Erase
(4)
N/A
(4)
N/A
Yes
N/A
Yes
N/A
Yes
N/A
Yes
N/A
level).
Flash Bank 2 PCROP End address register
Debug/ BootFromRam/
BootFromLoader
Read
Write
No
No
N/A
N/A
No
No
N/A
N/A
No
No
N/A
N/A
(FLASH_PCROP1SR),
Flash Bank 2 PCROP Start address
RM0351
(1)
Erase
N/A
N/A
(5)
No
N/A
(6)
No
N/A
Flash Bank 1
Need help?
Do you have a question about the STM32L4 5 Series and is the answer not in the manual?