1.1.7 Power, Clock and Reset (PCR) module

The PCR module provides control of peripheral clocks, ability to reset peripherals and control of power to the periperhals

Library Interface

PCR library provides the following interfaces:

Functions

Name Description
void PCR_Initialize (void Initializes the PCR module based on MCC configuration
void PCR_PeripheralResetLock (void) Locks the peripheral reset enable register
void PCR_PeripheralResetUnLock (void) Unlocks the peripheral reset enable register
void PCR_PrivilegeEnLock (void) Locks privilege enable registers
void PCR_PrivilegeEnUnLock (void) Un-locks privilege enable registers
void PCR_PrivilegeDisablex (PCR_PRIV_ENx blockId) Enables access to the given peripheral block in all modes
void PCR_PrivilegeEnablex (PCR_PRIV_ENx blockId) Enables access to the given peripheral block in all modes
void PCR_ResetEnablex (PCR_RESET_ENx blockId) Resets the given peripheral
void PCR_SleepDisablex (PCR_SLEEP_ENx blockId) Brings the module out of sleep mode and is free to use the clock as necessary
void PCR_SleepEnablex (PCR_SLEEP_ENx blockId) The given peripheral block is commanded to enter into sleep mode at the next available moment

Data types and constants

Name Type Description
PCR_SLEEP_ENx Enum This enum is used to to specify the peripheral block for which sleep mode needs to be enabled/disabled using the PCR_SleepEnablex()/PCR_SleepDisablex() API
PCR_RESET_ENx Enum This enum is used to to specify the peripheral block for which reset needs to be enabled using the PCR_ResetEnablex() API
PCR_PRIV_ENx Enum This enum is used to to specify the peripheral block for which privilege access is to be enabled/disabled using the PCR_PrivilegeEnablex()/PCR_PrivilegeDisablex() API