SPRUJF2A March 2026 – March 2026 AM13E23019
The Memory Protection Unit (MPU) can be used to check all memory accesses made by the processor against a set of access permission policies which can be defined by the programmer. When used together with the privileged/unprivileged execution modes of the Arm Cortex-M33, the MPU supports limiting access to certain memory locations to privileged code only. If unprivileged code accesses a nonrestricted region, execution continues as if the MPU was not present. However, if unprivileged code issues an access to a restricted region, a HardFault is generated if MemMange fault is not enabled in the processor. It is also possible to restrict access to both privileged and unprivileged code (no access possible through the processor).
The MPU is configured through memory-mapped registers in the system private peripheral bus (PPB) region. See MPU Registers for the list of MPU configuration registers. The software development kit (SDK) provided with the devices supports the standard Arm Cortex Microcontroller Software Interface Standard (CMSIS) register access definitions for the MPU.
Since the MPU checks all memory accesses from the processor (including accesses to flash, SRAM, and peripherals), it is well suited for improving reliability and robustness in threaded applications involving an RTOS. The MPU can be used to restrict the memory access of individual threads, including establishing stack boundaries and limiting access to specific peripherals. Key state data used by the RTOS can be protected from modification by unprivileged threads.
The MPU provides a mechanism to partition the device memory map into 8 regions (numbered 0-7) plus a default background region. Each region can be configured with access permissions and memory attributes, and regions can be configured to overlap if desired. In the case of overlapping regions, a memory access to a location existing in multiple regions is subjected to the attributes of the region with the highest number.
When the MPU is not enabled (ENABLE bit is cleared in the MPU_CTRL register), the device uses the default memory map and the CPU has access to the memory map as if the MPU was not present.
When the MPU is enabled for use, access to the vector table and the system control space are always permitted, but access to any other location depends on the following:
Because the Arm Cortex-M33 is a single-bus CPU architecture, there is no delineation between an instruction fetch and a data access by the MPU. Instructions and data are treated the same.
| Address | Register | CMSIS | Description |
|---|---|---|---|
| 0xE002.ED90 | MPU_TYPE | MPU->TYPE | Type register indicating that if the MPU is present, and if so, how many regions supported |
| 0xE002.ED94 | MPU_CTRL | MPU->CTRL | MPU control register for enabling and configuring the MPU |
| 0xE002.ED98 | MPU_RNR | MPU->RNR | Region select register for using MPU_RBAR and MPU_RLAR |
| 0xE002.ED9C | MPU_RBAR | MPU->RBAR | Defines the base address of the MPU region selected by the MPU_RNR |
| 0xE002.EDA0 | MPU_RLAR | MPU->RLAR | The MPU_RLAR defines the limit address of the MPU region selected by the MPU_RNR |
For detailed information on the MPU register configuration, see the MPU section of the Arm Cortex-M33 Devices Generic User Guide.