S32 SDK
mpu_driver.c File Reference
#include <stddef.h>
#include "mpu_hw_access.h"

Go to the source code of this file.

Functions

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. More...
 
void MPU_DRV_Deinit (uint32_t instance)
 De-initializes the MPU region by resetting and disabling MPU module. More...
 
void MPU_DRV_SetRegionAddr (uint32_t instance, uint8_t regionNum, uint32_t startAddr, uint32_t endAddr)
 Sets the region start and end address. More...
 
status_t MPU_DRV_SetRegionConfig (uint32_t instance, uint8_t regionNum, const mpu_user_config_t *userConfigPtr)
 Sets the region configuration. More...
 
status_t MPU_DRV_SetMasterAccessRights (uint32_t instance, uint8_t regionNum, const mpu_master_access_right_t *accessRightsPtr)
 Configures access permission. More...
 
bool MPU_DRV_GetDetailErrorAccessInfo (uint32_t instance, uint8_t slavePortNum, mpu_access_err_info_t *errInfoPtr)
 Checks and gets the MPU access error detail information for a slave port. More...
 
mpu_user_config_t MPU_DRV_GetDefaultRegionConfig (mpu_master_access_right_t *masterAccRight)
 Gets default region configuration. More...
 
void MPU_DRV_EnableRegion (uint32_t instance, uint8_t regionNum, bool enable)
 Enables/Disables region descriptor. Please note that region 0 should not be disabled. More...
 

Variables

static MPU_Type *const s_mpuBase [MPU_INSTANCE_COUNT] = MPU_BASE_PTRS
 Table of base addresses for MPU instances. More...
 

Variable Documentation

MPU_Type* const s_mpuBase[MPU_INSTANCE_COUNT] = MPU_BASE_PTRS
static

Table of base addresses for MPU instances.

Definition at line 47 of file mpu_driver.c.