
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
756 of 808
NXP Semiconductors
UM10360
Chapter 34: Appendix: Cortex-M3 User Guide
4.5 Memory protection unit
This section describes the
Memory protection unit
(MPU).
The MPU divides the memory map into a number of regions, and defines the location,
size, access permissions, and memory attributes of each region. It supports:
•
independent attribute settings for each region
•
overlapping regions
•
export of memory attributes to the system.
The memory attributes affect the behavior of memory accesses to the region. The
Cortex-M3 MPU defines:
•
eight separate memory regions, 0-7
•
a background region.
When memory regions overlap, a memory access is affected by the attributes of the
region with the highest number. For example, the attributes for region 7 take precedence
over the attributes of any region that overlaps region 7.
The background region has the same memory access attributes as the default memory
map, but is accessible from privileged software only.
The Cortex-M3 MPU memory map is unified. This means instruction accesses and data
accesses have same region settings.
If a program accesses a memory location that is prohibited by the MPU, the processor
generates a memory management fault. This causes a fault exception, and might cause
termination of the process in an OS environment.
In an OS environment, the kernel can update the MPU region setting dynamically based
on the process to be executed. Typically, an embedded OS uses the MPU for memory
protection.
Configuration of MPU regions is based on memory types, see
regions, types and attributes”
.
shows the possible MPU region attributes. These include Shareability and
cache behavior attributes that are not relevant to most microcontroller implementations.
See
for guidelines for programming such an implementation.
Table 651. Memory attributes summary
Memory type
Shareability
Other attributes
Description
Strongly- ordered
-
-
All accesses to Strongly-ordered
memory occur in program order. All
Strongly-ordered regions are
assumed to be shared.
Device
Shared
-
Memory-mapped peripherals that
several processors share.