Functions | |
void | PRCMInfClockConfigureSet (uint32_t ui32ClkDiv, uint32_t ui32PowerMode) |
Configure the infrastructure clock. More... | |
uint32_t | PRCMInfClockConfigureGet (uint32_t ui32PowerMode) |
Use this function to get the infrastructure clock configuration. More... | |
static void | PRCMMcuPowerOff (void) |
Request a power off of the MCU voltage domain. More... | |
static void | PRCMMcuPowerOffCancel (void) |
Cancel a request for a power off of the MCU voltage domain. More... | |
static void | PRCMMcuUldoConfigure (uint32_t ui32Enable) |
Assert or de-assert a request for the uLDO. More... | |
static void | PRCMGPTimerClockDivisionSet (uint32_t clkDiv) |
Setup the clock division factor for the GP-Timer domain. More... | |
static uint32_t | PRCMGPTimerClockDivisionGet (void) |
Get the clock division factor for the GP-Timer domain. More... | |
static void | PRCMAudioClockEnable (void) |
Enable the audio clock generation. More... | |
static void | PRCMAudioClockDisable (void) |
Disable the audio clock generation. More... | |
void | PRCMAudioClockConfigSet (uint32_t ui32ClkConfig, uint32_t ui32SampleRate) |
Configure the audio clock generation. More... | |
void | PRCMAudioClockConfigSetOverride (uint32_t ui32ClkConfig, uint32_t ui32MstDiv, uint32_t ui32BitDiv, uint32_t ui32WordDiv) |
Configure the audio clock generation with manual setting of clock divider. More... | |
static void | PRCMLoadSet (void) |
Use this function to synchronize the load settings. More... | |
static bool | PRCMLoadGet (void) |
Check if any of the load sensitive register has been updated. More... | |
static void | PRCMDomainEnable (uint32_t ui32Domains) |
Enable clock domains in the MCU voltage domain. More... | |
static void | PRCMDomainDisable (uint32_t ui32Domains) |
Disable clock domains in the MCU voltage domain. More... | |
void | PRCMPowerDomainOn (uint32_t ui32Domains) |
Turn power on in power domains in the MCU domain. More... | |
void | PRCMPowerDomainOff (uint32_t ui32Domains) |
Turn off a specific power domain. More... | |
static void | PRCMRfPowerDownWhenIdle (void) |
Configure RF core to power down when idle. More... | |
void | PRCMPeripheralRunEnable (uint32_t ui32Peripheral) |
Enables a peripheral in Run mode. More... | |
void | PRCMPeripheralRunDisable (uint32_t ui32Peripheral) |
Disables a peripheral in Run mode. More... | |
void | PRCMPeripheralSleepEnable (uint32_t ui32Peripheral) |
Enables a peripheral in sleep mode. More... | |
void | PRCMPeripheralSleepDisable (uint32_t ui32Peripheral) |
Disables a peripheral in sleep mode. More... | |
void | PRCMPeripheralDeepSleepEnable (uint32_t ui32Peripheral) |
Enables a peripheral in deep-sleep mode. More... | |
void | PRCMPeripheralDeepSleepDisable (uint32_t ui32Peripheral) |
Disables a peripheral in deep-sleep mode. More... | |
uint32_t | PRCMPowerDomainStatus (uint32_t ui32Domains) |
Get the status for a specific power domain. More... | |
static bool | PRCMRfReady (void) |
Return the access status of the RF Core. More... | |
static void | PRCMSleep (void) |
Put the processor into sleep mode. More... | |
void | PRCMDeepSleep (void) |
Put the processor into deep-sleep mode. More... | |
static void | PRCMCacheRetentionEnable (void) |
Enable CACHE RAM retention. More... | |
static void | PRCMCacheRetentionDisable (void) |
Disable CACHE RAM retention. More... | |
void PRCMAudioClockConfigSet | ( | uint32_t | ui32ClkConfig, |
uint32_t | ui32SampleRate | ||
) |
Configure the audio clock generation.
Use this function to set the sample rate when using internal audio clock generation for the I2S module.
ui32ClkConfig | is the audio clock configuration. The parameter is a bitwise OR'ed value consisting of:
|
ui32SampleRate | is the desired audio clock sample rate. The supported sample rate configurations are: |
Definition at line 268 of file prcm.c.
void PRCMAudioClockConfigSetOverride | ( | uint32_t | ui32ClkConfig, |
uint32_t | ui32MstDiv, | ||
uint32_t | ui32BitDiv, | ||
uint32_t | ui32WordDiv | ||
) |
Configure the audio clock generation with manual setting of clock divider.
Use this function to set the audio clock divider values manually.
ui32ClkConfig | is the audio clock configuration. The parameter is a bitwise OR'ed value consisting of:
|
ui32MstDiv | is the desired master clock divider. |
ui32WordDiv | is the desired word clock divider. |
ui32BitDiv | is the desired bit clock divider. |
Definition at line 350 of file prcm.c.
|
inlinestatic |
Disable the audio clock generation.
Use this function to disable the audio clock generation.
Definition at line 458 of file prcm.h.
Referenced by PRCMAudioClockConfigSet(), and PRCMAudioClockConfigSetOverride().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
void PRCMDeepSleep | ( | void | ) |
Put the processor into deep-sleep mode.
This function places the processor into deep-sleep mode; it does not return until the processor returns to run mode. The peripherals that are enabled via PRCMPeripheralDeepSleepEnable() continue to operate and can wake up the processor.
Definition at line 656 of file prcm.c.
Referenced by PowerCtrlStateSet().
|
inlinestatic |
Disable clock domains in the MCU voltage domain.
ui32Domains | is a bit mask containing the clock domains to disable. The independent clock domains inside the MCU voltage domain are: |
|
inlinestatic |
Enable clock domains in the MCU voltage domain.
ui32Domains | is a bit mask containing the clock domains to enable. The independent clock domains inside the MCU voltage domain which can be configured are: |
Definition at line 604 of file prcm.h.
Referenced by SysCtrlPowerEverything().
|
inlinestatic |
Get the clock division factor for the GP-Timer domain.
Use this function to get the clock division factor set for the GP-Timer.
|
inlinestatic |
Setup the clock division factor for the GP-Timer domain.
Use this function to set up the clock division factor on the GP-Timer.
The division rate will be constant and ungated for Run / Sleep / DeepSleep mode when it is slower than PRCM_GPTCLKDIV_RATIO setting. When set faster than PRCM_GPTCLKDIV_RATIO setting PRCM_GPTCLKDIV_RATIO will be used. Note that the register will contain the written content even though the setting is faster than PRCM_GPTCLKDIV_RATIO setting.
clkDiv | is the division factor to set. The argument must be only one of the following values: |
uint32_t PRCMInfClockConfigureGet | ( | uint32_t | ui32PowerMode | ) |
Use this function to get the infrastructure clock configuration.
ui32PowerMode | determines which System CPU power mode to return the infrastructure clock division ratio for. The three allowed power modes are: |
void PRCMInfClockConfigureSet | ( | uint32_t | ui32ClkDiv, |
uint32_t | ui32PowerMode | ||
) |
Configure the infrastructure clock.
Each System CPU power mode has its own infrastructure clock division factor. This function can be used for setting up the division factor for the infrastructure clock in the available power modes for the System CPU. The infrastructure clock is used for all internal logic in the PRCM, and is always running as long as power is on in the MCU voltage domain. This can be enabled and disabled from the AON Wake Up Controller.
ui32ClkDiv | determines the division ratio for the infrastructure clock when the device is in the specified mode. Allowed division factors for all three System CPU power modes are: |
ui32PowerMode | determines the System CPU operation mode for which to modify the clock division factor. The three allowed power modes are: |
|
inlinestatic |
Check if any of the load sensitive register has been updated.
true
: No registers have changed since the last load.false
: Any register has changed.Definition at line 574 of file prcm.h.
Referenced by SysCtrlPowerEverything().
|
inlinestatic |
Use this function to synchronize the load settings.
Most of the clock settings in the PRCM module should be updated synchronously. This is ensured by the implementation of a load registers that, when written to, will let the previous written update values for all the relevant registers propagate through to hardware.
The functions that require a synchronization of the clock settings are:
Definition at line 554 of file prcm.h.
Referenced by SysCtrlPowerEverything().
|
inlinestatic |
Request a power off of the MCU voltage domain.
Use this function to request a power off of the entire MCU voltage domain. This request will have no affect until deepsleep mode is requested.
Definition at line 306 of file prcm.h.
Referenced by PowerCtrlStateSet().
|
inlinestatic |
Cancel a request for a power off of the MCU voltage domain.
Use this function to cancel a request for power off of the entire MCU voltage domain. This could be relevant if a transition to power down is regretted and an application must backtrack.
|
inlinestatic |
Assert or de-assert a request for the uLDO.
Use this function to request to switch to the micro Low Voltage Dropout regulator (uLDO). The uLDO has a much lower capacity for supplying power to the system. It is therefore imperative and solely the programmers responsibility to ensure that a sufficient amount of peripheral modules have been turned of before requesting a switch to the uLDO.
ui32Enable |
|
Definition at line 360 of file prcm.h.
Referenced by PowerCtrlSourceSet().
void PRCMPeripheralDeepSleepDisable | ( | uint32_t | ui32Peripheral | ) |
Disables a peripheral in deep-sleep mode.
This function causes a peripheral to stop operating when the processor goes into deep-sleep mode. Disabling peripherals while in deep-sleep mode helps to lower the current draw of the device, and can keep peripherals that require a particular clock frequency from operating when the clock changes as a result of entering deep-sleep mode. If enabled (via PRCMPeripheralRunEnable()), the peripheral will automatically resume operation when the processor leaves deep-sleep mode, maintaining its entire state from before deep-sleep mode was entered.
ui32Peripheral | is the peripheral to disable in deep-sleep mode. The parameter must be one of the following: |
void PRCMPeripheralDeepSleepEnable | ( | uint32_t | ui32Peripheral | ) |
Enables a peripheral in deep-sleep mode.
This function allows a peripheral to continue operating when the processor goes into deep-sleep mode. Since the clocking configuration of the device may change, not all peripherals can safely continue operating while the processor is in sleep mode. This in turn depends on the chosen power mode. It is the responsibility of the caller to make sensible choices.
ui32Peripheral | is the peripheral to enable in deep-sleep mode. The parameter must be one of the following: |
Definition at line 569 of file prcm.c.
Referenced by SysCtrlPowerEverything().
void PRCMPeripheralRunDisable | ( | uint32_t | ui32Peripheral | ) |
Disables a peripheral in Run mode.
Disables a peripheral in Run mode
Peripherals are disabled with this function. Once disabled, they will not operate or respond to register reads/writes.
ui32Peripheral | is the peripheral to disable. The parameter must be one of the following: |
void PRCMPeripheralRunEnable | ( | uint32_t | ui32Peripheral | ) |
Enables a peripheral in Run mode.
Peripherals are enabled with this function. At power-up, some peripherals are disabled; they must be enabled in order to operate or respond to register reads/writes.
ui32Peripheral | is the peripheral to enable. The parameter must be one of the following: |
Definition at line 489 of file prcm.c.
Referenced by SysCtrlPowerEverything().
void PRCMPeripheralSleepDisable | ( | uint32_t | ui32Peripheral | ) |
Disables a peripheral in sleep mode.
This function causes a peripheral to stop operating when the processor goes into sleep mode. Disabling peripherals while in sleep mode helps to lower the current draw of the device. If enabled (via PRCMPeripheralRunEnable()), the peripheral will automatically resume operation when the processor leaves sleep mode, maintaining its entire state from before sleep mode was entered.
ui32Peripheral | is the peripheral to disable in sleep mode. The parameter must be one of the following: |
void PRCMPeripheralSleepEnable | ( | uint32_t | ui32Peripheral | ) |
Enables a peripheral in sleep mode.
This function allows a peripheral to continue operating when the processor goes into sleep mode. Since the clocking configuration of the device does not change, any peripheral can safely continue operating while the processor is in sleep mode, and can therefore wake the processor from sleep mode.
ui32Peripheral | is the peripheral to enable in sleep mode. The parameter must be one of the following: |
Definition at line 529 of file prcm.c.
Referenced by SysCtrlPowerEverything().
void PRCMPowerDomainOff | ( | uint32_t | ui32Domains | ) |
Turn off a specific power domain.
Use this function to power down domains inside the MCU voltage domain.
ui32Domains | determines which domain to request a power down for. The domains that can be turned on/off are:
|
Definition at line 442 of file prcm.c.
Referenced by PowerCtrlStateSet().
void PRCMPowerDomainOn | ( | uint32_t | ui32Domains | ) |
Turn power on in power domains in the MCU domain.
Use this function to turn on power domains inside the MCU voltage domain.
Power on and power off request has different implications for the different power domains.
ui32Domains | determines which power domains to turn on. The domains that can be turned on/off are:
|
Definition at line 395 of file prcm.c.
Referenced by SysCtrlPowerEverything().
uint32_t PRCMPowerDomainStatus | ( | uint32_t | ui32Domains | ) |
Get the status for a specific power domain.
Use this function to retrieve the current power status of one or more power domains.
ui32Domains | determines which domain to get the power status for. The parameter must be an OR'ed combination of one or several of:
|
Definition at line 609 of file prcm.c.
Referenced by SysCtrlPowerEverything().
|
inlinestatic |
|
inlinestatic |
Return the access status of the RF Core.
Use this function to check if the RF Core is on and ready to be accessed. Accessing register or memories that are not powered and clocked will cause a bus fault.
true
: RF Core can be accessed.false
: RF Core domain is not ready for access.
|
inlinestatic |
Put the processor into sleep mode.
This function places the processor into sleep mode; it does not return until the processor returns to run mode. The peripherals that are enabled viaPRCMPeripheralSleepEnable() continue to operate and can wake up the processor.
Definition at line 1074 of file prcm.h.
#define I2S_SAMPLE_RATE_16K 0x00000001 |
Definition at line 169 of file prcm.h.
Referenced by PRCMAudioClockConfigSet().
#define I2S_SAMPLE_RATE_24K 0x00000002 |
Definition at line 170 of file prcm.h.
Referenced by PRCMAudioClockConfigSet().
#define I2S_SAMPLE_RATE_32K 0x00000004 |
Definition at line 171 of file prcm.h.
Referenced by PRCMAudioClockConfigSet().
#define I2S_SAMPLE_RATE_48K 0x00000008 |
Definition at line 172 of file prcm.h.
Referenced by PRCMAudioClockConfigSet().
#define PRCM_CLOCK_DIV_1 PRCM_GPTCLKDIV_RATIO_DIV1 |
Definition at line 118 of file prcm.h.
Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().
#define PRCM_CLOCK_DIV_128 PRCM_GPTCLKDIV_RATIO_DIV128 |
#define PRCM_CLOCK_DIV_16 PRCM_GPTCLKDIV_RATIO_DIV16 |
#define PRCM_CLOCK_DIV_2 PRCM_GPTCLKDIV_RATIO_DIV2 |
Definition at line 119 of file prcm.h.
Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().
#define PRCM_CLOCK_DIV_256 PRCM_GPTCLKDIV_RATIO_DIV256 |
#define PRCM_CLOCK_DIV_32 PRCM_GPTCLKDIV_RATIO_DIV32 |
Definition at line 123 of file prcm.h.
Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().
#define PRCM_CLOCK_DIV_4 PRCM_GPTCLKDIV_RATIO_DIV4 |
#define PRCM_CLOCK_DIV_64 PRCM_GPTCLKDIV_RATIO_DIV64 |
#define PRCM_CLOCK_DIV_8 PRCM_GPTCLKDIV_RATIO_DIV8 |
Definition at line 121 of file prcm.h.
Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().
#define PRCM_DEEP_SLEEP_MODE 0x00000004 |
Definition at line 111 of file prcm.h.
Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().
#define PRCM_DOMAIN_CPU 0x00000020 |
Definition at line 144 of file prcm.h.
Referenced by PowerCtrlStateSet(), PRCMPowerDomainOff(), and PRCMPowerDomainOn().
#define PRCM_DOMAIN_PERIPH 0x00000004 |
Definition at line 138 of file prcm.h.
Referenced by PowerCtrlStateSet(), PRCMPowerDomainOff(), PRCMPowerDomainOn(), PRCMPowerDomainStatus(), and SysCtrlPowerEverything().
#define PRCM_DOMAIN_POWER_OFF 0x00000002 |
Definition at line 152 of file prcm.h.
Referenced by PRCMPowerDomainStatus().
#define PRCM_DOMAIN_POWER_ON 0x00000001 |
Definition at line 153 of file prcm.h.
Referenced by PRCMPowerDomainStatus(), and SysCtrlPowerEverything().
#define PRCM_DOMAIN_RFCORE 0x00000001 |
Definition at line 134 of file prcm.h.
Referenced by PowerCtrlStateSet(), PRCMDomainDisable(), PRCMDomainEnable(), PRCMPowerDomainOff(), PRCMPowerDomainOn(), PRCMPowerDomainStatus(), and SysCtrlPowerEverything().
#define PRCM_DOMAIN_SERIAL 0x00000002 |
Definition at line 136 of file prcm.h.
Referenced by PowerCtrlStateSet(), PRCMPowerDomainOff(), PRCMPowerDomainOn(), PRCMPowerDomainStatus(), and SysCtrlPowerEverything().
#define PRCM_DOMAIN_VIMS 0x00000010 |
Definition at line 142 of file prcm.h.
Referenced by PowerCtrlStateSet(), PRCMDomainDisable(), PRCMDomainEnable(), PRCMPowerDomainOff(), PRCMPowerDomainOn(), and SysCtrlPowerEverything().
#define PRCM_RUN_MODE 0x00000001 |
Definition at line 109 of file prcm.h.
Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().
#define PRCM_SLEEP_MODE 0x00000002 |
Definition at line 110 of file prcm.h.
Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().
#define PRCM_WCLK_SINGLE_PHASE 0x00000000 |
Definition at line 165 of file prcm.h.
Referenced by PRCMAudioClockConfigSet(), and PRCMAudioClockConfigSetOverride().