Write Protection (Wrp); Table 24. Pcrop Protection - ST STM32G4 Series Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32G4 Series:
Table of Contents

Advertisement

RM0440
Any read access performed through the D-bus to a PCROP protected area triggers 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.
For previous example, due to erase by page, all pages from page 0xC5 to 0xE0 are
protected in case of page erase. (All addresses from 0x0806 2800 to 0x0807 07FF can't 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 area, the
options programming is launched but PCROP area stays unchanged. On the contrary, it is
possible to increase the PCROP area.
When option bit PCROP_RDP is cleared, when the RDP is changing from level 1 to level 0,
Full Mass Erase is replaced by Partial Mass Erase in order to keep the PCROP area (refer
to
Changing the Read protection
are also not erased.
Note:
It is recommended to align PCROP area with page granularity when using PCROP_RDP, or
to leave free the rest of the page where PCROP zone starts or ends.
PCROPx registers values
PCROPx_offset_strt >
PCROPx_offset_end
PCROPx_offset_strt <
PCROPx_offset_end
1. The minimum PCROP area size is 2xdouble words: PCROPx_offset_strt and PCROPx_offset_end.
4.5.3

Write protection (WRP)

The user area in Flash memory can be protected against unwanted write operations. It
allows either to specify:
Two write-protected (WRP) areas can be defined, with page (2 KByte) granularity.
Each area is defined by a start page offset and an end page offset related to the physical
Flash base address. These offsets are defined in the WRP address registers:
area A address register
(FLASH_WRP1BR).
The WRP "y" area (x=1 and y=A,B) is defined from the address: Flash memory Base
address + [WRPxy_STRT x 0 x 800] (included) to the address: Flash memory Base address
+ [(WRPxy_END+1) x 0 x 800] (excluded).
Embedded Flash memory (FLASH) for category 4 devices

Table 24. PCROP protection

(x = 1)
No PCROP area.
The area between PCROPx_offset_strt and PCROPx_offset_end is
protected.
it is possible to write:
– PCROPx_offset_strt with a lower value
– PCROPx_offset_end with a higher value.
(FLASH_WRP1AR),
level). In this case, PCROP1_STRT and PCROP1_END
PCROP protection area
Flash WRP area B address register
RM0440 Rev 4
(1)
Flash WRP
169/2126
228

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

Table of Contents

Save PDF