Specifications

Table Of Contents
ARM Debugger 3 6 A R M S p e c i f i c I m p l e m e n t a t i o n s
©1989-2014 Lauterbach GmbH
Checking Debug Permission
The DBGDSCR (Debug Status and Control Register) bit 16 shows the signal level of SPIDEN. In the SDER
(Secure Debug Enable Register) you can see the SUIDEN flag assuming you are in the secure state which
allows reading the SDER register.
Checking Secure State
In the peripheral file, the DBGDSCR register bit 18 (NS) shows the current secure state. You can also see it
in the Register.view window if you scroll down a bit. On the left side you will see ‘sec’ which means the core
is in the secure state, ‘nsec’ means the core is in non-secure state. Both reflect the bit 0 (NS) of the SCR
(Secure Control Register). However SCR is only accessible in secure state.
In monitor mode, which is also indicated in the Register.view window, the core is always in secure state
independent of the NS bit (non-secure bit) described above. However, in monitor mode, you can access the
secure CP15 register if NS=secure. And you can access the non-secure CP15 register if NS=non-secure.
Changing the Secure State from within TRACE32
From the TRACE32 PowerView GUI, you can switch between secure mode (0) and non-secure mode (1) by
toggling the ‘sec’, ‘nsec’ indicator in the Register.view window or by executing this command:
It sets or clears the NS (Non-Secure) bit in the SCR register. You will get a ‘emulator function blocked by
device security’ message in case you are trying to switch to secure mode although debugging is not allowed
in secure mode.
This way you can also inspect the register of the other world. Please note that a change in state affects
program execution. Remember to set the bit back to its original value before continuing the application
program.
Accessing Memory
If you do not specify otherwise, the debugger shows you the memory of the secure state the core is currently
in.
The access class ‘Z:’ indicates secure mode (‘Z’ -> trustZone, ‘S’ -> Supervisor)
The access class ‘N:’ indicates non-secure mode.
By preceding an address with the ‘Z:’ and ‘N:’ access class, you can force a certain memory view for all
memory operations.
Register.Set NS 0 ;secure mode
Register.Set NS 1 ;non-secure mode