Exceptions
5-20
Copyright © 2005-2008 ARM Limited. All rights reserved.
ARM DDI 0337G
Non-Confidential
Unrestricted Access
5.9
Resets
The NVIC is reset at the same time as the core and controls the release of reset into the
core. As a result, the behavior of reset is predictable. Table 5-7 shows the reset behavior.
For more information about resets, see Chapter 6
Clocking and Resets
.
5.9.1
Vector Table and Reset
The vector table at location 0 provides the vector table at reset. It must contain at least
four values:
•
stack top address
•
reset routine location
•
NMI ISR location
•
Hard Fault ISR location.
When interrupts are enabled, the vector table regardless of location, points to all
mask-enabled exceptions. Also, the SVCall ISR location is populated if the SVC
instruction is used.
An example of a full vector table:
unsigned int stack_base[STACK_SIZE];
void ResetISR(void);
void NmiISR(void);
…
ISR_VECTOR_TABLE vector_table_at_0
{
stac sizeof(stack_base),
ResetISR,
NmiSR,
FaultISR,
Table 5-7 Reset actions
Action
Description
NVIC resets, holds core in reset
NVIC clears most of its registers. The processor is in Thread mode, priority is
privileged, and the stack is set to Main.
NVIC releases core from reset
NVIC releases core from reset.
Core sets stack
Core reads the start SP, SP_main, from vector-table offset 0.
Core sets PC and LR
Core reads the start PC from vector-table offset. LR is set to
0xFFFFFFFF
.
Reset routine runs
NVIC has interrupts disabled, and NMI and Hard Fault are not disabled.