Functional Peripherals Registers
174
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Cortex-M4F Peripherals
2.4.7.1
DHCSR Register (Offset = DF0h) [reset = 00000000h]
Register mask: FFFEFFFFh
DHCSR is shown in
and described in
Debug Halting Control and Status Register. The purpose of the Debug Halting Control and Status Register
(DHCSR) is to provide status information about the state of the processor, enable core debug, halt and
step the processor. For writes, 0xA05F must be written to bits [31:16], otherwise the write operation is
ignored and no bits are written into the register. If not enabled for Halting mode, C_DEBUGEN = 1, all
other fields are disabled. This register is not reset on a system reset. It is reset by a POR reset. However,
the C_HALT bit always clears on a system reset. To halt on a reset, the following bits must be enabled: bit
[0], VC_CORERESET, of the Debug Exception and Monitor Control Register and bit [0],C_DEBUGEN, of
the Debug Halting Control and Status Register. Note that writes to this register in any size other than word
are Unpredictable. It is acceptable to read in any size, and you can use it to avoid or intentionally change
a sticky bit. Bit 16 of DHCSR is Unpredictable on reset.
Figure 2-83. DHCSR Register
31
30
29
28
27
26
25
24
RESERVED
S_RESET_ST
S_RETIRE_ST
rw-(0)
r-(0)
r-(0)
23
22
21
20
19
18
17
16
RESERVED
S_LOCKUP
S_SLEEP
S_HALT
S_REGRDY
rw-(0)
r-(0)
r-(0)
r-(0)
r-(X)
15
14
13
12
11
10
9
8
RESERVED
rw-(0)
7
6
5
4
3
2
1
0
RESERVED
C_SNAPSTALL
RESERVED
C_MASKINTS
C_STEP
C_HALT
C_DEBUGEN
rw-(0)
rw-(0)
rw-(0)
rw-(0)
rw-(0)
rw-(0)
rw-(0)
Table 2-93. DHCSR Register Field Descriptions
Bit
Field
Type
Reset
Description
31-26
RESERVED
R/W
0h
25
S_RESET_ST
R
0h
Indicates that the core has been reset, or is now being reset, since
the last time this bit was read. This a sticky bit that clears on read.
So, reading twice and getting 1 then 0 means it was reset in the
past. Reading twice and getting 1 both times means that it is being
reset now (held in reset still).
24
S_RETIRE_ST
R
0h
Indicates that an instruction has completed since last read. This is a
sticky bit that clears on read. This determines if the core is stalled on
a load/store or fetch.
23-20
RESERVED
R/W
0h
19
S_LOCKUP
R
0h
Reads as one if the core is running (not halted) and a lockup
condition is present.
18
S_SLEEP
R
0h
Indicates that the core is sleeping (WFI, WFE, or SLEEP-ON-EXIT).
Must use C_HALT to gain control or wait for interrupt to wake-up.
17
S_HALT
R
0h
The core is in debug state when S_HALT is set.
16
S_REGRDY
R
X
Register Read/Write on the Debug Core Register Selector register is
available. Last transfer is complete.
15-6
RESERVED
R/W
0h