The microcontroller profiles support:
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
for example which fields can be used in
the use of certain coprocessor registers
access to memory and peripherals based on system
access to memory and peripherals imposed by the
You can change from Privileged Thread to User Thread mode
by clearing CONTROL using an
However, you cannot directly change to privileged mode from user
mode without going through an exception,