
MOTOROLA
8-20
DEVELOPMENT SUPPORT
For More Information On This Product,
Go to: www.freescale.com
RCPU
REFERENCE MANUAL
8.2.2 Internal Breakpoints
Internal breakpoints are generated from the watchpoints. The user may enable a
watchpoint to create a breakpoint by setting the associated software trap enable bit
in the ICTRL or LCTRL2 register. This can be done by a software monitor program
executed by the MCU. An external development tool can also enable internal
breakpoints from watchpoints by setting the associated development port trap en-
able bit using the development port serial interface.
Internal breakpoints can also be generated by assigning a breakpoint counter to a
particular watchpoint. The counter counts down for each watchpoint, and a break-
point is generated when the counter reaches zero.
An internal breakpoint progresses in the machine along with the instruction that
caused it (fetch or load/store cycle). When a breakpoint reaches the top of the his-
tory buffer, the machine processes the breakpoint exception.
An instruction that causes an I-bus breakpoint is not retired. The processor branch-
es to the breakpoint exception routine
before
it executes the instruction. An instruc-
tion that causes an L-bus breakpoint is executed. The processor branches to the
breakpoint exception routine
after
it executes the instruction. The address of the
load/store cycle that generated the L-bus breakpoint is stored in the breakpoint ad-
dress register (BAR).
8.2.2.1 Breakpoint Counters
There are two 16-bit down counters. Each counter is able to count one of the I-bus
watchpoints or one of the L-bus watchpoints. Both generate the corresponding
breakpoint when they reach zero. If the instruction associated with the watchpoint
is not retired, the counter is adjusted back so that it reflects actual execution.
In the masked mode, the counters do not count watchpoints detected when
MSR[RI] = 0. See
8.2.4 Breakpoint Masking
.
When counting watchpoints programmed on the actual instructions that alter the
counters, the counters will have unpredictable values. A
sync
instruction should be
inserted before a read of an active counter.
8.2.2.2 Trap-Enable Programming
The trap enable bits can be programmed by regular, supervisor-level software (by
writing to the ICTRL or LCTRL2 with the
mtspr
instruction) or “on the fly” using the
development port interface. For more information on the latter method, refer to
8.3.5 Trap-Enable Input Transmissions
.
The value used by the breakpoints generation logic is the bit-wise OR of the soft-
ware trap enable bits (the bits written using the
mtspr)
and the development port
trap enable bits (the bits serially shifted using the development port).
All bits, the software trap-enable bits and the development port trap enable bits,
can be read from ICTRL and the LCTRL2 using
mfspr
. For the exact bits place-
ment refer to
Table 8-30
and
Table 8-32
.
F
Freescale Semiconductor, Inc.
n
.