Programmer’s Model
2-18
Copyright © 2001, 2004 ARM Limited. All rights reserved.
ARM DDI 0210C
Note
Exceptions are always entered in ARM state. When the processor is in Thumb state and
an exception occurs, the switch to ARM state takes place automatically when the
exception vector address is loaded into the PC. An exception handler might change to
Thumb state but it must return to ARM state to enable the exception handler to
terminate correctly.
2.8.3
Leaving an exception
When an exception is completed, the exception handler must:
1.
Move the LR, minus an offset to the PC. The offset varies according to the type
of exception, as shown in Table 2-3 on page 2-16.
2.
Copy the SPSR back to the CPSR.
3.
Clear the interrupt disable flags that were set on entry.
Note
The action of restoring the CPSR from the SPSR automatically resets the T bit to
whatever value it held immediately prior to the exception.
2.8.4
Fast interrupt request
The
Fast Interrupt Request
(FIQ) exception supports data transfers or channel
processes. In ARM state, FIQ mode has eight banked registers to remove the
requirement for register saving. This minimizes the overhead of context switching.
An FIQ is externally generated by taking the
nFIQ
input LOW. The input passes into
the core through a synchronizer.
Irrespective of whether exception entry is from ARM state or from Thumb state, an FIQ
handler returns from the interrupt by executing:
SUBS PC,R14_fiq,#4
FIQ exceptions can be disabled within a privileged mode by setting the CPSR F flag.
When the F flag is clear, the ARM7TDMI processor checks for a LOW level on the
output of the FIQ synchronizer at the end of each instruction.
Содержание ARM7TDMI
Страница 6: ...Contents vi Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 10: ...List of Tables x Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 14: ...List of Figures xiv Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 46: ...Introduction 1 26 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 120: ...Coprocessor Interface 4 18 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 142: ...Debug Interface 5 22 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 276: ...Differences Between Rev 3a and Rev 4 C 6 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 282: ...Glossary Glossary 6 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...