![Geehy SEMICONDUCTOR APM32F405 Series Скачать руководство пользователя страница 25](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630025.webp)
www.geehy.com Page 24
Level 0
When FMC_OPTCTRL[RPROT]=0xAA, the read protection function is not used
for Flash.
Level 1
When FMC_OPTCTRL[RPROT]=any value (except 0xAA and 0xCC), the read
protection level is 1. At this time, if the level is adjusted to Level 0, mass erase
operation will be performed to erase all data of Flash and backup SRAM. Mass
erase only affects user code area, and write-protected other option bytes and
OTP will not be affected.
Level 2
When FMC_OPTCTRL[RPROT]=0xCC, the read protection level is 2. Then:
Reserve the read protection function of Level 1
It is not allowed to bootstrap from RAM or system memory
JTAG, SWV, ETM and boundary scan is disabled
The option byte is locked
Note: When the read protection level is set to 2, it cannot be degraded any
more.
OTP
The following table shows OTP structure.
Table 13 OTP Structure
Address
[31:0]
[63:32]
[95:64]
[127:96]
Block
0x1FFF 7800
OTP0
OTP0
OTP0
OTP0
Data
block 0
0x1FFF 7810
OTP0
OTP0
OTP0
OTP0
0x1FFF 7820
OTP1
OTP1
OTP1
OTP1
Data
block 1
0x1FFF 7830
OTP1
OTP1
OTP1
OTP1
0x1FFF 7840
OTP2
OTP2
OTP2
OTP2
Data
block 2
0x1FFF 7850
OTP2
OTP2
OTP2
OTP2
……
……
……
0x1FFF 79E0
OTP15
OTP15
OTP15
OTP15
Data
block 15
0x1FFF 79F0
OTP15
OTP15
OTP15
OTP15
0x1FFF 7A00
LOCKB0
…
LOCKB3
LOCKB4
…
LOCKB7
LOCKB8
…
LOCKB11
LOCKB12
…
LOCKB15
Lock
block
OTP consists of 16 32-byte data blocks and 1 16-byte lock block. The lock block
n is used to lock the data block n (n=0…15), and the corresponding data block