English
Language : 

S912XHZ512F1VAG Datasheet, PDF (796/978 Pages) Freescale Semiconductor, Inc – Covers MC9S12XHZ384, MC9S12XHZ256
Chapter 22 S12X Debug (S12XDBGV3) Module
22.4.5.2.2 Loop1 Mode
Loop1 Mode, similarly to Normal Mode also stores only COF address information to the trace buffer, it
however allows the filtering out of redundant information.
The intent of Loop1 Mode is to prevent the Trace Buffer from being filled entirely with duplicate
information from a looping construct such as delays using the DBNE instruction or polling loops using
BRSET/BRCLR instructions. Immediately after address information is placed in the Trace Buffer, the
S12XDBG module writes this value into a background register. This prevents consecutive duplicate
address entries in the Trace Buffer resulting from repeated branches.
Loop1 Mode only inhibits consecutive duplicate source address entries that would typically be stored in
most tight looping constructs. It does not inhibit repeated entries of destination addresses or vector
addresses, since repeated entries of these would most likely indicate a bug in the user’s code that the
S12XDBG module is designed to help find.
22.4.5.2.3 Detail Mode
In Detail Mode, address and data for all memory and register accesses is stored in the trace buffer. In the
case of XGATE tracing this means that initialization of the R1 register during a vector fetch is not traced.
This mode also features information byte entries to the trace buffer, for each address byte entry. The
information byte indicates the size of access (word or byte) and the type of access (read or write).
When tracing CPU12X activity in Detail Mode, all cycles are traced except those when the CPU12X is
either in a free or opcode fetch cycle. In this mode the XGATE program counter is also traced to provide
a snapshot of the XGATE activity. CXINF information byte bits indicate the type of XGATE activity
occurring at the time of the trace buffer entry. When tracing CPU12X activity alone in Detail Mode, the
address range can be limited to a range specified by the TRANGE bits in DBGTCR. This function uses
comparators C and D to define an address range inside which CPU12X activity should be traced (see
Table 22-43). Thus the traced CPU12X activity can be restricted to particular register range accesses.
When tracing XGATE activity in Detail Mode, all load and store cycles are traced. Additionally the
CPU12X program counter is stored at the time of the XGATE trace buffer entry to provide a snapshot of
CPU12X activity.
22.4.5.2.4 Pure PC Mode
In Pure PC Mode, tracing from the CPU the PC addresses of all executed opcodes, including illegal
opcodes, are stored. In Pure PC Mode, tracing from the XGATE the PC addresses of all executed opcodes
are stored.
22.4.5.3 Trace Buffer Organization
Referring to Table 22-43. An X prefix denotes information from the XGATE module, a C prefix denotes
information from the CPU12X. ADRH, ADRM, ADRL denote address high, middle and low byte
respectively. INF bytes contain control information (R/W, S/D etc.). The numerical suffix indicates which
tracing step. The information format for Loop1 Mode and PurePC Mode is the same as that of Normal
Mode. Whilst tracing from XGATE or CPU12X only, in Normal or Loop1 modes each array line contains
MC9S12XHZ512 Data Sheet, Rev. 1.06
796
Freescale Semiconductor