EasyManuals Logo
Home>ST>Microcontrollers>STM32G471

ST STM32G471 User Manual

ST STM32G471
2126 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 #170 background imageLoading...
Page #170 background image
Embedded Flash memory (FLASH) for category 4 devices RM0440
170/2126 RM0440 Rev 4
For example, to protect by WRP from the address 0x0801 2800 (included) to the address
0x0801 87FF (included):
if boot in flash is selected, FLASH_WRP1AR register must be programmed with:
WRP1A_STRT = 0x25.
WRP1A_END = 0x30.
WRP1B_STRT and WRP1B_END in FLASH_WRP1BR can be used instead (area “B”
in Flash memory).
When WRP is active, it cannot be erased or programmed. Consequently, a software mass
erase cannot be performed if one area is write-protected.
If an erase/program operation to a write-protected part of the Flash memory is attempted,
the write protection error flag (WRPERR) is set in the FLASH_SR register. This flag is also
set for any write access to:
–OTP area
part of the Flash memory that can never be written like the ICP
PCROP area.
Note: When the memory read protection level is selected (RDP level = 1), it is not possible to
program or erase Flash memory if the CPU debug features are connected (JTAG or single
wire) or boot code is being executed from RAM or System flash, even if WRP is not
activated.
Note: To validate the WRP options, the option bytes must be reloaded through the OBL_LAUNCH
bit in Flash control register.
4.5.4 Securable memory area
The Securable memory area defines an area of code which can be executed only once at
boot, and never again unless a new reset occurs.
The main purpose of the Securable memory area is to protect a specific part of Flash
memory against undesired access. This allows implementing software security services
such as secure key storage or safe boot. Securable memory area is located in the Main
Flash memory. It is dedicated to executing trusted code. When not secured, the Securable
memory behaves like the remainder of Main Flash memory. When secured (the
SEC_PROT1 bit of the FLASH_CR register set), any attempt to program or erase in a
secure memory area generates a write protection error (WRPERR flag is set) and any
attempt to read from it generates a read error (RDERR flag is set).
Table 25. WRP protection
WRP registers values
(x=1 y= A/B)
WRP protection area
WRPxy_STRT =
WRPxy_END
Page WRPxy is protected.
WRPxy_STRT >
WRPxy_END
No WRP area.
WRPxy_STRT <
WRPxy_END
The pages from
WRPxy_STRT to WRPxy_END are protected.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

ST STM32G471 Specifications

General IconGeneral
BrandST
ModelSTM32G471
CategoryMicrocontrollers
LanguageEnglish

Related product manuals