ARM ARM9TDMI Technical Reference Manual page 91

General-purpose microprocessors
Table of Contents

Advertisement

5.12.6
System speed accesses
5.12.7
Summary of return address calculations
ARM DDI0145B
This restores the PC, and restarts the program from the next instruction.
If a system speed access is performed during debug state, the value of the PC is
increased by five addresses. Since system speed instructions access the memory system,
it is possible for aborts to take place. If an abort occurs during a system speed memory
access, the ARM9TDMI enters abort mode before returning to debug state.
This is similar to an aborted watchpoint. However, the problem is much harder to fix
because the abort was not caused by an instruction in the main program, and the PC does
not point to the instruction that caused the abort. An abort handler usually looks at the
PC to determine the instruction that caused the abort, and hence the abort address. In
this case, the value of the PC is invalid, but the debugger will know the address of the
location that was being accessed. Thus the debugger can be written to help the abort
handler fix the memory system.
The calculation of the branch return address can be summarized as:
-(4 + N +5S)
where
is the number of debug speed instructions executed (including the final branch),
N
and
is the number of system speed instructions executed.
S
Copyright © 1998, 1999 ARM Limited. All rights reserved.
Debug Support
5-37

Advertisement

Table of Contents
loading

Table of Contents