Debug Interface
ARM7TDMI Data Sheet
ARM DDI 0029E
8-22
O
bit 33 LOW. The core is then clocked to load the branch into the pipeline. Now, the
RESTART instruction is selected in the TAP controller. When the state machine enters
the RUN-TEST/IDLE state, the scan chain will revert back to system mode and clock
resynchronisation to
MCLK
will occur within ARM7TDMI. ARM7TDMI will then resume
normal operation, fetching instructions from memory. This delay, until the state
machine is in the RUN-TEST/IDLE state, allows conditions to be set up in other
devices in a multiprocessor system without taking immediate effect. Then, when the
RUN-TEST/IDLE state is entered, all the processors resume operation
simultaneously.
The function of
DBGACK
is to tell the rest of the system when ARM7TDMI is in debug
state. This can be used to inhibit peripherals such as watchdog timers which have real
time characteristics. Also,
DBGACK
can be used to mask out memory accesses
which are caused by the debugging process. For example, when ARM7TDMI enters
debug state after a breakpoint, the instruction pipeline contains the breakpointed
instruction plus two other instructions which have been prefetched. On entry to debug
state, the pipeline is flushed. Therefore, on exit from debug state, the pipeline must be
refilled to its previous state. Thus, because of the debugging process, more memory
accesses occur than would normally be expected. Any system peripheral which may
be sensitive to the number of memory accesses can be inhibited through the use of
DBGACK
.
For example, imagine a fictitious peripheral that simply counts the number of memory
cycles. This device should return the same answer after a program has been run both
with and without debugging.
·
Figure 8-7: Debug exit sequence
on page 8-22 shows
the behaviour of ARM7TDMI on exit from the debug state.
Figure 8-7: Debug exit sequence
ECLK
nMREQ
SEQ
A[31:0]
D[31:0]
DBGACK
Internal Cycles
N
S
S
Ab
Ab+4 Ab+8