Features Supported
- APIs to setup MPU regions, including region address, size, attributes like access permissions, cache properties
- APIs to enable, disable MPU
- API to check if MPU is enabled
Features NOT Supported
NA
Important Usage Guidelines
- Refer to ARMv7-M architecture manual for more details
- The number of MPU entries varies based on the ARM M4 instantiated in a given DEVICE, refer DEVICE datasheet for more details.
- In M4 for this DEVICE, there are 16 MPU regions
- MPU regions can overlap each other, with higher numbered regions taking more precedence in case of address overlaps.
Example Usage
Include the below file to access the APIs,
#include <kernel/dpl/CacheP.h>
Example to setup MPU regions and enable MPU is shown below,
#define MAX_REGIONS (16u)
uint32_t regionId = 0;
CacheP_disable(CacheP_TYPE_ALL);
regionId++;
regionId++;
regionId++;
if(regionId >= MAX_REGIONS)
{
while(1) { ; }
}
CacheP_enable(CacheP_TYPE_ALL);
API
APIs for MPU for ARMv7 (ARM R5, ARM M4)