1 begin execution of taken branch (pst = 0x5), 1 begin execution of taken branch (pst = 0x5) -4, Section 30.3.1 – Motorola ColdFire MCF5281 User Manual

Page 622: Begin execution of taken branch (pst = 0x5)

Advertising
background image

Debug Support

30-4

Freescale Semiconductor

30.3.1

Begin Execution of Taken Branch (PST = 0x5)

PST is 0x5 when a taken branch is executed. For some opcodes, a branch target address may be displayed
on DDATA depending on the CSR settings. CSR also controls the number of address bytes displayed,
which is indicated by the PST marker value immediately preceding the DDATA nibble that begins the data
output.

Bytes are displayed in least-to-most-significant order. The processor captures only those target addresses
associated with taken branches which use a variant addressing mode, that is, 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 processor uses the debug pins to output the following sequence of
information on successive processor clock cycles:

1. Use PST (0x5) to identify that a taken branch was executed.
2. Using the PST pins, optionally signal the target address to be displayed sequentially on the

DDATA pins. Encodings 0x9–0xB identify the number of bytes displayed.

3. The new target address is optionally available on subsequent cycles using the DDATA port. The

number of bytes of the target address displayed on this port is configurable (2, 3, or 4 bytes).

Another example of a variant branch instruction would be a JMP (A0) instruction.

Figure 30-3

shows the

PST and DDATA outputs that indicate a JMP (A0) execution (assuming the CSR was programmed to
display the lower 2 bytes of an address).

Figure 30-3. Example JMP Instruction Output on PST/DDATA

PST 0x5 indicates a taken branch and the marker value 0x9 indicates a 2-byte address. Thus, the
subsequent 4 nibbles of DDATA display the lower 2 bytes of address register A0 in
least-to-most-significant nibble order. The PST output after the JMP instruction completes depends on the

0xE

1110

Processor is stopped. Appears in multiple-cycle format when the processor executes a STOP
instruction. The ColdFire processor remains stopped until an interrupt occurs, thus PST outputs display
0xE until the stopped mode is exited

.

0xF

1111

Processor is halted. Because this encoding defines a multiple-cycle mode, the PST outputs display 0xF
until the processor is restarted or reset. (see

Section 30.5.1, “CPU Halt

”)

Table 30-2. Processor Status Encoding (continued)

PST[3:0]

Definition

Hex

Binary

DDATA

CLKOUT

0x0

0x0

A[3:0]

0x5

0x9

default

PST

A[7:4]

A[11:8]

A[15:12]

default

default

default

MCF5282 and MCF5216 ColdFire Microcontroller User’s Manual, Rev. 3

Advertising
This manual is related to the following products: