97 base = g_mpuBase[instance];
121 for (i = 1U; i < regionCnt; i++)
155 base = g_mpuBase[instance];
179 base = g_mpuBase[instance];
211 base = g_mpuBase[instance];
242 #if FEATURE_MPU_HAS_PROCESS_IDENTIFIER
251 #if FEATURE_MPU_HAS_PROCESS_IDENTIFIER
287 base = g_mpuBase[instance];
309 #if FEATURE_MPU_HAS_PROCESS_IDENTIFIER
326 uint8_t slavePortNum,
335 base = g_mpuBase[instance];
MPU master access rights. Implements : mpu_master_access_right_t_Class.
static void MPU_HAL_SetProcessIdentifierMask(MPU_Type *const base, uint8_t regionNum, uint8_t processIdentifierMask)
Sets the process identifier mask.
void MPU_HAL_SetAlternateHighMasterAccessRights(MPU_Type *const base, uint8_t regionNum, uint8_t masterNum, const mpu_high_masters_access_rights_t *accessRightsPtr)
Sets access permission for master which has only read and write permissions in a specific region by a...
const mpu_master_access_right_t * masterAccRight
MPU access rights for master which have only read and write permissions Implements : mpu_high_masters...
void MPU_DRV_Deinit(uint32_t instance)
De-initializes the MPU region by resetting and disabling MPU module.
void MPU_HAL_SetHighMasterAccessRights(MPU_Type *const base, uint8_t regionNum, uint8_t masterNum, const mpu_high_masters_access_rights_t *accessRightsPtr)
Sets access permission for master which has only read and write permissions in a specific region...
bool MPU_HAL_GetSlavePortErrorStatus(const MPU_Type *const base, uint8_t slaveNum)
Gets the error status of a specified slave port.
void MPU_DRV_GetDetailErrorAccessInfo(uint32_t instance, uint8_t slavePortNum, mpu_access_err_info_t *errInfoPtr)
Gets the MPU access error detail information for a slave port.
#define MPU_SUPERVISOR_MASK
MPU_Type *const g_mpuBase[]
Table of base addresses for MPU instances.
#define FEATURE_MPU_MAX_LOW_MASTER_NUMBER
mpu_user_access_rights_t userAccessRights
#define FEATURE_MPU_MASTER_COUNT
status_t MPU_DRV_Init(uint32_t instance, uint8_t regionCnt, const mpu_user_config_t *userConfigArr)
The function sets the MPU regions according to user input and then enables the MPU. Please note that access rights for region 0 will always be configured and regionCnt takes values between 1 and the maximum region count supported by the hardware. e.g. In S32K144 the number of supported regions is 8. The user must make sure that the clock is enabled.
static void MPU_HAL_Enable(MPU_Type *const base)
Enables the MPU module.
void MPU_HAL_SetAlternateLowMasterAccessRights(MPU_Type *const base, uint8_t regionNum, uint8_t masterNum, const mpu_low_masters_access_rights_t *accessRightsPtr)
Sets access permission for master which has separated privilege rights for user and supervisor mode a...
mpu_supervisor_access_rights_t
MPU access rights in supervisor mode Implements : mpu_supervisor_access_rights_t_Class.
status_t MPU_DRV_SetMasterAccessRights(uint32_t instance, uint8_t regionNum, const mpu_master_access_right_t *accessRightsPtr)
Configures access permission.
void MPU_HAL_SetLowMasterAccessRights(MPU_Type *const base, uint8_t regionNum, uint8_t masterNum, const mpu_low_masters_access_rights_t *accessRightsPtr)
Sets access permission for master which has separated privilege rights for user and supervisor mode a...
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
void MPU_HAL_Init(MPU_Type *const base)
Initializes the MPU module and all regions will be invalid after cleared access permission.
static void MPU_HAL_SetRegionValidCmd(MPU_Type *const base, uint8_t regionNum, bool enable)
Sets the region valid value. When a region changed not by alternating registers should set the valid ...
mpu_supervisor_access_rights_t superAccessRights
MPU user region configuration structure. This structure is used when calling the MPU_DRV_Init functio...
mpu_user_access_rights_t
MPU access rights in user mode Implements : mpu_user_access_rights_t_Class.
MPU detail error access info Implements : mpu_access_err_info_t_Class.
mpu_access_rights_t accessRight
status_t MPU_DRV_SetRegionConfig(uint32_t instance, uint8_t regionNum, const mpu_user_config_t *userConfigPtr)
Sets the region configuration.
MPU access rights for masters which have separated privilege rights for user and supervisor mode acce...
void MPU_HAL_SetRegionAddr(MPU_Type *const base, uint8_t regionNum, uint32_t startAddr, uint32_t endAddr)
Sets region start and end address. Please note that using this function will clear the valid bit of t...
#define MPU_INSTANCE_COUNT
bool processIdentifierEnable
#define MPU_SUPERVISOR_SHIFT
void MPU_HAL_GetDetailErrorAccessInfo(MPU_Type *const base, uint8_t slaveNum, mpu_access_err_info_t *errInfoPtr)
Gets MPU detail error access info.
#define FEATURE_MPU_MAX_HIGH_MASTER_NUMBER
static void MPU_HAL_SetProcessIdentifier(MPU_Type *const base, uint8_t regionNum, uint8_t processIdentifier)
Sets the process identifier.
void MPU_DRV_SetRegionAddr(uint32_t instance, uint8_t regionNum, uint32_t startAddr, uint32_t endAddr)
Sets the region start and end address.
#define FEATURE_MPU_SLAVE_COUNT