58
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
WRP0: write protection of pages 0-15, bit [0] corresponds to Page0 / 1,., bit [7] corresponds to page14 /
15;
WRP1: write protection on pages 16-31, bit [0] corresponds to Page16 / 17,., bit [7] corresponds to Page30
/ 31;
WRP2: write protection on pages 32-47 bit [0] corresponds to Page32 / 33,., bit [7] corresponds to Page46
/ 47;
WRP3: write protection on pages 48-255, bit [0] corresponds to Page48 /49., bit [6] corresponds to Page60
/ 61
,
bit [7] corresponds to Page62 / 255;
Read protection L2 level option byte: RDP2
Add protection function on the basis of L1, see 3.2.1.9 detailed description of read protection;
Whether RDP2 is turned on or not can be determined by FLASH_OB [31] query;
Write protect
Write protection can be configured for all pages in the flash main storage area (maximum 512KB) to prevent
accidental write operations caused by program runaway or electrical interference. The basic unit of write protection
is: for Page0 ~ 61, every 2 pages is a basic protection unit, for Page62~255, together as a protection unit. Write
protection can be configured by setting WRP0 ~ 3 in the option byte block; After each configuration, A system reset
is required for the configured value to be reloaded to take effect. If an attempt is made to program or erase a protected
page, a protection error flag will be returned in the FLASH_STS.
The system memory block (16KB) in the system information area stores the boot program and cannot be changed.
The system configuration block (2KB) in the system information area stores the basic information of the chip and
cannot be changed.
The option byte block (2KB) in the system information area stores the user-configurable option byte information.
The write protection of the option byte block is achieved by writing 0 to the FLASH_CTRL.OPTWE bit by software,
and after that, you can write the correct key value series in FLASH_OPTKEY to release the write protection of the
option byte.
Read protection
The user code in flash can be protected from illegal reading by setting read protection. Read protection is mainly
aimed at protecting the access operation of main memory area and option byte block after chip sealing operation.
Read protection is set by configuring RDP bytes in the option byte block. Three different read protection levels can
be configured, as shown in the following Table
Table 3-4 Read protection configuration list
Read protection status
RDP1
nRDP1
nRDP2
RDP2
L1 level
0xFF
0xFF
RDP2! = 0xCC || nRDP2! = 0x33
Unprotected
0xA5
0x5A
RDP2! = 0xCC || nRDP2! = 0x33
L2 level
0xXX
0xXX
0x33
0xCC
L1 level
Not the above three configurations
L0 level: