You copied the Doc URL to your clipboard.

ARMv6-M and ARMv7-M profiles

The microcontroller profiles use a different exception handling model from that used by other architectures and profiles.

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

  • the use of certain coprocessor registers

  • access to memory and peripherals based on system design

  • 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,

Related concepts