![GigaDevice Semiconductor GD32E23 Series Скачать руководство пользователя страница 53](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794053.webp)
GD32E23x User Manual
53
No protection: when setting OB_SPC byte and its complement value to 0xA55A, no
protection performed. The main flash and option bytes block are accessible by all operations.
Protection level low: when setting OB_SPC byte and its complement value to any value
except 0xA55A or 0xCC33, protection level low performed. The main flash can only be
accessed by user code. In debug mode, boot from SRAM or boot from boot loader mode, all
operations to main flash is forbidden. If a read operation is executed to main flash in debug
mode, boot from SRAM or boot from boot loader mode, a bus error will be generated. If a
program/erase operation is executed to main flash in debug mode, boot from SRAM or boot
from boot loader mode, the PGERR bit in FMC_STAT register will be set. At protection level
low, option bytes block are accessible by all operations. If program back to no protection
level by setting OB_SPC byte and its complement value to 0xA55A, a mass erase for main
flash will be performed.
Protection level high: when set OB_SPC byte and its complement value to 0xCC33,
protection level high performed. When this level is programmed in debug mode, boot from
SRAM or boot from boot loader mode is disabled. The main flash block is accessible by all
operations from user code. The option byte cannot be erased, and the OB_SPC byte and its
complement value cannot be reprogrammed. So, if protection level high is programmed, it
cannot move back to protection level low or no protection level.
Note:
In the case of read protection, the first 4k of flash cannot be programmed or erased.