
...the world's most energy friendly microcontrollers
2011-02-04 - d0002_Rev1.00
23
www.energymicro.com
Usage fault
A usage fault is an exception that occurs because of a fault related to
instruction execution. This includes:
an undefined instruction
an illegal unaligned access
invalid state on instruction execution
an error on exception return.
The following can cause a usage fault when the core is configured to
report them:
an unaligned address on word and halfword memory access
division by zero.
SVCall
A supervisor call (SVC) is an exception that is triggered by the
SVC
instruction. In an OS environment, applications can use SVC
instructions to access OS kernel functions and device drivers.
PendSV
PendSV is an interrupt-driven request for system-level service. In an
OS environment, use PendSV for context switching when no other
exception is active.
SysTick
A SysTick exception is an exception the system timer generates when
it reaches zero. Software can also generate a SysTick exception. In an
OS environment, the processor can use this exception as system tick.
Interrupt (IRQ)
A interrupt, or IRQ, is an exception signalled by a peripheral, or
generated by a software request. All interrupts are asynchronous
to instruction execution. In the system, peripherals use interrupts to
communicate with the processor.
Table 2.15. 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
Software only
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
1To simplify the software layer, the CMSIS only uses IRQ numbers and therefore uses negative values for exceptions other than
5Increasing in steps of 4.
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.