13.07.2015 Views

Cortex-M0+ Devices Generic User Guide - Keil

Cortex-M0+ Devices Generic User Guide - Keil

Cortex-M0+ Devices Generic User Guide - Keil

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The <strong>Cortex</strong>-<strong>M0+</strong> Processor2.3 Exception modelThis section describes the exception model.2.3.1 Exception statesEach exception is in one of the following states:InactivePendingActiveThe exception is not active and not pending.The exception is waiting to be serviced by the processor.An interrupt request from a peripheral or from software can change thestate of the corresponding interrupt to pending.The exception is being serviced by the processor but has not completed.NoteAn exception handler can interrupt the execution of another exceptionhandler. In this case both exceptions are in the active state.2.3.2 Exception typesActive and pendingThe exception is being serviced by the processor and there is a pendingexception from the same source.The exception types are:ResetNMIHardFaultSVCallPendSVReset is invoked on power up or a warm reset. The exception model treatsreset as a special form of exception. When reset is asserted, the operationof the processor stops, potentially at any point in an instruction. Whenreset is deasserted, execution restarts from the address provided by thereset entry in the vector table. Execution restarts as privileged executionin Thread mode.A Non-Maskable Interrupt (NMI) can be signalled by a peripheral ortriggered by software. This is the highest priority exception other thanreset. It is permanently enabled and has a fixed priority of –2. NMIs cannotbe:• masked or prevented from activation by any other exception• preempted by any exception other than Reset.A HardFault is an exception that occurs because of an error. HardFaultshave a fixed priority of –1, meaning they have higher priority than anyexception with configurable priority.A Supervisor Call (SVC) is an exception that is triggered by the SVCinstruction. In an OS environment, applications can use SVC instructions toaccess OS kernel functions and device drivers.PendSV is an interrupt-driven request for system-level service. In an OSenvironment, use PendSV for context switching when no other exceptionis active.ARM DUI 0662A Copyright © 2012 ARM. All rights reserved. 2-16ID041812Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!