SAM3SD8B Atmel Corporation, SAM3SD8B Datasheet - Page 206

no-image

SAM3SD8B

Manufacturer Part Number
SAM3SD8B
Description
Manufacturer
Atmel Corporation
Datasheets
10.22.7
10.22.8
10.22.8.1
206
206
SAM3S8/SD8
SAM3S8/SD8
MPU mismatch
Updating an MPU region
Updating an MPU region using separate words
Table 10-39. AP encoding (Continued)
When an access violates the MPU permissions, the processor generates a memory manage-
ment fault, see
fault. See
To update the attributes for an MPU region, update the RNR, RBAR and RASR registers. You
can program each register separately, or use a multiple-word write to program all of these regis-
ters. You can use the RBAR and RASR aliases to program up to four regions simultaneously
using an STM instruction.
Simple code to configure one region:
Disable a region before writing new region settings to the MPU if you have previously enabled
the region being changed. For example:
Software must use memory barrier instructions:
AP[2:0]
101
110
111
; R1 = region number
; R2 = size/enable
; R3 = attributes
; R4 = address
LDR R0,=MPU_RNR
STR R1, [R0, #0x0]
STR R4, [R0, #0x4]
STRH R2, [R0, #0x8]
STRH R3, [R0, #0xA]
; R1 = region number
; R2 = size/enable
; R3 = attributes
; R4 = address
LDR R0,=MPU_RNR
STR R1, [R0, #0x0]
BIC R2, R2, #1
STRH R2, [R0, #0x8]
STR R4, [R0, #0x4]
STRH R3, [R0, #0xA]
ORR R2, #1
STRH R2, [R0, #0x8]
“Memory Management Fault Status Register” on page 182
Privileged
permissions
RO
RO
RO
“Exceptions and interrupts” on page
Unprivileged
permissions
No access
RO
RO
; Region Attribute
; 0xE000ED98, MPU region number register
; Region Number
; Region Base Address
; Region Size and Enable
; 0xE000ED98, MPU region number register
; Region Number
; Disable
; Region Size and Enable
; Region Base Address
; Region Attribute
; Enable
; Region Size and Enable
Description
Reads by privileged software only
Read only, by privileged or unprivileged software
Read only, by privileged or unprivileged software
52. The MMFSR indicates the cause of the
for more information.
11090A–ATARM–10-Feb-12
11090A–ATARM–10-Feb-12

Related parts for SAM3SD8B