English
Language : 

S912XEG128J2MAA Datasheet, PDF (343/1324 Pages) Freescale Semiconductor, Inc – Microcontrollers
Chapter 8 S12X Debug (S12XDBGV3) Module
8.4.7.1 XGATE Software Breakpoints
The XGATE software breakpoint instruction BRK can request a CPU12X breakpoint, via the S12XDBG
module. In this case, if the XGSBPE bit is set, the S12XDBG module immediately generates a forced
breakpoint request to the CPU12X, the state sequencer is returned to state0 and tracing, if active, is
terminated. If configured for BEGIN trigger and tracing has not yet been triggered from another source,
the trace buffer contains no information. Breakpoint requests from the XGATE module do not depend
upon the state of the DBGBRK or ARM bits in DBGC1. They depend solely on the state of the XGSBPE
and BDM bits. Thus it is not necessary to ARM the DBG module to use XGATE software breakpoints to
generate breakpoints in the CPU12X program flow, but it is necessary to set XGSBPE. Furthermore, if a
breakpoint to BDM is required, the BDM bit must also be set. When the XGATE requests an CPU12X
breakpoint, the XGATE program flow stops by default, independent of the S12XDBG module.
8.4.7.2 Breakpoints From Internal Comparator Channel Final State Triggers
Breakpoints can be generated when internal comparator channels trigger the state sequencer to the Final
State. If configured for tagging, then the breakpoint is generated when the tagged opcode reaches the
execution stage of the instruction queue.
If a tracing session is selected by TSOURCE, breakpoints are requested when the tracing session has
completed, thus if Begin or Mid aligned triggering is selected, the breakpoint is requested only on
completion of the subsequent trace (see Table 8-48). If no tracing session is selected, breakpoints are
requested immediately.
If the BRK bit is set on the triggering channel, then the breakpoint is generated immediately independent
of tracing trigger alignment.
BRK
0
0
0
0
0
0
1
1
x
Table 8-48. Breakpoint Setup For Both XGATE and CPU12X Breakpoints
TALIGN
00
00
01
01
10
10
00,01,10
00,01,10
11
DBGBRK[n]
0
1
0
1
0
1
1
0
x
Breakpoint Alignment
Fill Trace Buffer until trigger
(no breakpoints — keep running)
Fill Trace Buffer until trigger, then breakpoint request occurs
Start Trace Buffer at trigger
(no breakpoints — keep running)
Start Trace Buffer at trigger
A breakpoint request occurs when Trace Buffer is full
Store a further 32 Trace Buffer line entries after trigger
(no breakpoints — keep running)
Store a further 32 Trace Buffer line entries after trigger
Request breakpoint after the 32 further Trace Buffer entries
Terminate tracing and generate breakpoint immediately on trigger
Terminate tracing immediately on trigger
Reserved
MC9S12XE-Family Reference Manual Rev. 1.25
Freescale Semiconductor
343