GD32W51x User Manual
257
TZPCU_
TZIAC_INTENx can be used to enable an illegal access event, if an illegal access
event happened, the flag bit in TZPCU_TZIAC_STATx register will be set,
TZPCU_
TZIAC_STATCx registers can use to clear an illegal access event flag bit.
9.3.6.
SPC/GSSA debug
The DBGEN, SPIDEN, NIDEN and SPNIDEN signals determine the trace and debug state of
secure and non-secure code.
Table 9-4. Trace and debug state
he relationship
between four signals and the state of trace and debug.
Table 9-4. Trace and debug state
signals
trace and debug state
DBGEN
0
Secure and non-secure state debug is disabled
1
Non-secure state debug is enabled
SPIDEN
0
Secure state debug is disabled
1
Secure state debug is enabled
NIDEN
0
Secure and non-secure state trace is disabled
1
Non-secure state trace is enabled
SPNIDEN
0
Secure state trace is disabled
1
Secure state trace is enabled
The state of the signals is set according to the security protection (SPC) level and
TZPCU_
TZSPC_DBG_CFG register, security protection level has a high priority. The reset
value of DBGEN, NIDEN, SPIDEN, and SPNIDEN is 1. If TZEN=0, DBGEN and NIDEN are
automatically set to 1, and SPIDEN and SPNIDEN are automatically set to 0.If TZEN=1, then
DBGEN, NIDEN, SPIDEN, and SPNIDEN are configured through the secure register. The
DBGPAM bits in the TZPCU_TZSPC_PAM_CFGx is used to control the privilege access
mode of TZPCU_TZSPC_DBG_CFG register, and this bit can be read or written only by
secure privilege. In security protection 1 mode, debug cannot access flash, program QSPI,
and read-protected sram.
shows the relationship between
SPC/GSSA and debug.
Table 9-5. SPC/GSSA debug
DBGEN
NIDEN
SPIDEN
SPNIDEN
No protection Register configuration Register configuration Register configuration Register configuration
Protection
level 0.5
Register configuration Register configuration
Force 0
Force 0
Protection
level 1
Register configuration Register configuration
Force 0
Force 0
GSSA
Force 0
Force 0
Force 0
Force 0