EasyManuals Logo

ARM Cortex-M3 User Manual

ARM Cortex-M3
410 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #51 background imageLoading...
Page #51 background image
Programmer’s Model
ARM DDI 0337G Copyright © 2005-2008 ARM Limited. All rights reserved. 2-3
Unrestricted Access Non-Confidential
2.2 Privileged access and user access
Code can execute as privileged or unprivileged. Unprivileged execution limits or
excludes access to some resources. Privileged execution has access to all resources.
Handler mode is always privileged. Thread mode can be privileged or unprivileged.
Thread mode is privileged out of reset, but you can change it to user or unprivileged by
setting the CONTROL[0] bit using the MSR instruction. User access prevents:
use of some instructions such as CPS to set FAULTMASK and PRIMASK
access to most registers in System Control Space (SCS).
When Thread mode has been changed from privileged to user, it cannot change itself
back to privileged. Only a Handler can change the privilege of Thread mode. Handler
mode is always privileged.
2.2.1 Main stack and process stack
Out of reset, all code uses the main stack. An exception handler such as SVC can change
the stack used by Thread mode from main stack to process stack by changing the
EXC_RETURN value it uses on exit. All exceptions continue to use the main stack. The
stack pointer, r13, is a banked register that switches between SP_main and SP_process.
Only one stack, the process stack or the main stack, is visible, using r13, at any time.
It is also possible to switch from main stack to process stack while in Thread mode by
writing to CONTROL[1] using the MSR instruction, in addition to being selectable
using the EXC_RETURN value from an exit from Handler mode.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ARM Cortex-M3 and is the answer not in the manual?

ARM Cortex-M3 Specifications

General IconGeneral
ArchitectureARMv7-M
Instruction SetThumb-2
Pipeline Stages3-stage
InterruptsNested Vectored Interrupt Controller (NVIC)
Interrupt ControllerNested Vectored Interrupt Controller (NVIC)
Memory Protection UnitOptional
Power ConsumptionVaries by implementation
Max Clock SpeedUp to 100 MHz
DebuggingJTAG and Serial Wire Debug (SWD)
Operating Voltage1.8V to 3.6V
Manufacturing ProcessVaries by implementation
Core Type32-bit

Related product manuals