You copied the Doc URL to your clipboard.

ARMv6-M and ARMv7-M profiles

This describes how to handle the different types of exception supported by the microcontroller profiles, for example Cortex-M1 and Cortex-M3.

The microcontroller profiles support:

  • two operation modes, Thread mode and Handler mode

  • two execution modes, Privileged mode and User mode.

Thread mode is entered on reset and normally on return from an exception. When in thread mode, code can be executed in either Privileged or User mode.

Handler mode is entered as a result of an exception. All code is executed as Privileged. The processor automatically switches to Privileged mode when exceptions occur.

Privileged mode has full access rights.

User mode has limited access rights. The limitations include:

  • restrictions on instruction use, for example which fields can be used in MSR instructions

  • restrictions on the use of certain coprocessor registers

  • restrictions on access to memory and peripherals based on system design

  • restrictions on access to memory and peripherals imposed by the MPU configuration.

You can change from Privileged Thread to User Thread mode by clearing CONTROL[0] using an MSR instruction. However, you cannot directly change to privileged mode from user mode without going through an exception,