Sorry, your browser is not supported. We recommend upgrading your browser.
We have done our best to make all the documentation and resources available on old versions of Internet Explorer, but vector image support and the layout may not be optimal. Technical documentation is available as a PDF Download.
Use of System mode for exception handling
Corruption of the link register can be a problem when handling multiple exceptions of the same type. ARMv4 and later architectures include a privileged mode called System mode, to overcome this problem.
Return from an exception handler
After it has handled an exception, the exception handler must return execution to the main program. The method used to return depends on whether or not the exception handler uses stack operations.
The operations carried out by the Reset handler depend on the system that the software is being developed for.
Data Abort handler
If there is no MMU, the Data Abort handler must report the error and quit. If there is an MMU, the handler must deal with the virtual memory fault.
SVC handlers in C and assembly language
Although the top-level handler must always be written in ARM assembly language, the routines that handle each SVC can be written in either assembly language or in C.
Using SVCs in Supervisor mode
If you call an SVC while in Supervisor mode you must store SVC LR and SPSR to ensure that their original values are not lost.
Handling an exception
In microcontroller profiles, exception prioritization, nesting of exceptions, and saving of corruptible registers are handled entirely by the processor to provide efficiency and to minimize interrupt latency.
Configuring individual IRQs
Each IRQ has an individual enable bit in the Interrupt Set Enable Registers, part of the NVIC registers. To enable or disable an IRQ, you must set the corresponding enable bit to either 1 or 0 respectively.
The SVC instruction generates an SVC. A typical use for SVCs is to request privileged operations or access to system resources from an operating system.
The SCS includes a system timer, SysTick, that an operating system can use to ease porting from another platform.
To configure SysTick, load the interval required between SysTick events to the SysTick Reload Value register.