![NXP Semiconductors freescale semiconductor ColdFire MCF51CN128 Series Скачать руководство пользователя страница 477](http://html1.mh-extra.com/html/nxp-semiconductors/freescale-semiconductor-coldfire-mcf51cn128-series/freescale-semiconductor-coldfire-mcf51cn128-series_reference-manual_1721790477.webp)
Version 1 ColdFire Debug (CF1_DEBUG)
MCF51CN128 Reference Manual
,
Rev. 6
20-58
Freescale Semiconductor
20.4.3.1
Begin Execution of Taken Branch (PST = 0x05)
The PST is 0x05 when a taken branch is executed. For some opcodes, a branch target address may be
loaded into the trace buffer (PSTB) depending on the CSR settings. CSR also controls the number of
address bytes loaded that is indicated by the PST marker value immediately preceding the DDATA entry
in the PSTB that begins the address entries.
Multiple byte DDATA values are displayed in least-to-most-significant order. The processor captures only
those target addresses associated with taken branches that use a variant addressing mode (RTE and RTS
instructions, JMP and JSR instructions using address register indirect or indexed addressing modes, and
all exception vectors).
The simplest example of a branch instruction using a variant address is the compiled code for a C language
case statement. Typically, the evaluation of this statement uses the variable of an expression as an index
into a table of offsets, where each offset points to a unique case within the structure. For such
change-of-flow operations, the ColdFire processor loads the PSTB as follows:
1. Load PST=0x05 to identify that a taken branch is executed.
2. Optionally load the marker for the target address capture. Encodings 0x0D or 0x0E identify the
number of bytes loaded into the PSTB
.
3. The new target address is optionally available in the PSTB. The number of bytes of the target
address loaded is configurable (2 or 3 bytes, where the encoding is 0x0D and 0x0E, respectively).
0x1B
This value signals there has been a change in the breakpoint trigger state machine. It appears as a
single marker for each state change and is immediately followed by a DDATA value signaling the new
breakpoint trigger state encoding.
The DDATA breakpoint trigger state value is defined as (0x20 + 2
×
CSR[BSTAT]):
0x20 No breakpoints enabled
0x22 Waiting for a level-1 breakpoint
0x24 Level-1 breakpoint triggered
0x2A Waiting for a level-2 breakpoint
0x2C Level-2 breakpoint triggered
0x1C
Exception processing. This value signals the processor has encountered an exception condition.
Although this is a multi-cycle mode, there are only two PST = 0x1C values recorded before the mode
value is suppressed.
0x1D
Emulator mode exception processing. This value signals the processor has encountered a debug
interrupt or a properly-configured trace exception. Although this is a multi-cycle mode, there are only
two PST = 0x1D values recorded before the mode value is suppressed.
0x1E
Processor is stopped. This value signals the processor has executed a STOP instruction. Although this
is a multi-cycle mode because the ColdFire processor remains stopped until an interrupt or reset
occurs, there are only two PST = 0x1E values recorded before the mode value is suppressed
.
0x1F
Processor is halted. This value signals the processor has been halted. Although this is a multi-cycle
mode because the ColdFire processor remains halted until a BDM go command is received or reset
occurs, there are only two PST = 0x1F values recorded before the mode value is suppressed
.
Table 20-26. CF1 Debug Processor Status Encodings (continued)
PST[4:0]
Definition