MPU Segments
317
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
Memory Protection Unit (MPU)
9.2.5
Information Memory
The information memory is a partition of memory that is 512 bytes in size. The information memory can be
used to store application-specific information (such as IDs or version numbers), or it can be used for
executable code. It is located at address 01800h to 019FFh.
9.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 and DMA accesses are treated as read or write data accesses and are evaluated
according to 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 9-4. 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
NOTE:
Discontinuity instructions at segment boundaries
Do not fill code segments to the last word with program code, because program discontinuity
instructions like jump or branch instructions, RET, CALL, ... at a segment boundary can
trigger an access right violation.
The CPU prefetches instructions beyond the one currently being executed. The MPU
interprets the prefetch as read and instruction fetch accesses. For example if there is a JMP
instruction (or any another discontinuity instruction) at the segment boundary, the CPU
prefetches from the neighboring segment. This causes an access right violation if instruction
fetches are not allowed within the neighboring segment.