Configures the protection structure with its protection attributes of the Fixed Peripheral Protection Unit (PPU FIXED) master.
This function configures the master structure governing the corresponding slave structure pair. It is a mechanism to protect the slave PPU FIXED structure. The memory location of the slave structure is known, so the address, region size and sub-regions of the configuration structure are not applicable.
- Note
- This function is applicable for CPUSS ver_2 only.
- Parameters
-
base | The register base address of the protection structure is being configured. |
pcMask | The protection context mask. It specifies the protection context or a set of multiple protection contexts to be configured. It is a value of OR'd (|) items of cy_en_prot_pcmask_t. For example: (CY_PROT_PCMASK1 | CY_PROT_PCMASK3 | CY_PROT_PCMASK4). |
- Note
- The function accepts pcMask values from CY_PROT_PCMASK1 to CY_PROT_PCMASK15. But each device has its own number of available protection contexts. That number is defined by PERI_PC_NR in the config file.
- Parameters
-
userPermission | The user permission setting. The CY_PROT_PERM_R or CY_PROT_PERM_RW values are valid for the master. |
privPermission | The privileged permission setting. The CY_PROT_PERM_R or CY_PROT_PERM_RW values are valid for the master. |
secure | The secure flag. |
- Returns
- The status of the function call.
Status | Description |
CY_PROT_SUCCESS | The attributes were set up. |
CY_PROT_FAILURE | The attributes were not setup and the structure is possibly locked. |
CY_PROT_INVALID_STATE | The function was called on the device with an unsupported PERI HW version. |
- Note
- Only the user/privileged write permissions are configurable. The read permissions are read-only and cannot be configured.
-
PC0 accesses are read-only and are always enabled.
- Function Usage