![](http://datasheet.mmic.net.cn/370000/P312XDP512F0VFV_datasheet_16728159/P312XDP512F0VFV_705.png)
Chapter 19 Debug (S12XDBGV2)
MC9S12XDP512 Data Sheet, Rev. 2.17
Freescale Semiconductor
705
19.3.1.7
Debug State Control Registers
Each of the state sequencer states 1 to 3 features a dedicated control register to determine if transitions
from that state are allowed depending upon comparator matches or tag hits and to define the next state for
the state sequencer following a match. The 3 debug state control registers are located at the same address
in the register address map (0x0027). Each register can be accessed using the COMRV bits in DBGC1 to
blend in the required register (see
Table 19-19
).
19.3.1.8
Debug State Control Register 1 (DBGSCR1)
Read: Anytime
Write: Anytime when DBG not armed.
This register is visible at 0x0027 only with COMRV[1:0] = 00. The state control register 1 selects the
targeted next state while in State1. The matches refer to the match channels of the comparator match
controllogicasdepictedin
Figure 19-1
anddescribedin
Section 19.3.1.11.1,“DebugComparatorControl
Register (DBGXCTL)”
. Comparators must be enabled by setting the comparator enable bit in the
associated DBGXCTL control register.
Table 19-19. State Control Register Access Encoding
COMRV
Visible State Control Register
00
01
10
11
DBGSCR1
DBGSCR2
DBGSCR3
DBGSCR3
0x0027
7
0
6
0
5
0
4
0
3
2
1
0
R
W
SC3
SC2
SC1
SC0
Reset
0
0
0
0
0
0
0
0
Unimplemented or Reserved
Figure 19-10. Debug State Control Register 1 (DBGSCR1)
Table 19-20. DBGSCR1 Field Descriptions
Field
Description
3–0
SC[3:0}
State Control Bits
— These bits select the targeted next state while in State1, based upon the match event.
See
Table 19-21
.
The trigger priorities described in
Table 19-38
dictate that in the case of simultaneous matches, the match on
the lower channel number ([0,1,2,3) has priority. The SC[3:0] encoding ensures that a match leading to final
state has priority over all other matches.