ARM7TDMI-S Modes of Operation
455
SNIU028A – February 2016 – Revised April 2016
Copyright © 2016, Texas Instruments Incorporated
ARM7TDMI-S MPUSS
14.1.1 Exceptions
During the ordinary flow of execution in a user program, the Program Counter usually increases
sequentially through the address space, with perhaps a branch here or there to nearby labels, or with
branch-and-links to subroutines and functions.
An
exception
causes this normal flow of execution to be diverted. Exceptions are generated by sources
internal or external to the processor. This allows the processor to handle events generated by these
sources. Such events include:
•
interrupts generated by some peripheral device
•
an attempt to execute an undefined or unimplemented instruction
•
a software-generated interrupt, via the swi instruction
The ARM processor supports seven types of exceptions. These are listed in
, along with the
processor mode that is used to handle it. When an exception occurs, the processor branches to a fixed
address that corresponds to that exception. This fixed address, called the
exception vector address
, is
located in the bottom 32 bytes of the memory map. These 32 bytes are called the
exception vector table.
Note, from
, that there is just enough room at each vector address for one instruction (4 bytes).
This is usually initialized to be a branch instruction or something like “ldr pc, [pc, #24]”.
Table 14-5. ARM Processor Exceptions
Exception Type
Processor Mode
Vector Address
Reset
Supervisor
0x0000000
Undefined Instructions
Undefined
0x0000004
Software Interrupt (swi)
Supervisor
0x0000008
Prefetch Abort (instruction fetch memory abort)
Abort
0x000000C
Data Abort (data access memory abort)
Abort
0x0000010
Interrupt (IRQ)
Interrupt (IRQ)
0x0000018
Fast Interrupt (FIQ)
Fast Interrupt (FIQ)
0x000001C
14.2 Hardware Interrupts
The ARM processor has only two hardware interrupt vectors, the IRQ and the FIQ.
•
IRQs are normally assigned to general purpose interrupts like periodic timers
•
FIQ is reserved for one single interrupt source that requires fast response time, like faults or any time
critical task that requires fast response
Therefore all interrupt sources in UCD3138 peripherals can be mapped into one of the following interrupt
service routines.
14.2.1 Standard Interrupt (IRQ)
IRQ is the standard interrupt routine, and usually will be assigned to perform the time sensitive (but not
time critical) and periodic tasks of the program.
•
Time sensitive means that the assigned task needs to be done within certain fixed and pre-determined
time period.
•
Time critical means that the assigned task needs to be performed immediately or within a very tight
time period.