Memory Protection Unit (MPU)
The region is automatically divided into 8 equally-sized sub-regions by the MPU. Sub-regions
can only be used in regions of size 256 bytes or larger. Any of these 8 sub-regions can be
disabled. This allows for creation of “holes” in a region which can be left open, or overlaid by
another region with different attributes. Any of the 8 sub-regions can be disabled with a logical
OR of any of the following flags:
MPU_SUB_RGN_DISABLE_0
MPU_SUB_RGN_DISABLE_1
MPU_SUB_RGN_DISABLE_2
MPU_SUB_RGN_DISABLE_3
MPU_SUB_RGN_DISABLE_4
MPU_SUB_RGN_DISABLE_5
MPU_SUB_RGN_DISABLE_6
MPU_SUB_RGN_DISABLE_7
Finally, the region can be initially enabled or disabled with one of the following flags:
MPU_RGN_ENABLE
MPU_RGN_DISABLE
As an example, to set a region with the following attributes: size of 32 KB, execution en-
abled, read-only for both privileged and user, one sub-region disabled, and initially enabled;
the
ui32Flags
parameter would have the following value:
(MPU_RG_SIZE_32K
|
MPU_RGN_PERM_EXEC
|
MPU_RGN_PERM_PRV_RO_USR_RO
|
MPU_SUB_RGN_DISABLE_2
|
MPU_RGN_ENABLE)
Note:
This function will write to multiple registers and is not protected from interrupts. It is possible
that an interrupt which accesses a region may occur while that region is in the process of being
changed. The safest way to handle this is to disable a region before changing it. Refer to the
discussion of this in the API Detailed Description section.
Returns:
None.
April 8, 2013
151
Summary of Contents for Tiva TM4C123GH6PM
Page 26: ...Boot Loader 26 April 8 2013...
Page 68: ...Controller Area Network CAN 68 April 8 2013...
Page 122: ...Hibernation Module 122 April 8 2013...
Page 136: ...Inter Integrated Circuit I2C 136 April 8 2013...
Page 152: ...Memory Protection Unit MPU 152 April 8 2013...
Page 174: ...Pulse Width Modulator PWM Returns None 174 April 8 2013...
Page 196: ...Synchronous Serial Interface SSI 196 April 8 2013...
Page 222: ...System Control 222 April 8 2013...
Page 270: ...UART 270 April 8 2013...
Page 296: ...uDMA Controller 296 April 8 2013...
Page 351: ...April 8 2013 351...