ARM ARM7TDMI User Manual Page 63

  • Download
  • Add to my manuals
  • Print
  • Page
    / 242
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 62
Programmer’s Model
ARM DDI 0234B Copyright © 2001 ARM Limited. All rights reserved. 2-21
Note
Exceptions are always handled 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.
2.9.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-19.
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 restores the T, F, and I
bits to whatever value they held immediately prior to the exception.
2.9.4 Fast interrupt request
The Fast Interrupt Request (FIQ) exception supports data transfers or channel
processes. In ARM state, FIQ mode has eight private registers to remove the need for
register saving (this minimizes the overhead of context switching).
An FIQ is externally generated by taking the nFIQ signal input LOW.
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
You can disable FIQ exceptions within a privileged mode by setting the CPSR F flag.
When the F flag is clear, the ARM7TDMI-S checks for a LOW level on the output of
the FIQ synchronizer at the end of each instruction.
2.9.5 Interrupt request
The Interrupt Request (IRQ) exception is a normal interrupt caused by a LOW level on
the nIRQ input. IRQ has a lower priority than FIQ, and is masked on entry to an FIQ
sequence. You can disable IRQ at any time, by setting the I bit in the CPSR from a
privileged mode.
Page view 62
1 2 ... 58 59 60 61 62 63 64 65 66 67 68 ... 241 242

Comments to this Manuals

No comments