SAM3X8E Atmel Corporation, SAM3X8E Datasheet - Page 207

no-image

SAM3X8E

Manufacturer Part Number
SAM3X8E
Description
Manufacturer
Atmel Corporation
Datasheets
11.23.8.3
11.23.8.4
11.23.9
11057A–ATARM–17-Feb-12
11057A–ATARM–17-Feb-12
MPU design hints and tips
Subregions
Example of SRD use
Use an STM instruction to optimize this:
Regions of 256 bytes or more are divided into eight equal-sized subregions. Set the correspond-
ing bit in the SRD field of the RASR to disable a subregion, see
Register” on page
significant bit controls the last subregion. Disabling a subregion means another region overlap-
ping the disabled range matches instead. If no other enabled region overlaps the disabled
subregion the MPU issues a fault.
Regions of 32, 64, and 128 bytes do not support subregions, With regions of these sizes, you
must set the SRD field to 0x00, otherwise the MPU behavior is Unpredictable.
Two regions with the same base address overlap. Region one is 128KB, and region two is
512KB. To ensure the attributes from region one apply to the first128KB region, set the SRD
field for region two to b00000011 to disable the first two subregions, as
Figure 11-9. SRD use
To avoid unexpected behavior, disable the interrupts before updating the attributes of a region
that the interrupt handlers might access.
Ensure software uses aligned accesses of the correct size to access MPU registers:
The processor does not support unaligned accesses to MPU registers.
When setting up the MPU, and if the MPU has previously been programmed, disable unused
regions to prevent any previous region settings from affecting the new MPU setup.
• except for the RASR, it must use aligned word accesses
• for the RASR it can use byte or aligned halfword or word accesses.
; R1 = address and region number in one
; R2 = size and attributes in one
LDR R0,=MPU_RBAR
STM R0, {R1-R2}
Base address of both regions
202. The least significant bit of SRD controls the first subregion, and the most
; 0xE000ED9C, MPU Region Base register
; Region base address, region number and VALID bit,
; and Region Attribute, Size and Enable
Region 1
Disabled subregion
Disabled subregion
Region 2, with
subregions
“MPU Region Attribute and Size
Figure 11-9
512KB
448KB
384KB
320KB
256KB
192KB
128KB
Offset from
base address
64KB
0
SAM3X/A
SAM3X/A
shows
207
207

Related parts for SAM3X8E