Figure B-6 Debug Exit Sequence - ARM ARM7TDMI Technical Reference Manual

Hide thumbs Also See for ARM7TDMI:
Table of Contents

Advertisement

Debug in Depth
B-28
The function of DBGACK is to tell the rest of the system when the core is in debug
state. It is used to:
inhibit peripherals such as watchdog timers that have real time characteristics
mask out memory accesses that are caused by the debugging process.
When the core enters debug state after a breakpoint, the instruction pipeline contains the
breakpointed instruction plus two other instructions that have been prefetched. On entry
to debug state, the pipeline is flushed, so on exit from debug state, the pipeline must be
refilled to its previous state. The transition into and out of debug state causes extra
memory accesses. You can use DBGACK to inhibit any system peripheral that is
sensitive to the number of memory accesses performed, as shown in Example B-3.
Example B-3 Using DBGACK to mask out memory accesses
Consider a peripheral that counts the number of memory cycles. This cycle counter
must return the same count whether a program is run with or without debugging.
Figure B-6 shows the behavior of the core on exit from debug state.
CLK
nMREQ
SEQ
A[31:0]
D[31:0]
DBGACK
As shown in Figure 5-3 on page 5-8, the final memory access occurs in the cycle after
DBGACK goes HIGH. This is the point at which the cycle counter must be disabled.
Figure B-6 shows that the first memory access that has not been counted before occurs
in the cycle after DBGACK goes LOW, so this is when the counter must be re-enabled.
Copyright © 2001, 2004 ARM Limited. All rights reserved.
Internal cycles
N
S
S
Ab
Ab+4 Ab+8

Figure B-6 Debug exit sequence

ARM DDI 0210C

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents