227
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
shows the AP encodings that define the access permissions for privileged and
unprivileged software.
11.11.1.1
MPU Mismatch
When an access violates the MPU permissions, the processor generates a memory manage-
ment fault, see
. The MMFSR indicates the cause of the fault. See
“MMFSR: Memory Management Fault Status Subregister”
for more information.
11.11.1.2
Updating an MPU Region
To update the attributes for an MPU region, update the MPU_RNR, MPU_RBAR and
MPU_RASR registers. Each register can be programed separately, or a multiple-word write can
be used to program all of these registers. MPU_RBAR and MPU_RASR aliases can be used to
program up to four regions simultaneously using an STM instruction.
11.11.1.3
Updating an MPU region using separate words
Simple code to configure one region:
; R1 = region number
; R2 = size/enable
; R3 = attributes
; R4 = address
LDR R0,=MPU_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
01
Write back, write and read allocate
10
Write through, no write allocate
11
Write back, no write allocate
Table 11-37. AP Encoding
AP[2:0]
Privileged
Permissions
Unprivileged
Permissions
Description
000
No access
No access
All accesses generate a permission fault
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
Table 11-36. Cache Policy for Memory Attribute Encoding (Continued)
Encoding, AA or BB
Corresponding Cache Policy
Содержание SAM4S Series
Страница 44: ...44 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 412: ...412 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 1105: ...1105 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 1142: ...1142 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 3 100 ball VFBGA Package Drawing ...
Страница 1143: ...1143 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 4 64 lead LQFP Package Drawing ...
Страница 1145: ...1145 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 5 64 lead QFN Package Drawing ...