English
Language : 

MC9S12XD256MAL Datasheet, PDF (727/1348 Pages) Freescale Semiconductor, Inc – Freescale’s Scalable Controller Area Network
Chapter 19 S12X Debug (S12XDBGV2) Module
19.4.6.1 External Tagging using TAGHI and TAGLO
External tagging using the external TAGHI and TAGLO pins can only be used to tag CPU opcodes; tagging
of XGATE code using these pins is not possible. An external tag triggers the state sequencer into State0
when the tagged opcode reaches the execution stage of the instruction queue.
The pins operate independently, thus the state of one pin does not affect the function of the other. External
tagging is possible in emulation modes only. The presence of logic level 0 on either pin at the rising edge
of the external clock (ECLK) performs the function indicated in the Table 19-43. It is possible to tag both
bytes of an instruction word. If a taghit comes from the low or high byte, a breakpoint generated according
to the DBGBRK and BDM bits in DBGC1. Each time TAGHI or TAGLO are low on the rising edge of
ECLK, the old tag is replaced by a new one
Table 19-43. Tag Pin Function
TAGHI
1
1
0
0
TAGLO
1
0
1
0
Tag
No tag
Low byte
High byte
Both bytes
19.4.7 Breakpoints
It is possible to select breakpoints to the XGATE and let the CPU continue operation, setting DBGBRK[0],
or breakpoints to the CPU and let the XGATE continue operation setting, DBGBRK[1], or a breakpoint to
both CPU and XGATE, setting both bits DBGBRK[1:0].
There are several ways to generate breakpoints to the XGATE and CPU modules.
• Through XGATE software breakpoint requests.
• From comparator channel triggers to final state.
• Using software to write to the TRIG bit in the DBGC1 register.
• From taghits generated using the external TAGHI and TAGLO pins.
19.4.7.1 XGATE Software Breakpoints
The XGATE software breakpoint instruction BRK can request an CPU breakpoint, via the DBG module.
In this case, if the XGSBPE bit is set, the DBG module immediately generates a forced breakpoint request
to the CPU, 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 new
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
CPU 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 CPU breakpoint, the XGATE program flow
stops by default, independent of the DBG module. The user can thus determine if an XGATE breakpoint
has occurred by reading out the XGATE program counter over the BDM interface.
MC9S12XDP512 Data Sheet, Rev. 2.21
Freescale Semiconductor
729