
MPU Access Management Settings
NOTE:
Some devices may show a main memory size of less than a power of two. For example,
15.5KB of main memory, as opposed to 16KB. For the page address calculations above, the
main memory size should be rounded up to the next power of two, in this case, 16KB. For
the 16KB example, page 0 and page 1 settings behave identically.
The following example shows two borders being set on a 16KB device:
•
B1 resides at the start of segment 2. If the user wishes to set segment 2 to start at location D800h, this
would require MUSB1[4:0] = 0Ch.
•
B2 resides at the start of segment 3. If the user wishes to set segment 3 to start at location EE00h, this
would require setting MUSB2[4:0] = 17h.
•
With these settings, the segment ranges are as follows:
–
Segment 1 resides at C000h through D7FFh.
–
Segment 2 resides at D800h through EDFFh.
–
Segment 3 resides at EE00h through FFFFh.
6.2.3
Information Memory
The information memory is a fixed partition of memory which is 256 bytes in size. The information memory
can be used for application specific information (for example, IDs or version numbers), or it can be used
for executable code. It is located at address 01800h to 018FFh and is also addressable from 01900h to
019FFh.
6.3
MPU Access Management Settings
Each segment described in
and
can have read, write, and execute access
rights set independently.
The MPUSAM register allows setting the access rights for the four segments (information memory
segment, three main memory segments) . MPUSEGxRE enables read access for segment x,
MPUSEGxWE enables write access for segment x, and MPUSEGxXE enables code execution from
segment x. JTAG or DMA accesses are treated as read or write data accesses and evaluate the
corresponding access bits.
shows the different settings of MPUSEGxXE, MPUSEGxWE, and MPUSEGxRE. Not all settings
lead to a different memory protection. For example, as shown, if the execution bit MPUSEGxXE is set to
1, read access is automatically allowed independent of the setting of MPUSEGxRE. Also setting the
MPUSEGxWE bit to 1 enables the read option.
NOTE:
Combinations that are not shown in
should be avoided, because they may be
used in future versions of the MPU.
Table 6-2. Segment Access Rights
MPUSEGxXE
MPUSEGxWE
MPUSEGxRE
Execute Rights
Write Rights
Read Rights
0
0
0
no
no
no
0
0
1
no
no
yes
0
1
1
no
yes
yes
1
0
1
yes
no
yes
1
1
1
yes
yes
yes
255
SLAU272C – May 2011 – Revised November 2013
Memory Protection Unit (MPU)
Copyright © 2011–2013, Texas Instruments Incorporated