RM0440 Rev 4 169/2126
RM0440 Embedded Flash memory (FLASH) for category 4 devices
228
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 level). In this case, PCROP1_STRT and PCROP1_END
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.
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: Flash WRP
area A address register (FLASH_WRP1AR), Flash WRP area B 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).
Table 24. PCROP protection
(1)
1. The minimum PCROP area size is 2xdouble words: PCROPx_offset_strt and PCROPx_offset_end.
PCROPx registers values
(x = 1)
PCROP protection area
PCROPx_offset_strt >
PCROPx_offset_end
No PCROP area.
PCROPx_offset_strt <
PCROPx_offset_end
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.