Functions | |
__STATIC_INLINE cy_en_prot_status_t | Cy_Prot_DisablePpuProgStruct (PERI_PPU_PR_Type *base) |
This function disables both the master and slave parts of a protection unit. More... | |
cy_en_prot_status_t | Cy_Prot_ConfigPpuProgMasterStruct (PERI_PPU_PR_Type *base, const cy_stc_ppu_prog_cfg_t *config) |
Configures a Programmable Peripheral Protection Unit (PPU PROG) master protection struct with its protection attributes. More... | |
cy_en_prot_status_t | Cy_Prot_ConfigPpuProgSlaveStruct (PERI_PPU_PR_Type *base, const cy_stc_ppu_prog_cfg_t *config) |
Configures a Programmable Peripheral Protection Unit (PPU PROG) slave protection struct with its protection attributes. More... | |
cy_en_prot_status_t | Cy_Prot_EnablePpuProgMasterStruct (PERI_PPU_PR_Type *base) |
Enables the Master PPU PROG structure. More... | |
cy_en_prot_status_t | Cy_Prot_DisablePpuProgMasterStruct (PERI_PPU_PR_Type *base) |
Disables the Master PPU PROG structure. More... | |
cy_en_prot_status_t | Cy_Prot_EnablePpuProgSlaveStruct (PERI_PPU_PR_Type *base) |
Enables the Slave PPU PROG structure. More... | |
cy_en_prot_status_t | Cy_Prot_DisablePpuProgSlaveStruct (PERI_PPU_PR_Type *base) |
Disables the Slave PPU PROG structure. More... | |
cy_en_prot_status_t | Cy_Prot_GetPpuProgStruct (PERI_PPU_PR_Type **base, cy_en_prot_req_mode_t reqMode, uint32_t ppuProgIndex) |
Functions returns a pointer of the requested unused Programmable PPU structure. More... | |
__STATIC_INLINE cy_en_prot_status_t Cy_Prot_DisablePpuProgStruct | ( | PERI_PPU_PR_Type * | base | ) |
This function disables both the master and slave parts of a protection unit.
base | The base address for the Programmable PU structure to be disabled. |
Status | Description |
---|---|
CY_PROT_SUCCESS | The Master and Slave Programmable PU struct was disabled |
CY_PROT_FAILURE | The Master and/or slave Programmable PU struct was not disabled |
CY_PROT_INVALID_STATE | Function was called on the unsupported PERI IP version |
cy_en_prot_status_t Cy_Prot_ConfigPpuProgMasterStruct | ( | PERI_PPU_PR_Type * | base, |
const cy_stc_ppu_prog_cfg_t * | config | ||
) |
Configures a Programmable Peripheral Protection Unit (PPU PROG) master protection struct with its protection attributes.
This function configures the master struct governing the corresponding slave struct pair. It is a mechanism to protect the slave PPU PROG struct. Since the memory location of the slave struct is known, the address, regionSize and subregions of the configuration struct are not applicable.
Note that only the user/privileged write permissions are configurable. The read and execute permissions are read-only and cannot be configured.
base | The register base address of the protection struct being configured. |
config | Initialization structure with all the protection attributes. |
Status | Description |
---|---|
CY_PROT_SUCCESS | PPU PROG master struct was successfully configured. |
CY_PROT_FAILURE | The resource is locked. |
CY_PROT_BAD_PARAM | An incorrect/invalid parameter was passed. |
CY_PROT_INVALID_STATE | The function was called on the device with an unsupported PERI HW version. |
cy_en_prot_status_t Cy_Prot_ConfigPpuProgSlaveStruct | ( | PERI_PPU_PR_Type * | base, |
const cy_stc_ppu_prog_cfg_t * | config | ||
) |
Configures a Programmable Peripheral Protection Unit (PPU PROG) slave protection struct with its protection attributes.
This function configures the slave struct of a PPU PROG pair, which can protect any peripheral memory region in a device from invalid bus master accesses.
Note that the user/privileged execute accesses are read-only and are always enabled.
base | The register base address of the protection structure being configured. |
config | Initialization structure with all the protection attributes. |
Status | Description |
---|---|
CY_PROT_SUCCESS | PPU PROG slave struct was successfully configured. |
CY_PROT_FAILURE | The resource is locked. |
CY_PROT_BAD_PARAM | An incorrect/invalid parameter was passed. |
CY_PROT_INVALID_STATE | The function was called on the device with an unsupported PERI HW version. |
cy_en_prot_status_t Cy_Prot_EnablePpuProgMasterStruct | ( | PERI_PPU_PR_Type * | base | ) |
Enables the Master PPU PROG structure.
This is a PPU PROG master struct enable function. The PPU PROG protection settings will take effect after successful completion of this function call.
base | The base address for the protection unit structure being configured. |
Status | Description |
---|---|
CY_PROT_SUCCESS | The Master PU struct was enabled. |
CY_PROT_FAILURE | The Master PU struct is disabled and possibly locked. |
CY_PROT_INVALID_STATE | The function was called on the device with an unsupported PERI HW version. |
cy_en_prot_status_t Cy_Prot_DisablePpuProgMasterStruct | ( | PERI_PPU_PR_Type * | base | ) |
Disables the Master PPU PROG structure.
This is a PPU PROG master struct disable function. The PPU PROG protection settings will seize to take effect after successful completion of this function call.
base | The base address for the protection unit structure being configured. |
Status | Description |
---|---|
CY_PROT_SUCCESS | The Master PU struct was disabled. |
CY_PROT_FAILURE | The Master PU struct is enabled and possibly locked. |
CY_PROT_INVALID_STATE | The function was called on the device with an unsupported PERI HW version. |
cy_en_prot_status_t Cy_Prot_EnablePpuProgSlaveStruct | ( | PERI_PPU_PR_Type * | base | ) |
Enables the Slave PPU PROG structure.
This is a PPU PROG slave struct enable function. The PPU PROG protection settings will take effect after successful completion of this function call.
base | The base address for the protection unit structure being configured. |
Status | Description |
---|---|
CY_PROT_SUCCESS | The Slave PU struct was enabled. |
CY_PROT_FAILURE | The Slave PU struct is disabled and possibly locked. |
CY_PROT_INVALID_STATE | The function was called on the device with an unsupported PERI HW version. |
cy_en_prot_status_t Cy_Prot_DisablePpuProgSlaveStruct | ( | PERI_PPU_PR_Type * | base | ) |
Disables the Slave PPU PROG structure.
This is a PPU PROG slave struct disable function. The PPU PROG protection settings will seize to take effect after successful completion of this function call.
base | The base address for the protection unit structure being configured. |
Status | Description |
---|---|
CY_PROT_SUCCESS | The Slave PU struct was disabled. |
CY_PROT_FAILURE | The Slave PU struct is enabled and possibly locked. |
CY_PROT_INVALID_STATE | The function was called on the device with an unsupported PERI HW version. |
cy_en_prot_status_t Cy_Prot_GetPpuProgStruct | ( | PERI_PPU_PR_Type ** | base, |
cy_en_prot_req_mode_t | reqMode, | ||
uint32_t | ppuProgIndex | ||
) |
Functions returns a pointer of the requested unused Programmable PPU structure.
Function searches the Programmable PPU structure until it finds one that both the slave and master sections are disabled. After an available structure is located, function enables the slave structure and enables all attributes, to make sure that a subsequent call will not see this as an available (unused) Programmable PPU.
It is up to the user to implement, if needed, a system in which a semaphore will lock-out all but one CPU from calling this function at once.
base | The base address for the Programmable PPU structure returned if an unused structure was found. If an empty structure was not found, the returned pointer is NULL. |
reqMode | This parameter (request mode) selects how the user wants to select a Programmable PPU structure. |
reqMode | Description |
---|---|
CY_PROT_REQMODE_HIGHPRIOR | Return the Programmable PPU structure with the highest priority. |
CY_PROT_REQMODE_LOWPRIOR | Return the Programmable PPU structure with the lowest priority. |
CY_PROT_REQMODE_INDEX | Return the Programmable PPU structure with the specific index. |
ppuProgIndex | This is the index of the requested Programmable PPU structure. It is only used if the request mode is reqMode = CY_PROT_REQMODE_INDEX. |
Status | Description |
---|---|
CY_PROT_SUCCESS | The Slave PU struct was disabled. |
CY_PROT_FAILURE | The Master or Slave Programmable PPU struct is disabled and possibly locked. |
CY_PROT_UNAVAILABLE | The requested structure in use or there were no unused structures. |
CY_PROT_INVALID_STATE | Function was called on unsupported PERI HW version. |