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... | |
void | PRCMAudioClockConfigOverride (uint8_t ui8SamplingEdge, uint8_t ui8WCLKPhase, uint32_t ui32MstDiv, uint32_t ui32BitDiv, uint32_t ui32WordDiv) |
Configure the audio clocks for I2S module. More... | |
void | PRCMAudioClockInternalSource (void) |
Configure the audio clocks to be internally generated. More... | |
void | PRCMAudioClockExternalSource (void) |
Configure the audio clocks to be externally generated. 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 PRCMAudioClockConfigOverride | ( | uint8_t | ui8SamplingEdge, |
uint8_t | ui8WCLKPhase, | ||
uint32_t | ui32MstDiv, | ||
uint32_t | ui32BitDiv, | ||
uint32_t | ui32WordDiv | ||
) |
Configure the audio clocks for I2S module.
ui8SamplingEdge | Define the clock polarity: |
ui8WCLKPhase | Define I2S phase used
|
ui32MstDiv | is the desired master clock divider. |
ui32BitDiv | is the desired bit clock divider. |
ui32WordDiv | is the desired word clock divider. |
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: |
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. |
|
inlinestatic |
Disable the audio clock generation.
Use this function to disable the audio clock generation.
Referenced by PRCMAudioClockConfigOverride(), PRCMAudioClockConfigSet(), and PRCMAudioClockConfigSetOverride().
|
inlinestatic |
Enable the audio clock generation.
Use this function to enable the audio clock generation.
void PRCMAudioClockExternalSource | ( | void | ) |
Configure the audio clocks to be externally generated.
Use this function to set the audio clocks as external.
void PRCMAudioClockInternalSource | ( | void | ) |
Configure the audio clocks to be internally generated.
Use this function to set the audio clocks as internal.
|
inlinestatic |
Disable CACHE RAM retention.
Disables CACHE RAM retention on both VIMS_TRAM and VIMS_CRAM
|
inlinestatic |
Enable CACHE RAM retention.
Enables CACHE RAM retention on both VIMS_TRAM and VIMS_CRAM
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.
|
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: |
|
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.
|
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:
|
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.
|
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 |
|
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: |
void PRCMPeripheralRunDisable | ( | uint32_t | ui32Peripheral | ) |
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: |
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: |
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:
|
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:
|
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:
|
|
inlinestatic |
Configure RF core to power down when idle.
Use this function to configure the RF core to power down when Idle. This is handled automatically in hardware if the RF Core reports that it is idle.
|
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 via PRCMPeripheralSleepEnable() continue to operate and can wake up the processor.
#define I2S_SAMPLE_RATE_16K 0x00000001 |
Referenced by PRCMAudioClockConfigSet().
#define I2S_SAMPLE_RATE_24K 0x00000002 |
Referenced by PRCMAudioClockConfigSet().
#define I2S_SAMPLE_RATE_32K 0x00000004 |
Referenced by PRCMAudioClockConfigSet().
#define I2S_SAMPLE_RATE_48K 0x00000008 |
Referenced by PRCMAudioClockConfigSet().
#define PRCM_CLOCK_DIV_1 PRCM_GPTCLKDIV_RATIO_DIV1 |
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 |
Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().
#define PRCM_CLOCK_DIV_256 PRCM_GPTCLKDIV_RATIO_DIV256 |
#define PRCM_CLOCK_DIV_32 PRCM_GPTCLKDIV_RATIO_DIV32 |
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 |
Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().
#define PRCM_DEEP_SLEEP_MODE 0x00000004 |
Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().
#define PRCM_DOMAIN_CLKCTRL 0x00000080 |
#define PRCM_DOMAIN_CPU 0x00000020 |
Referenced by PRCMPowerDomainOff(), and PRCMPowerDomainOn().
#define PRCM_DOMAIN_MCU 0x00000100 |
#define PRCM_DOMAIN_PERIPH 0x00000004 |
Referenced by PRCMPowerDomainOff(), PRCMPowerDomainOn(), and PRCMPowerDomainStatus().
#define PRCM_DOMAIN_POWER_DOWN_READY 0x00000000 |
#define PRCM_DOMAIN_POWER_OFF 0x00000002 |
Referenced by PRCMPowerDomainStatus().
#define PRCM_DOMAIN_POWER_ON 0x00000001 |
Referenced by PRCMPowerDomainStatus().
#define PRCM_DOMAIN_RFCORE 0x00000001 |
Referenced by PRCMDomainDisable(), PRCMDomainEnable(), PRCMPowerDomainOff(), PRCMPowerDomainOn(), and PRCMPowerDomainStatus().
#define PRCM_DOMAIN_SERIAL 0x00000002 |
Referenced by PRCMPowerDomainOff(), PRCMPowerDomainOn(), and PRCMPowerDomainStatus().
#define PRCM_DOMAIN_SYSBUS 0x00000008 |
#define PRCM_DOMAIN_TIMER 0x00000040 |
#define PRCM_DOMAIN_VIMS 0x00000010 |
Referenced by PRCMDomainDisable(), PRCMDomainEnable(), PRCMPowerDomainOff(), and PRCMPowerDomainOn().
#define PRCM_I2S_WCLK_DUAL_PHASE 1 |
#define PRCM_I2S_WCLK_NEG_EDGE 0 |
#define PRCM_I2S_WCLK_POS_EDGE 1 |
#define PRCM_I2S_WCLK_SINGLE_PHASE 0 |
#define PRCM_I2S_WCLK_USER_DEF 2 |
#define PRCM_PERIPH_CRYPTO ( 0x00000400 | ( PRCM_SECDMACLKGR_CRYPTO_CLK_EN_S )) |
#define PRCM_PERIPH_GPIO ( 0x00000500 | ( PRCM_GPIOCLKGR_CLK_EN_S )) |
#define PRCM_PERIPH_I2C0 ( 0x00000300 | ( PRCM_I2CCLKGR_CLK_EN_S )) |
#define PRCM_PERIPH_I2S ( 0x00000600 | ( PRCM_I2SCLKGR_CLK_EN_S )) |
#define PRCM_PERIPH_SSI0 ( 0x00000100 | ( PRCM_SSICLKGR_CLK_EN_S )) |
#define PRCM_PERIPH_SSI1 ( 0x00000100 | ( PRCM_SSICLKGR_CLK_EN_S + 1 )) |
#define PRCM_PERIPH_TIMER0 ( 0x00000000 | ( PRCM_GPTCLKGR_CLK_EN_S )) |
#define PRCM_PERIPH_TIMER1 ( 0x00000000 | ( PRCM_GPTCLKGR_CLK_EN_S + 1 )) |
#define PRCM_PERIPH_TIMER2 ( 0x00000000 | ( PRCM_GPTCLKGR_CLK_EN_S + 2 )) |
#define PRCM_PERIPH_TIMER3 ( 0x00000000 | ( PRCM_GPTCLKGR_CLK_EN_S + 3 )) |
#define PRCM_PERIPH_TRNG ( 0x00000400 | ( PRCM_SECDMACLKGR_TRNG_CLK_EN_S )) |
#define PRCM_PERIPH_UART0 ( 0x00000200 | ( PRCM_UARTCLKGR_CLK_EN_S )) |
#define PRCM_PERIPH_UDMA ( 0x00000400 | ( PRCM_SECDMACLKGR_DMA_CLK_EN_S )) |
#define PRCM_RUN_MODE 0x00000001 |
Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().
#define PRCM_SLEEP_MODE 0x00000002 |
Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().
#define PRCM_WCLK_DUAL_PHASE 0x00000002 |
Referenced by PRCMAudioClockConfigOverride().
#define PRCM_WCLK_NEG_EDGE 0x00000008 |
#define PRCM_WCLK_POS_EDGE 0x00000000 |
#define PRCM_WCLK_SINGLE_PHASE 0x00000000 |
Referenced by PRCMAudioClockConfigOverride(), PRCMAudioClockConfigSet(), and PRCMAudioClockConfigSetOverride().
#define PRCM_WCLK_USER_DEF 0x00000004 |
Referenced by PRCMAudioClockConfigOverride().