Functional Peripherals Description
86
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Cortex-M4F Peripherals
Table 2-4. AP Bit Field Encoding (continued)
AP Bit Field
Privileged
Permissions
Unprivileged
Permissions
Description
001
RW
No access
Access from privileged software only.
010
RW
RO
Writes by unprivileged software generate a permission fault.
011
RW
RW
Full access.
100
Unpredictable
Unpredictable
Reserved
101
RO
No access
Reads by privileged software only.
110
RO
RO
Read-only, by privileged or unprivileged software.
111
RO
RO
Read-only, by privileged or unprivileged software.
2.2.4.1.1 MPU Configuration for MSP432P4xx devices
MSP432P4xx has only a single processor and no caches. As a result, the MPU should be programmed as
shown in
Table 2-5. Memory Region Attributes for MSP432P4xx Devices
Memory Region
TEX
S
C
B
Memory Type and Attributes
Flash memory
000b
0
1
0
Normal memory, non-shareable, write-through
Internal SRAM
000b
1
1
0
Normal memory, shareable, write-through
External SRAM
000b
1
1
1
Normal memory, shareable, write-back, write-allocate
Peripherals
000b
1
0
1
Device memory, shareable
In current MSP432P4xx family microcontroller implementations, the shareability and cache policy
attributes do not affect the system behavior. However, using these settings for the MPU regions can make
the application code more portable. The values given are for typical situations.
2.2.4.2
Updating an MPU Region
To update the attributes for an MPU region, the MPU Region Number (RNR), MPU Region Base Address
(RBAR), and RASR registers must be updated. Each register can be programmed separately or with a
multiple-word write to program all of these registers. You can use the RBARx and RASRx aliases to
program up to four regions simultaneously using an STM instruction.
Updating an MPU Region Using Separate Words
This example simple code configures one region:
; R1 = region number
; R2 = size/enable
; R3 = attributes
; R4 = address
LDR R0,=RNR
; 0xE000ED98, MPU region number register
STR R1, [R0, #0x0]
; Region Number
STR R4, [R0, #0x4]
; Region Base Address
STRH R2, [R0, #0x8]
; Region Size and Enable
STRH R3, [R0, #0xA]
; Region Attribute
Disable a region before writing new region settings to the MPU if you have previously enabled the region
being changed. For example:
; R1 = region number
; R2 = size/enable
; R3 = attributes
; R4 = address
LDR R0,=RNR
; 0xE000ED98, MPU region number register
STR R1, [R0, #0x0]
; Region Number