![](http://datasheet.mmic.net.cn/370000/P9S12XEP100J1VVLR_datasheet_16728329/P9S12XEP100J1VVLR_331.png)
Chapter 8 S12X Debug (S12XDBGV3) Module
MC9S12XE-Family Reference Manual Rev. 1.07
Freescale Semiconductor
331
and generating a breakpoint, if breakpoints are enabled. External tagging is only possible in device
emulation modes.
8.4.3.4
Trigger On XGATE S/W Breakpoint Request
The XGATE S/W breakpoint request issues a forced breakpoint request to the CPU12X immediately
independent of S12XDBG settings and triggers the state sequencer into the disarmed state. Active tracing
sessions are terminated immediately, thus if tracing has not yet begun, no trace information is stored.
XGATE generated breakpoints are independent of the DBGBRK bits. The XGSBPE bit in DBGC1
determines if the XGATE S/W breakpoint function is enabled. The BDM bit in DBGC1 determines if the
XGATErequestedbreakpointcausesthesystemtoenterBDMModeorinitiateasoftwareinterrupt(SWI).
8.4.3.5
TRIG Immediate Trigger
Independent of comparator matches or external tag signals it is possible to initiate a tracing session and/or
breakpointbywritingtheTRIGbitinDBGC1toalogic“1”.Ifconfiguredforbeginormidalignedtracing,
this triggers the state sequencer into the Final State, if configured for end alignment, setting the TRIG bit
disarms the module, ending the session. If breakpoints are enabled, a forced breakpoint request is issued
immediately (end alignment) or when tracing has completed (begin or mid alignment).
8.4.3.6
Trigger Priorities
Incaseofsimultaneoustriggers,thepriorityisresolvedaccordingto
Table 8-41
.Thelowerprioritytrigger
is suppressed. It is thus possible to miss a lower priority trigger if it occurs simultaneously with a trigger
of a higher priority. The trigger priorities described in
Table 8-41
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 independent of current state sequencer
state. When configured for range modes a simultaneous match of comparators A and C generates an active
match0 whilst match2 is suppressed.
If a write access to DBGC1 with the ARM bit position set occurs simultaneously to a hardware disarm
from an internal trigger event, then the ARM bit is cleared due to the hardware disarm.
Table 8-41. Trigger Priorities
Priority
Highest
Source
XGATE
TRIG
Action
Immediate forced breakpoint......(Tracing terminated immediately).
Trigger immediately to final state (begin or mid aligned tracing enabled)
Trigger immediately to state 0 (end aligned or no tracing enabled)
External TAGHI/TAGLO
Match0 (force or tag hit)
Match1 (force or tag hit)
Match2 (force or tag hit)
Match3 (force or tag hit)
Enter State0
Trigger to next state as defined by state control registers
Trigger to next state as defined by state control registers
Trigger to next state as defined by state control registers
Lowest
Trigger to next state as defined by state control registers