Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
In ARM assembler, when accessing xPSR (all three PSRs as one), the symbol PSR is used:
PRIMASK, FAULTMASK, and BASEPRI
Registers
a number of functions are available in the device driver libraries provided by the
microcontroller vendors
PRIMASK, FAULTMASK, and BASEPRI
Registers
• In assembly language, the MRS and MSR
instructions are used. For example:
• The PRIMASK, FAULTMASK, and BASEPRI
registers cannot be set in the user access level.
The Control Register
• The control register is used to define the privilege
level and the SP selection. This register has 2 bits.
• CONTROL[1]: In the Cortex-M3, the CONTROL[1]
bit is always 0 in handler mode. However, in the
thread or base level, it can be either 0 or 1.
• CONTROL[0]: The CONTROL[0] bit is writable only
in a privileged state. Once it enters the user state,
the only way to switch back to privileged is to
trigger an interrupt and change this in the
exception handler.
The Control Register
Operation Mode