EasyManuals Logo

ST STM32WL55JC User Manual

ST STM32WL55JC
1454 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #121 background imageLoading...
Page #121 background image
RM0453 Rev 2 121/1454
RM0453 Embedded Flash memory (FLASH)
153
4.6.2 Proprietary code readout protection (PCROP)
Two parts 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 CPUs with an
instruction code, while all other accesses (DMA, debug and CPU data read, write and
erase) are strictly prohibited. The PCROP areas have a 1-Kbyte granularity. An additional
option bit (PCROP_RDP) defines if the PCROP area is erased or not when the RDP
protection is changed from level 1 to level 0 (refer to Change the readout protection level).
Each PCROP area is defined by a start page offset and an end page offset into the Flash
memory. These offsets are defined in the PCROP address registers (FLASH_PCROP1ASR,
FLASH_PCROP1AER), FLASH_PCROP1BSR and FLASH_PCROP1BER).
A PCROP area is defined from the address:
Flash memory base address + [PCROP1x_STRT x 0x400] (included) to the address
Flash memory base address + [(PCROP1x_END+1) x 0x400] (excluded).
The minimum PCROP area size is two PCROP pages (2 Kbytes)
PCROP1x_END = PCROP1x_STRT + 1.
When PCROP1x_END = PCROP1x_STRT, the full Flash memory is PCROP protected.
For example, to protect by PCROP from the address 0x0801 2F80 (included) to the address
0x0801 D004 (included), if boot in Flash is selected, one of the FLASH_PCROP1xSR and
FLASH_PCROP1xER registers (x =A or B) must be programmed with:
PCROP1x_STRT = 0x4B (PCROP area first address 0x0801 2C00)
PCROP1x_END = 0x74 (PCROP area last address 0x0801 D3FF)
Any data read access performed through a PCROP protected area triggers the RDERR flag
error.
Any PCROP protected address is also write protected and any write access to one of these
addresses triggers WRPERR.
Any PCROP area is also erase protected. Consequently, any erase to a page in this zone is
impossible (including the page containing the start address and the end address of this
zone). Moreover, a software mass erase cannot be performed if one zone is PCROP
protected.
In the previous example, due to erase by page, all pages from page 0x4B to 0x74 are
protected. In case of page erase, all addresses from 0x0801 2C00 to 0x0801 D3FF cannot
be erased.
Deactivation of PCROP can only occurs when the RDP is changing from level 1 to level 0. If
the user options modification tries to clear PCROP or to decrease the PCROP areas, the
options programming is launched but PCROP areas stays unchanged. On the contrary, it is
possible to increase the PCROP areas.
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 non secure main memory is erased when the RDP option byte is programmed from level 1 to level 0. The Flash
secure main memory is also erased when the ESE option byte is regressed at the same time as the RDP option byte
programming from level 1 to level 0.
4. The backup registers are erased when RDP changes from level 1 to level 0.
5. SRAM1, SRAM2 and PKA SRAM are erased when RDP changes from level 1 to level 0.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32WL55JC and is the answer not in the manual?

ST STM32WL55JC Specifications

General IconGeneral
BrandST
ModelSTM32WL55JC
CategoryMicrocontrollers
LanguageEnglish

Related product manuals