Programmers Model
ARM DDI 0363G
Copyright © 2006-2011 ARM Limited. All rights reserved.
3-17
ID073015
Non-Confidential
Fast interrupt request
The
Fast Interrupt Request
(FIQ) reduces the execution time of the exception handler relative
to a normal interrupt. FIQ mode has eight private registers to reduce, or even remove the
requirement for register saving (minimizing the overhead of context switching).
An FIQ is externally generated by taking the
nFIQ
input signal LOW. You must ensure that the
nFIQ
input is held LOW until the processor acknowledges the interrupt request from the
software handler.
Irrespective of whether exception entry is from ARM state or Thumb state, an FIQ handler
returns from the interrupt by executing:
SUBS PC, R14_fiq, #4
If
Non-Maskable Fast Interrupts
(NMFIs) are not enabled, you can mask FIQ exceptions by
setting the CPSR.F bit to b1. For more information see:
•
•
.
FIQ and IRQ interrupts are automatically masked by setting the CPSR.F and CPSR.I bits when
an FIQ occurs. You can use nested interrupts but it is up to you to save any corruptible registers
and to re-enable interrupts.
Non-maskable fast interrupts
When NMFI behavior is enabled, FIQ interrupts cannot be masked by software. Enabling NMFI
behavior ensures that when the FIQ mask, that is, the CPSR.F bit, is cleared by the reset handler,
fast interrupts are always taken as quickly as possible, except during handling of a fast interrupt.
This makes the fast interrupt suitable for signaling critical events. NMFI behavior is controlled
by a configuration input signal
CFGNMFI
, that is asserted HIGH to enable NMFI operation.
There is no software control of NMFI.
Software can detect whether NMFI operation is enabled by reading the NMFI bit of the SCTLR:
NMFI == 0
Software can mask FIQs by setting the CPSR.F bit to b1.
NMFI == 1
Software cannot mask FIQs.
For more information see
When the NMFI bit in the SCTLR is b1:
•
an instruction writing b0 to the CPSR.F bit clears it to b0
•
an instruction writing b1 to the CPSR.F bit leaves it unchanged
•
the CPSR.F bit can be set to b1 only by an FIQ or reset exception entry.
Low interrupt latency
Low Interrupt Latency
(LIL) is a set of behaviors that reduce the interrupt latency for the
processor, and is enabled by default. That is, the FI bit [21] in the SCTLR is Read-as-One.
LIL behavior enables accesses to Normal memory, including multiword accesses and external
accesses, to be abandoned part-way through execution so that the processor can react to a
pending interrupt faster than would otherwise be the case. When an instruction is abandoned in
this way, the processor behaves as if the instruction was not executed at all. If, after handling the
interrupt, the interrupt handler returns to the program in the normal way using instruction
SUBS
pc, r14, #4
, the abandoned instruction is re-executed. This means that some of the memory
accesses generated by the instruction are performed twice.