GD32W51x User Manual
77
eturns to unprotected, and Trustzone is disabled. (from protection level 1 to no protec
tion or from protection level 0.5 to no protection). Otherwise, the OBERR bit is set.
2. SECMCFGx_SPAGE[6:0] (x=0,1), SECMCFGx_EPAGE[6:0] (x=0,1), DMPx_EPAGE[6:
0] (x=0,1), DMPxEN (x=0,1) bits
It can only be modified when DMPx_ACCFG (x=0,1) bit is cleared. When it is set, op
tion bytes are locked and can not be modified until next system reset. If the user try
to modify one of the those option bytes while DMPx_ACCFG (x=0,1) bit is set, the o
ption bytes modification is discarded without error flag.
3. When DMPxEN (x = 0,1) is set to 1, an invalid secure DMP area is defined (DMP
x_EPAGE>SECMx_EPAGE)
, the OBERR is set and the option bytes modification will
be discarded.
2.4.8.
TrustZone security protection
If there are option bytes, the global TrustZone system security is activated by setting the
TZEN bit in FMC_OBR register. If there are no option bytes, the global TrustZone system
security is activated by setting the TZEN bit in EFUSE_TZCTL register.
When the TrustZone is active (TZEN=1), additional security features are available:
4 secure mark registers define SIP Flash secure areas.
DMP register defines secure dedicated mark protection areas.
An additional security protection level: protection level 0.5.
Erase or program operation can be performed in secure or non-secure mode with
associated configuration bit.
The secure mark of EXT Flash access by QSPI interface is implemented in the TZSPC
module.
When the TrustZone is disabled (TZEN=0), the above features are deactivated and all secure
registers are RAZ/WI (read as zero/write ignore).
Secure mark area
When TrustZone security is active (TZEN=1), apart of the SIP Flash can be protected against
non-secure read and write access by configure FMC_SECMCFGx(x=0, 1, 2, 3).
Secure mark area 0/1: If there are option bytes, defined by option bytes. Or else defined by
secure software on-the-fly.
Secure mark area 2/3: Defined by secure software on-the-fly.
Secure dedicated mark protection area
(
DMP
)
The secure DMP area is part of a secure area based on Flash secure mark. Configure the
DMPx_ACCFG (x=0,1) bit in FMC_DMPCTL register to set access permission to the DMP