
Debug Support
ARM DDI 0144B
Copyright 1999, 2000 ARM Limited. All rights reserved.
8-31
A legal debug instruction can be placed in the instruction data bus of scan chain 1 with
bit 33 (the SYSSPEED bit) LOW. This instruction is then executed at debug speed. To
execute an instruction at system speed, a
NOP
(such as
MOV R0, R0
) must be scanned in
as the next instruction with bit 33 set HIGH.
After the system speed instructions have been scanned into the instruction data bus and
clocked into the pipeline, the RESTART instruction must be loaded into the TAP
controller. This causes the ARM9TDMI core to automatically resynchronize back to
GCLK
when the TAP controller enters RUN-TEST/IDLE state, and execute the
instruction at system speed. Debug state is re-entered when the instruction completes
execution, when the processor switches itself back to the internally generated
DCLK
.
When the instruction has completed,
DBGACK
is HIGH. At this point INTEST can be
selected in the TAP controller, and debugging can resume.
Note
When performing system speed accesses, the caches operate as usual, for example,
performing cache lookups, linefills, and evicting lines. To prevent the contents of the
caches being altered, it is necessary to disable them first. However, when the caches are
disabled their contents are preserved. This means that if a write to an address that was
held in the data cache occurs while the data cache is disabled, the updatedoes not affect
the data cache. If the data cache is then switched back on, it still holds the out of date
version of the data, which appears valid. This results in unrecoverable data corruption.
To prevent this, you are recommended to always clean and flush the data cache before
you disable it.
To determine if a system speed instruction has completed, the debugger must look at
SYSCOMP (bit 3 of the debug status register). To access memory, the ARM9TDMI
core must access memory through the data bus interface, as this access might be stalled
indefinitely by
nWAIT
. The only way to determine if the memory access has
completed, is to examine the SYSCOMP bit. When this bit is HIGH, the instruction has
completed.
By the use of system speed load multiples and debug store multiples, the state of the
system memory can be passed to the debug host.
8.8.3
Instructions that can have the SYSSPEED bit set
The only valid instructions that can have this bit set are:
loads
stores
load multiple
store multiple.