Figure 18. Subregion Example - ST STM32H7 Series Programming Manual

Hide thumbs Also See for STM32H7 Series:
Table of Contents

Advertisement

Core peripherals
LDR R0, =MPU_RBAR
STR R1, [R0, #0x0]
STR R2, [R0, #0x4]
Use an STM instruction to optimize this:
LDR R0,=MPU_RBAR
STM R0, {R1-R2}
Subregions
Regions of 256 bytes or more are divided into eight equal-sized subregions. Set the
corresponding bit in the SRD field of the RASR to disable a subregion, see
MPU region attribute and size register (MPU_RASR) on page
of SRD controls the first subregion, and the most significant bit controls the last subregion.
Disabling a subregion means another region overlapping 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.
Example of SRD use:
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 the figure shows.
198/262
; R1 = address and region number in one
; R2 = size and attributes in one
; 0xE000ED9C, MPU Region Base register
; Region base address and
; region number combined with VALID (bit 4) set to 1
; Region Attribute, Size and Enable
; R1 = address and region number in one
; R2 = size and attributes in one
; 0xE000ED9C, MPU Region Base register
; Region base address, region number and VALID bit,
; and Region Attribute, Size and Enable

Figure 18. Subregion example

PM0214 Rev 9
PM0214
Section 4.2.9:
204. The least significant bit

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32H7 Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents

Save PDF