Functions | |
cy_en_prot_status_t | Cy_Prot_ConfigMpuStruct (PROT_MPU_MPU_STRUCT_Type *base, const cy_stc_mpu_cfg_t *config) |
This function configures a memory protection unit (MPU) struct with its protection attributes. More... | |
cy_en_prot_status_t | Cy_Prot_EnableMpuStruct (PROT_MPU_MPU_STRUCT_Type *base) |
Enables the MPU struct, which allows the MPU protection attributes to take effect. More... | |
cy_en_prot_status_t | Cy_Prot_DisableMpuStruct (PROT_MPU_MPU_STRUCT_Type *base) |
Disables the MPU struct, which prevents the MPU protection attributes from taking effect. More... | |
cy_en_prot_status_t Cy_Prot_ConfigMpuStruct | ( | PROT_MPU_MPU_STRUCT_Type * | base, |
const cy_stc_mpu_cfg_t * | config | ||
) |
This function configures a memory protection unit (MPU) struct with its protection attributes.
The protection structs act like the gatekeepers for a master's accesses to memory, allowing only the permitted transactions to go through.
base | The base address for the MPU struct being configured. |
config | Initialization structure containing all the protection attributes. |
Status | Description |
---|---|
CY_PROT_SUCCESS | The MPU struct was configured. |
CY_PROT_FAILURE | Configuration failed due to a protection violation. |
cy_en_prot_status_t Cy_Prot_EnableMpuStruct | ( | PROT_MPU_MPU_STRUCT_Type * | base | ) |
Enables the MPU struct, which allows the MPU protection attributes to take effect.
base | The base address of the MPU struct being configured. |
Status | Description |
---|---|
CY_PROT_SUCCESS | The MPU struct was enabled. |
CY_PROT_FAILURE | The MPU struct is disabled and possibly locked. |
cy_en_prot_status_t Cy_Prot_DisableMpuStruct | ( | PROT_MPU_MPU_STRUCT_Type * | base | ) |
Disables the MPU struct, which prevents the MPU protection attributes from taking effect.
base | The base address of the MPU struct being configured. |
Status | Description |
---|---|
CY_PROT_SUCCESS | The MPU struct was disabled. |
CY_PROT_FAILURE | The MPU struct is enabled and possibly locked. |