Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
14
/
631
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-63, bit [0] corresponds to Page48 /49, bit [7] corresponds to Page62 /
63;
Read protection L2 level option byte: RDP2
Add protection function on the basis of L1, see 2.2.1.9 detailed description of read protection;
Whether RDP2 is turned on or not can be determined by FLASH_OB [31] query;
User Configuration 2
:
USER2
USER2 [7]
:
Reserved
USER2[6:4]
:
BOR_LEV[2:0], , read out through FLASH_OB2[10:8],default is 0
USER2 [3]
:
Reserved
USER2[2] : nSWBOOT0, read out through FLASH_OB2[26],default is 1
USER2[1]: nBOOT1, read out through FLASH_OB2[23], default is 1
USER2[0]: nBOOT0, read out through FLASH_OB2[27], default is 1
Write protect
Write protection can be configured for all pages in the flash main storage area (maximum 128KB) to prevent
accidental write operations caused by program runaway or electrical interference. The basic unit of write protection
is: for Page0 ~ 63, every 2 pages is a basic 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