34 #if defined(__MPU_PRESENT) && (__MPU_PRESENT == 1)
91 void MPU_ConfigureRegion(
const MPU_RegionInit_TypeDef *init)
93 EFM_ASSERT(init->regionNo < ((MPU->TYPE & MPU_TYPE_DREGION_Msk) >>
94 MPU_TYPE_DREGION_Pos));
96 MPU->RNR = init->regionNo;
98 if (init->regionEnable)
100 EFM_ASSERT(!(init->baseAddress & ~MPU_RBAR_ADDR_Msk));
101 EFM_ASSERT(init->tex <= 0x7);
103 MPU->RBAR = init->baseAddress;
104 MPU->RASR = ((init->disableExec ? 1 : 0) << MPU_RASR_XN_Pos)
105 | (init->accessPermission << MPU_RASR_AP_Pos)
106 | (init->tex << MPU_RASR_TEX_Pos)
107 | ((init->shareable ? 1 : 0) << MPU_RASR_S_Pos)
108 | ((init->cacheable ? 1 : 0) << MPU_RASR_C_Pos)
109 | ((init->bufferable ? 1 : 0) << MPU_RASR_B_Pos)
110 | (init->srd << MPU_RASR_SRD_Pos)
111 | (init->size << MPU_RASR_SIZE_Pos)
112 | (1 << MPU_RASR_ENABLE_Pos);
Memory protection unit (MPU) peripheral API.
Emlib peripheral API "assert" implementation.