72
SAM4CP [DATASHEET]
43051E–ATPL–08/14
Notes: 1.
To simplify the software layer, the CMSIS only uses IRQ numbers and therefore uses negative values for
exceptions other than interrupts. The IPSR returns the Exception number, see
“Interrupt Program Status
Register”
.
See
“Vector Table”
for more information.
See
“System Handler Priority Registers”
.
See
“Interrupt Priority Registers”
.
Increasing in steps of 4.
2.
3.
4.
5.
For an asynchronous exception, other than reset, the processor can execute another instruction between when the
exception is triggered and when the processor enters the exception handler.
Privileged software can disable the exceptions that
Table 12-9
shows as having configurable priority, see:
“System Handler Control and State Register”
.
“Interrupt Clear-enable Registers”
.
For more information about hard faults, memory management faults, bus faults, and usage faults, see
“Fault Handling”
.
12.4.3.3 Exception Handlers
The processor handles exceptions using:
Interrupt Service Routines (ISRs)
Interrupts IRQ0 to IRQ40 are the exceptions handled by ISRs.
Fault Handlers
Hard fault, memory management fault, usage fault, bus fault are fault exceptions handled by the fault handlers.
System Handlers
NMI, PendSV, SVCall SysTick, and the fault exceptions are all system exceptions that are handled by system
handlers.
Table 12-9.
Properties of the Different Exception Types
Exception
Number
(1)
Irq
Number
(1)
Exception Type
Priority
Vector Address
or Offset
(2)
Activation
1
-
Reset
-3, the highest
0x00000004
Asynchronous
2
-14
NMI
-2
0x00000008
Asynchronous
3
-13
Hard fault
-1
0x0000000C
-
4
-12
Memory
management fault
Configurable
(3)
0x00000010
Synchronous
5
-11
Bus fault
Configurable
(3)
0x00000014
Synchronous when precise,
asynchronous when imprecise
6
-10
Usage fault
Configurable
(3)
0x00000018
Synchronous
7 - 10
-
-
-
Reserved
-
11
-5
SVCall
Configurable
(3)
0x0000002C
Synchronous
12 - 13
-
-
-
Reserved
-
14
-2
PendSV
Configurable
(3)
0x00000038
Asynchronous
15
-1
SysTick
Configurable
(3)
0x0000003C
Asynchronous
16 and
above
0 and above
Interrupt (IRQ)
Configurable
(4)
0x00000040
and above
(5)
Asynchronous