MPUSEGBx
A
17
A
16
A
15
A
14
A
13
A
12
A
10
A
11
[4]
[3]
[2]
[1]
[0]
[5]
[6]
[7]
[12]
[11]
[10]
[9]
[8]
[13]
[14]
[15]
0
0
0
0
0
0
0
A
18
MPUSEGBx
A
17
A
16
A
15
A
14
A
13
A
12
A
10
A
11
[4]
[3]
[2]
[1]
[0]
[5]
[6]
[7]
[12]
[11]
[10]
[9]
[8]
[13]
[14]
[15]
0
0
0
0
0
0
0
0
MPUSEGBx
A
17
A
16
A
15
A
14
A
13
A
12
A
18
A
19
A
9
A
8
A
7
A
6
A
5
A
4
A
10
A
11
[4]
[3]
[2]
[1]
[0]
[5]
[6]
[7]
[12]
[11]
[10]
[9]
[8]
[13]
[14]
[15]
MPU Segments
313
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
Memory Protection Unit (MPU)
9.2
MPU Segments
9.2.1 Main Memory Segments
The MPU can logically divide the main memory into three segments. The size of each segment is defined
by setting the borders between adjacent segments. To configure three segments, a lower border (B1) and
a higher border (B2) are positioned by control register bits MPUSEGB1[15:0] and MPUSEGB2[15:0],
respectively, in the MPUSEGBx registers. The position of both borders is limited to the 16 most significant
bits of the memory address space (20-bit). Therefore, the segment borders registers are equivalent to the
memory address bus, shifted right by 4 bits (see
shows the minimum segment size. Depending on the total memory size, some of the border
register bits must be written as zero.
summarizes the user-selectable bits and fixed bits for
different memory sizes (see the device-specific data sheet for total memory size).
and
show fixed bits of the segment register when memory size is 128KB and 256KB respectively.
The beginning of segment 1 is the lowest available address for the main memory as defined in the device-
specific data sheet. The lower border (B1) defines the end of segment 1 and the beginning of segment 2.
The higher border (B2) defines the end of segment 2 and beginning of segment 3. The end of segment 3
is the highest main memory address as defined in the device-specific data sheet. For example, devices
with up to 64KB of FRAM, the highest memory address is 013FFFh. Segment 2 includes the address
defined by the lower border (B1) but excludes the higher border (B2).
The address bus (MAB) is analyzed by the MPU using the 16 most significant bits along with the current
border settings.
•
If the significant address bits are lower than MPUSEGB1[15:0], segment 1 is selected.
•
If the significant address bits are equal to or greater than MPUSEGB1[15:0] and less than
MPUSEGB2[15:0], segment 2 is selected.
•
If the significant address bits are equal to or greater than MPUSEGB2[15:0], segment 3 is selected.
Figure 9-2. Segment Border Register
Table 9-1. Address Comparator Bit Selection
FRAM Size
Index of Used MSB
Address Bus (n)
User-Selectable Border
Register Bits
Fixed Border Register
Bits (zero)
Segment Size
(bytes)
32KB < size
≤
128KB
17-bit
[13:6]
[15:14] and [5:0]
1k
128KB < size
≤
256KB
18-bit
[14:6]
[15] and [5:0]
1k
Figure 9-3. Example of Segment Border Register Fixed Bits When FRAM Size = 128KB
Figure 9-4. Example of Segment Border Register Fixed Bits When FRAM Size = 256KB