Functional Peripherals Registers
101
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Cortex-M4F Peripherals
2.4.2.2
CTRL Register (Offset = D94h) [reset = 00000000h]
CTRL is shown in
and described in
MPU Control Register. Use the MPU Control Register to enable the MPU, enable the default memory map
(background region), and enable the MPU when in Hard Fault, Non-maskable Interrupt (NMI), and
FAULTMASK escalated handlers. When the MPU is enabled, at least one region of the memory map must
be enabled for the MPU to function unless the PRIVDEFENA bit is set. If the PRIVDEFENA bit is set and
no regions are enabled, then only privileged code can operate. When the MPU is disabled, the default
address map is used, as if no MPU is present. When the MPU is enabled, only the system partition and
vector table loads are always accessible. Other areas are accessible based on regions and whether
PRIVDEFENA is enabled. Unless HFNMIENA is set, the MPU is not enabled when the exception priority
is -1 or -2. These priorities are only possible when in Hard fault, NMI, or when FAULTMASK is enabled.
The HFNMIENA bit enables the MPU when operating with these two priorities.
Figure 2-10. CTRL Register
31
30
29
28
27
26
25
24
RESERVED
R/W-0h
23
22
21
20
19
18
17
16
RESERVED
R/W-0h
15
14
13
12
11
10
9
8
RESERVED
R/W-0h
7
6
5
4
3
2
1
0
RESERVED
PRIVDEFENA
HFNMIENA
ENABLE
R/W-0h
R/W-0h
R/W-0h
R/W-0h
Table 2-15. CTRL Register Field Descriptions
Bit
Field
Type
Reset
Description
31-3
RESERVED
R/W
0h
2
PRIVDEFENA
R/W
0h
This bit enables the default memory map for privileged access, as a
background region, when the MPU is enabled. The background
region acts as if it was region number 1 before any settable regions.
Any region that is set up overlays this default map, and overrides it.
If this bit = 0, the default memory map is disabled, and memory not
covered by a region faults. This applies to memory type, Execute
Never (XN), cache and shareable rules. However, this only applies
to privileged mode (fetch and data access). User mode code faults
unless a region has been set up for its code and data. When the
MPU is disabled, the default map acts on both privileged and user
mode code. XN and SO rules always apply to the System partition
whether this enable is set or not. If the MPU is disabled, this bit is
ignored. Reset clears the PRIVDEFENA bit.
1
HFNMIENA
R/W
0h
This bit enables the MPU when in Hard Fault, NMI, and
FAULTMASK escalated handlers. If this bit = 1 and the ENABLE bit
= 1, the MPU is enabled when in these handlers. If this bit = 0, the
MPU is disabled when in these handlers, regardless of the value of
ENABLE. If this bit =1 and ENABLE = 0, behavior is Unpredictable.
Reset clears the HFNMIENA bit.
0
ENABLE
R/W
0h
MPU enable bit. Reset clears the ENABLE bit.
0b = disable MPU
1b = enable MPU