
Debug Interface
ARM DDI 0192A
Copyright ARM Limited 1997, 1998, 2000. All rights reserved.
7-7
7.3
Entering debug state
ARM7TDM is forced into debug state after a breakpoint, watchpoint, or debug request.
You can program the conditions under which a breakpoint or watchpoint occur using
EmbeddedICE Logic. Alternatively, external logic can monitor the address and data
bus, and flag breakpoints and watchpoints using the
BREAKPOINT
pin.
7.3.1
Entering debug state on breakpoint
After an instruction has been breakpointed, the core does not enter debug state
immediately. Instructions are marked as being breakpointed as they enter the
ARM7TDM instruction pipeline. Therefore ARM7TDM only enters debug state when
and if the instruction reaches the execute stage of the pipeline.
There are two reasons why a breakpointed instruction might not cause ARM7TDM to
enter debug state:
A branch precedes the breakpointed instruction. When the branch is executed,
the instruction pipeline is flushed and the breakpoint is canceled.
An exception has occurred. Again, the instruction pipeline is flushed and the
breakpoint is canceled. However, the normal way to exit from an exception is to
branch back to the instruction that would have executed next. This involves
refilling the pipeline, and so the breakpoint can be re-flagged.
When a breakpointed conditional instruction reaches the Execute stage of the pipeline,
the breakpoint is
always
taken and ARM7TDM enters debug state, regardless of
whether the condition was met.
Breakpointed instructions
are not
executed. Instead, ARM7TDM enters debug state, so
that when the internal state is examined, the state
before
the breakpointed instruction is
seen. Once examination is complete, the breakpoint must be removed and program
execution restarted from the previously breakpointed instruction.
7.3.2
Entering debug state on watchpoint
Watchpoints occur on data accesses. A watchpoint is always taken, but the core might
not enter debug state immediately. In all cases, the current instruction does complete. If
this is a multi-word load or store (
LDM
or
STM
), many cycles can elapse before the
watchpoint is taken.
Watchpoints are similar to Data Aborts. The difference is that if a Data Abort occurs,
although the instruction completes, all subsequent changes to ARM7TDM state are
prevented. This allows the cause of the abort to be cured by the abort handler, and the