Kinetis SDK v.1.3 API Reference Manual
Rev. 0
Freescale Semiconductor, Inc.
|
This section describes the programming interface of the MPU HAL driver.
Data Structures | |
struct | mpu_hardware_info_t |
MPU hardware basic information. More... | |
struct | mpu_access_err_info_t |
Descripts MPU detail error access info. More... | |
struct | mpu_low_masters_access_rights_t |
MPU access rights for low master0~master3. More... | |
struct | mpu_high_masters_access_rights_t |
MPU access rights mode for high master4~master7. More... | |
struct | mpu_region_config_t |
Data v for MPU region initialize. More... | |
MPU HAL. | |
static void | MPU_HAL_Enable (MPU_Type *base) |
Enables the MPU module operation. More... | |
static void | MPU_HAL_Disable (MPU_Type *base) |
Disables the MPU module operation. More... | |
static bool | MPU_HAL_IsEnable (MPU_Type *base) |
Checks whether the MPU module is enabled. More... | |
void | MPU_HAL_GetHardwareInfo (MPU_Type *base, mpu_hardware_info_t *infoPtr) |
Gets MPU basic hardware info. More... | |
void | MPU_HAL_GetDetailErrorAccessInfo (MPU_Type *base, mpu_access_err_info_t *errInfoArrayPtr) |
Gets MPU derail error access info. More... | |
void | MPU_HAL_SetRegionAddr (MPU_Type *base, mpu_region_num_t regionNum, uint32_t startAddr, uint32_t endAddr) |
Sets region start and end address. More... | |
void | MPU_HAL_SetLowMasterAccessRights (MPU_Type *base, mpu_region_num_t regionNum, mpu_master_t masterNum, const mpu_low_masters_access_rights_t *accessRightsPtr) |
Configures low master0~3 access permission for a specific region. More... | |
void | MPU_HAL_SetHighMasterAccessRights (MPU_Type *base, mpu_region_num_t regionNum, mpu_master_t masterNum, const mpu_high_masters_access_rights_t *accessRightsPtr) |
Sets high master access permission for a specific region. More... | |
static void | MPU_HAL_SetRegionValidCmd (MPU_Type *base, mpu_region_num_t regionNum, bool enable) |
Sets the region valid value. More... | |
void | MPU_HAL_SetLowMasterAccessRightsByAlternateReg (MPU_Type *base, mpu_region_num_t regionNum, mpu_master_t masterNum, const mpu_low_masters_access_rights_t *accessRightsPtr) |
Configures low master0~3 access permission for a specific region. More... | |
void | MPU_HAL_SetHighMasterAccessRightsByAlternateReg (MPU_Type *base, mpu_region_num_t regionNum, mpu_master_t masterNum, const mpu_high_masters_access_rights_t *accessRightsPtr) |
Sets high master access permission for a specific region. More... | |
void | MPU_HAL_SetRegionConfig (MPU_Type *base, const mpu_region_config_t *regionConfigPtr) |
Configures the MPU region. More... | |
void | MPU_HAL_Init (MPU_Type *base) |
Initializes the MPU module. More... | |
struct mpu_hardware_info_t |
Data Fields | |
uint8_t | kMPUHardwareRevisionLevel |
Specifies the MPU's hardware and definition reversion level. | |
uint8_t | kMPUSupportSlavePortsNum |
Specifies the number of slave ports connnected to MPU. | |
mpu_region_total_num_t | kMPUSupportRegionsNum |
Indicates the number of region descriptors implemented. | |
struct mpu_access_err_info_t |
Data Fields | |
mpu_master_t | master |
Access error master. | |
mpu_err_attributes_t | attributes |
Access error attribues. | |
mpu_err_access_type_t | accessType |
Access error type. | |
mpu_err_access_ctr_t | accessCtr |
Access error control. | |
uint32_t | addr |
Access error address. | |
uint8_t | slavePort |
Access error slave port. | |
struct mpu_low_masters_access_rights_t |
Data Fields | |
mpu_supervisor_access_rights_t | superAccessRights |
master access rights in supervisor mode | |
mpu_user_access_rights_t | userAccessRights |
master access rights in user mode | |
struct mpu_high_masters_access_rights_t |
Data Fields | |
bool | kMPUWriteEnable |
Enables or disables write permission. | |
bool | kMPUReadEnable |
Enables or disables read permission. | |
struct mpu_region_config_t |
This structure is used when calling the MPU_DRV_Init function.
Data Fields | |
mpu_region_num_t | regionNum |
MPU region number. | |
uint32_t | startAddr |
Memory region start address. | |
uint32_t | endAddr |
Memory region end address. | |
mpu_low_masters_access_rights_t | accessRights1 [4] |
Low masters access permission. | |
mpu_high_masters_access_rights_t | accessRights2 [4] |
Low masters access permission. | |
bool | regionEnable |
Enables or disables region. | |
enum mpu_region_num_t |
enum mpu_err_attributes_t |
enum mpu_access_mode_t |
enum mpu_master_t |
enum mpu_err_access_ctr_t |
enum mpu_status_t |
|
inlinestatic |
base | Base address of MPU peripheral instance. |
|
inlinestatic |
base | Base address of MPU peripheral instance. |
|
inlinestatic |
base | Base address of MPU peripheral instance. |
true | MPU module is enabled. |
false | MPU module is disabled. |
void MPU_HAL_GetHardwareInfo | ( | MPU_Type * | base, |
mpu_hardware_info_t * | infoPtr | ||
) |
base | Base address of MPU peripheral instance. |
infoPtr | The pointer to the hardware information structure see mpu_hardware_info_t. |
void MPU_HAL_GetDetailErrorAccessInfo | ( | MPU_Type * | base, |
mpu_access_err_info_t * | errInfoArrayPtr | ||
) |
base | Base address of MPU peripheral instance. |
errInfoArrayPtr | The pointer to array of structure mpu_access_err_info_t. |
void MPU_HAL_SetRegionAddr | ( | MPU_Type * | base, |
mpu_region_num_t | regionNum, | ||
uint32_t | startAddr, | ||
uint32_t | endAddr | ||
) |
base | Base address of MPU peripheral instance.. |
regionNum | MPU region number. |
startAddr | Region start address. |
endAddr | Region end address. |
void MPU_HAL_SetLowMasterAccessRights | ( | MPU_Type * | base, |
mpu_region_num_t | regionNum, | ||
mpu_master_t | masterNum, | ||
const mpu_low_masters_access_rights_t * | accessRightsPtr | ||
) |
base | Base address of MPU peripheral instance. |
regionNum | MPU region number. |
masterNum | MPU master number. |
accessRightsPtr | The pointer of master access rights see mpu_low_masters_access_rights_t. |
void MPU_HAL_SetHighMasterAccessRights | ( | MPU_Type * | base, |
mpu_region_num_t | regionNum, | ||
mpu_master_t | masterNum, | ||
const mpu_high_masters_access_rights_t * | accessRightsPtr | ||
) |
base | Base address of MPU peripheral instance. |
regionNum | MPU region number. |
masterNum | MPU master number. |
accessRightsPtr | The pointer of master access rights see mpu_low_masters_access_rights_t. |
|
inlinestatic |
When a region changed not by alternating registers should set the valid again.
base | Base address of MPU peripheral instance. |
regionNum | MPU region number. |
enable | Enables or disables region. |
void MPU_HAL_SetLowMasterAccessRightsByAlternateReg | ( | MPU_Type * | base, |
mpu_region_num_t | regionNum, | ||
mpu_master_t | masterNum, | ||
const mpu_low_masters_access_rights_t * | accessRightsPtr | ||
) |
base | Base address of MPU peripheral instance. |
regionNum | MPU region number. |
masterNum | MPU master number. |
accessRightsPtr | The pointer of master access rights see mpu_low_masters_access_rights_t. |
void MPU_HAL_SetHighMasterAccessRightsByAlternateReg | ( | MPU_Type * | base, |
mpu_region_num_t | regionNum, | ||
mpu_master_t | masterNum, | ||
const mpu_high_masters_access_rights_t * | accessRightsPtr | ||
) |
base | Base address of MPU peripheral instance. |
regionNum | MPU region number. |
masterNum | MPU master number. |
accessRightsPtr | The pointer of master access rights see mpu_low_masters_access_rights_t. |
void MPU_HAL_SetRegionConfig | ( | MPU_Type * | base, |
const mpu_region_config_t * | regionConfigPtr | ||
) |
base | The MPU peripheral base address. |
regionConfigPtr | The pointer to the MPU user configure structure, see mpu_region_config_t. |
void MPU_HAL_Init | ( | MPU_Type * | base | ) |
base | The MPU peripheral base address. |