Debug in Depth
B-28
Copyright © 2001, 2004 ARM Limited. All rights reserved.
ARM DDI 0210C
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.
Figure B-6 Debug exit sequence
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.
Ab
N
S
S
Ab+4 Ab+8
Internal cycles
CLK
nMREQ
SEQ
A[31:0]
D[31:0]
DBGACK
Summary of Contents for ARM7TDMI
Page 6: ...Contents vi Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Page 10: ...List of Tables x Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Page 14: ...List of Figures xiv Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Page 46: ...Introduction 1 26 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Page 120: ...Coprocessor Interface 4 18 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Page 142: ...Debug Interface 5 22 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Page 282: ...Glossary Glossary 6 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...