CC26xx Driver Library |

- Main Page
- Related Pages
- CC26xx APIs
- Register Descriptions
- Online Resources

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions
[prcm] Power Reset Clock Manager

## Functions
void | PRCMInfClockConfigureSet (uint32_t ui32ClkDiv, uint32_t ui32PowerMode)
| Configure the infrastructure clock. More...
uint32_t | PRCMInfClockConfigureGet (uint32_t ui32PowerMode)
| Use this function to retreive the set infrastructure clock configuration. More...
__STATIC_INLINE void | PRCMMcuPowerOff (void)
| Request a power off of the MCU voltage domain. More...
__STATIC_INLINE void | PRCMMcuPowerOffCancel (void)
| Cancel a request for a power off of the MCU voltage domain. More...
__STATIC_INLINE void | PRCMMcuUldoConfigure (uint32_t ui32Enable)
| Assert or deassert a request for the uLDO. More...
void | PRCMClockConfigureSet (uint32_t ui32Domains, uint32_t ui32ClkDiv)
| Setup the clock division factor for a subsystem in the MCU voltage domain. More...
uint32_t | PRCMClockConfigureGet (uint32_t ui32Domain)
| Get the clock configuration for a specific sub system in the MCU Voltage Domain. More...
__STATIC_INLINE void | PRCMAudioClockEnable (void)
| Enable the audio clock generation. More...
__STATIC_INLINE 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_INLINE void | PRCMLoadSet (void)
| Use this function to synchronize the load settings. More...
__STATIC_INLINE bool | PRCMLoadGet (void)
| Check if any of the load sensitive register has been updated. More...
__STATIC_INLINE void | PRCMDomainEnable (uint32_t ui32Domains)
| Enable clock domains in the MCU voltage domain. More...
__STATIC_INLINE 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_INLINE 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_INLINE bool | PRCMRfReady (void)
| Return the access status of the RF Core. More...
__STATIC_INLINE bool | PRCMWdtResetStatus (void)
| Read reset status for WatchDog Timer. More...
__STATIC_INLINE void | PRCMSleep (void)
| Put the processor into sleep mode. More...
void | PRCMDeepSleep (void)
| Put the processor into deep-sleep mode. More...
void | PRCMRetentionEnable (uint32_t ui32PowerDomain)
| Enable retention on specific power domains. More...
void | PRCMRetentionDisable (uint32_t ui32PowerDomain)
| Disable retention on power domains. More...

## Detailed Description

## Function Documentation

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.

Note
  While other clocks are possible, the stability of the four sample rates defined here are only guaranteed if the clock input to the I2S module is 48MHz. This can be configured using PRCMClockConfigureSet().

Parameters

  ui32ClkConfig | is the audio clock configuration. The parameter is a bitwise OR'ed value consisting of: Phase PRCM_WCLK_SINGLE_PHASE PRCM_WCLK_DUAL_PHASE Clock polarity PRCM_WCLK_NEG_EDGE PRCM_WCLK_POS_EDGE
  ui32SampleRate | is the desired audio clock sample rate. The supported sample rate configurations are: I2S_SAMPLE_RATE_16K I2S_SAMPLE_RATE_24K I2S_SAMPLE_RATE_32K I2S_SAMPLE_RATE_48K

Returns
  None

See also
  PRCMAudioClockConfigSetOverride()

Definition at line 386 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.

Note
  See hardware documentation before setting audio clock dividers manually.

Parameters

  ui32ClkConfig | is the audio clock configuration. The parameter is a bitwise OR'ed value consisting of: Phase PRCM_WCLK_SINGLE_PHASE PRCM_WCLK_DUAL_PHASE Clock polarity PRCM_WCLK_NEG_EDGE PRCM_WCLK_POS_EDGE
  ui32MstDiv | is the desired master clock divider.
  ui32WordDiv | is the desired word clock divider.
  ui32BitDiv | is the desired bit clock divider.

Returns
  None

See also
  PRCMAudioClockConfigSet()

Definition at line 469 of file prcm.c.

__STATIC_INLINE void PRCMAudioClockDisable | ( | void |  | ) |

Disable the audio clock generation.

Use this function to disable the audio clock generation.

Returns
  None

Definition at line 490 of file prcm.h.

Referenced by PRCMAudioClockConfigSet(), and PRCMAudioClockConfigSetOverride().

__STATIC_INLINE void PRCMAudioClockEnable | ( | void |  | ) |

Enable the audio clock generation.

Use this function to enable the audio clock generation.

Returns
  None

Definition at line 472 of file prcm.h.

uint32_t PRCMClockConfigureGet | ( | uint32_t | ui32Domain | ) |

Get the clock configuration for a specific sub system in the MCU Voltage Domain.

Use this function to retrieve the clock division factor on a specific clock domain inside the MCU voltage domain.

Parameters

  ui32Domain | defines the sub system for which to return the clock configuration. The 5 clock domains are: PRCM_DOMAIN_SYSBUS PRCM_DOMAIN_CPU PRCM_DOMAIN_PERIPH PRCM_DOMAIN_SERIAL PRCM_DOMAIN_TIMER

Returns
  Returns the sub system clock configuration

Get the clock configuration for a specific sub system in the MCU Voltage Domain.

Definition at line 335 of file prcm.c.

Referenced by SysCtrlPeripheralClockGet().

void PRCMClockConfigureSet | ( | uint32_t | ui32Domains,
|  | uint32_t | ui32ClkDiv
| ) |  |

Setup the clock division factor for a subsystem in the MCU voltage domain.

Use this function to set up the clock division factor on a specific clock domain inside the MCU voltage domain.

The PRCM_DOMAIN_TIMER division rate will be constant and ungated for Run / Sleep / DeepSleep mode when it is slower than the PRCM_DOMAIN_PERIPH setting. When set faster than PRCM_DOMAIN_PERIPH setting the PRCM_DOMAIN_PERIPH will be used.

The PRCM_DOMAIN_CPU can only run with 48 or 24 MHz. The only two valid clock division factors are therefore 1 and 2 and it is always sourced from the HF source.

The PRCM_DOMAIN_SERIAL clock can run independently of the PRCM_DOMAIN_SYSBUS clock. This function can be used to setup the clock divison factor but this is only valid when the PRCM_DOMAIN_SYSBUS clock is disabled. When the PRCM_DOMAIN_SYSBUS clock is enabled, the clock division ratio for this clock will follow the PRCM_DOMAIN_SYSBUS clock.

The PRCM_DOMAIN_SERIAL clock sets the serial interface clock for SSI and UART. The clock source is the MCU domain root clock. The PRCM_DOMAIN_SERIAL clock is the only asynchronous clock in the MCU Voltage domain and is configured independently from all other clocks. It is the programmers responsibility to ensure that the PRCM_DOMAIN_SERIAL clock frequency setting is slower than 5/3 of the PRCM_DOMAIN_SYSBUS clock for UART operation and less than or equal to the PRCM_DOMAIN_SYSBUS clock for SSI operation. If both modules are active the lowest value of the two must be selected.

Note
  Not all sub-systems support all division factors. Please ensure that a given clock domain will support the chosen division factor before trying to configure it.

Parameters

  ui32Domains | defines the clock domains to configure the clock on. The 5 clock domains are: PRCM_DOMAIN_SYSBUS PRCM_DOMAIN_CPU PRCM_DOMAIN_PERIPH PRCM_DOMAIN_SERIAL PRCM_DOMAIN_TIMER
  ui32ClkDiv | is the division factor to configure. The argument must be only one of the following values: PRCM_CLOCK_DIV_1 PRCM_CLOCK_DIV_2 PRCM_CLOCK_DIV_4 PRCM_CLOCK_DIV_8 PRCM_CLOCK_DIV_16 PRCM_CLOCK_DIV_32 PRCM_CLOCK_DIV_64 PRCM_CLOCK_DIV_128 PRCM_CLOCK_DIV_256

Returns
  None

Setup the clock division factor for a subsystem in the MCU voltage domain.

Definition at line 276 of file prcm.c.

Referenced by SysCtrlPowerEverything().

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.

Returns
  None

See also
  PRCMPeripheralDeepSleepEnable()

Definition at line 775 of file prcm.c.

Referenced by PowerCtrlStateSet().

__STATIC_INLINE void PRCMDomainDisable | ( | uint32_t | ui32Domains | ) |

Disable clock domains in the MCU voltage domain.

Note
  A call to this function will only setup the shadow registers in the MCU domain for the PRCM module. For the changes to propagate to the system controller in the AON domain a call to this function should always be followed by a call to PRCMLoadSet().
  Clocks will only be running if the domain is powered.

Parameters

  ui32Domains | is a bitmask containing the clock domains to disable. The independent clock domains inside the MCU voltage domain are: PRCM_DOMAIN_RFCORE PRCM_DOMAIN_VIMS

Returns
  None

See also
  PRCMDomainEnable()

Definition at line 681 of file prcm.h.

__STATIC_INLINE void PRCMDomainEnable | ( | uint32_t | ui32Domains | ) |

Enable clock domains in the MCU voltage domain.

Note
  A call to this function will only setup the shadow registers in the MCU domain for the PRCM module. For the changes to propagate to the system controller in the AON domain a call to this function should always be followed by a call to PRCMLoadSet().
  Clocks will only be running if the domain is powered.

Parameters

  ui32Domains | is a bitmask containing the clock domains to enable. The independent clock domains inside the MCU voltage domain which can be configured are: PRCM_DOMAIN_RFCORE PRCM_DOMAIN_VIMS

Returns
  None

Definition at line 638 of file prcm.h.

Referenced by SysCtrlPowerEverything().

uint32_t PRCMInfClockConfigureGet | ( | uint32_t | ui32PowerMode | ) |

Use this function to retreive the set infrastructure clock configuration.

Parameters

  ui32PowerMode | determines which Cortex M3 power mode to return the infrastructure clock divison ratio for. The three allowed power modes are: PRCM_RUN_MODE PRCM_SLEEP_MODE PRCM_DEEP_SLEEP_MODE

Returns
  Returns the infrastructure clock divison factor for the specified power mode.
  - PRCM_CLOCK_DIV_1
  - PRCM_CLOCK_DIV_2
  - PRCM_CLOCK_DIV_8
  - PRCM_CLOCK_DIV_32

See also
  PRCMInfClockConfigureSet().

Definition at line 212 of file prcm.c.

void PRCMInfClockConfigureSet | ( | uint32_t | ui32ClkDiv,
|  | uint32_t | ui32PowerMode
| ) |  |

Configure the infrastructure clock.

Each CM3 power mode has its own infrastructure clock divison factor. This function can be used for setting up the division factor for the infrastructure clock in the available power modes for the CM3. 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.

Note
  If source clock is 48 MHz, minimum clock divider is PRCM_CLOCK_DIV_2.

Parameters

  ui32ClkDiv | determines the division ratio for the infrastructure clock when the device is in the specified mode. Allowed division factors for all three Cortex M3 power modes are: PRCM_CLOCK_DIV_1 PRCM_CLOCK_DIV_2 PRCM_CLOCK_DIV_8 PRCM_CLOCK_DIV_32
  ui32PowerMode | determines the Cortex M3 operation mode for which to modify the clock divison factor. The three allowed power modes are: PRCM_RUN_MODE PRCM_SLEEP_MODE PRCM_DEEP_SLEEP_MODE

Returns
  None

Definition at line 152 of file prcm.c.

__STATIC_INLINE bool PRCMLoadGet | ( | void |  | ) |

Check if any of the load sensitive register has been updated.

Returns
  Returns status of the load sensitive register:
  - `true` : No registers have changed since the last load.
  - `false` : Any register has changed.

See also
  PRCMLoadSet()

Definition at line 608 of file prcm.h.

Referenced by SysCtrlPowerEverything().

__STATIC_INLINE void PRCMLoadSet | ( | void |  | ) |

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:

- PRCMAudioClockConfigSet()
- PRCMAudioClockConfigSetOverride()
- PRCMAudioClockEnable()
- PRCMAudioClockDisable()
- PRCMClockConfigureSet()
- PRCMDomainEnable()
- PRCMDomainDisable()
- PRCMPeripheralRunEnable()
- PRCMPeripheralRunEnable()
- PRCMPeripheralSleepEnable()
- PRCMPeripheralSleepEnable()
- PRCMPeripheralDeepSleepEnable()
- PRCMPeripheralDeepSleepEnable()

Returns
  None

Definition at line 588 of file prcm.h.

Referenced by SysCtrlPowerEverything().

__STATIC_INLINE void PRCMMcuPowerOff | ( | void |  | ) |

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.

Returns
  None

See also
  PRCMDeepSleep(), PRCMMcuPowerOffCancel()

Definition at line 310 of file prcm.h.

Referenced by PowerCtrlStateSet().

__STATIC_INLINE void PRCMMcuPowerOffCancel | ( | void |  | ) |

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.

Returns
  None

See also
  PRCMDeepSleep(), PRCMMcuPowerOff()

Definition at line 332 of file prcm.h.

__STATIC_INLINE void PRCMMcuUldoConfigure | ( | uint32_t | ui32Enable | ) |

Assert or deassert 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 capacicty 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.

Note
  Asserting this bit has no effect until:
  1. FLASH has accepted to be powered down
  2. Deepsleep must be asserted

Returns
  None

See also
  PRCMDeepSleep()

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.

Note
  A call to this function will only setup the shadow registers in the MCU domain for the PRCM module. For the changes to propagate to the system controller in the AON domain a call to this function should always be followed by a call to PRCMLoadSet().

Parameters

  ui32Peripheral | is the peripheral to disable in deep-sleep mode. The parameter must be one of the following: PRCM_PERIPH_TIMER0 PRCM_PERIPH_TIMER1 PRCM_PERIPH_TIMER2 PRCM_PERIPH_TIMER3 PRCM_PERIPH_SSI0 PRCM_PERIPH_SSI1 PRCM_PERIPH_UART0 PRCM_PERIPH_UART1 PRCM_PERIPH_I2C0 PRCM_PERIPH_I2C1 PRCM_PERIPH_CRYPTO PRCM_PERIPH_TRNG PRCM_PERIPH_UDMA PRCM_PERIPH_GPIO PRCM_PERIPH_I2S

Returns
  None

See also
  PRCMLoadSet()

Definition at line 708 of file prcm.c.

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.

Note
  A call to this function will only setup the shadow registers in the MCU domain for the PRCM module. For the changes to propagate to the system controller in the AON domain a call to this function should always be followed by a call to PRCMLoadSet().

Parameters

  ui32Peripheral | is the peripheral to enable in deep-sleep mode. The parameter must be one of the following: PRCM_PERIPH_TIMER0 PRCM_PERIPH_TIMER1 PRCM_PERIPH_TIMER2 PRCM_PERIPH_TIMER3 PRCM_PERIPH_SSI0 PRCM_PERIPH_SSI1 PRCM_PERIPH_UART0 PRCM_PERIPH_UART1 PRCM_PERIPH_I2C0 PRCM_PERIPH_I2C1 PRCM_PERIPH_CRYPTO PRCM_PERIPH_TRNG PRCM_PERIPH_UDMA PRCM_PERIPH_GPIO PRCM_PERIPH_I2S

Returns
  None

See also
  PRCMLoadSet()

Definition at line 688 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.

Note
  A call to this function will only setup the shadow registers in the MCU domain for the PRCM module. For the changes to propagate to the system controller in the AON domain a call to this function should always be followed by a call to PRCMLoadSet().
  The actual disabling of the peripheral may be delayed until some time after this function returns. Care should be taken by the user to ensure that the peripheral is not accessed in this interval as this might cause the system to hang.

Parameters

  ui32Peripheral | is the peripheral to disable. The parameter must be one of the following: PRCM_PERIPH_TIMER0 PRCM_PERIPH_TIMER1 PRCM_PERIPH_TIMER2 PRCM_PERIPH_TIMER3 PRCM_PERIPH_SSI0 PRCM_PERIPH_SSI1 PRCM_PERIPH_UART0 PRCM_PERIPH_UART1 PRCM_PERIPH_I2C0 PRCM_PERIPH_I2C1 PRCM_PERIPH_CRYPTO PRCM_PERIPH_TRNG PRCM_PERIPH_UDMA PRCM_PERIPH_GPIO PRCM_PERIPH_I2S

Returns
  None

See also
  PRCMLoadSet()

Definition at line 628 of file prcm.c.

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.

Note
  The actual enabling of the peripheral may be delayed until some time after this function returns. Care should be taken to ensure that the peripheral is not accessed until it is enabled. When enabling Timers always make sure that the division factor for the PERBUSCPUCLK is set. This will guarantee that the timers run at a continuous rate even if the SYSBUSCLK is gated.
  A call to this function will only setup the shadow registers in the MCU domain for the PRCM module. For the changes to propagate to the system controller in the AON domain a call to this function should always be followed by a call to PRCMLoadSet().

Parameters

  ui32Peripheral | is the peripheral to enable. The parameter must be one of the following: PRCM_PERIPH_TIMER0 PRCM_PERIPH_TIMER1 PRCM_PERIPH_TIMER2 PRCM_PERIPH_TIMER3 PRCM_PERIPH_SSI0 PRCM_PERIPH_SSI1 PRCM_PERIPH_UART0 PRCM_PERIPH_UART1 PRCM_PERIPH_I2C0 PRCM_PERIPH_I2C1 PRCM_PERIPH_CRYPTO PRCM_PERIPH_TRNG PRCM_PERIPH_UDMA PRCM_PERIPH_GPIO PRCM_PERIPH_I2S

Returns
  None

See also
  PRCMLoadSet()

Definition at line 608 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.

Note
  A call to this function will only setup the shadow registers in the MCU domain for the PRCM module. For the changes to propagate to the system controller in the AON domain a call to this function should always be followed by a call to PRCMLoadSet().

Parameters

  ui32Peripheral | is the peripheral to disable in sleep mode. The parameter must be one of the following: PRCM_PERIPH_TIMER0 PRCM_PERIPH_TIMER1 PRCM_PERIPH_TIMER2 PRCM_PERIPH_TIMER3 PRCM_PERIPH_SSI0 PRCM_PERIPH_SSI1 PRCM_PERIPH_UART0 PRCM_PERIPH_UART1 PRCM_PERIPH_I2C0 PRCM_PERIPH_I2C1 PRCM_PERIPH_CRYPTO PRCM_PERIPH_TRNG PRCM_PERIPH_UDMA PRCM_PERIPH_GPIO PRCM_PERIPH_I2S

Returns
  None

See also
  PRCMLoadSet()

Definition at line 668 of file prcm.c.

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.

Note
  A call to this function will only setup the shadow registers in the MCU domain for the PRCM module. For the changes to propagate to the system controller in the AON domain a call to this function should always be followed by a call to PRCMLoadSet().

Parameters

  ui32Peripheral | is the peripheral to enable in sleep mode. The parameter must be one of the following: PRCM_PERIPH_TIMER0 PRCM_PERIPH_TIMER1 PRCM_PERIPH_TIMER2 PRCM_PERIPH_TIMER3 PRCM_PERIPH_SSI0 PRCM_PERIPH_SSI1 PRCM_PERIPH_UART0 PRCM_PERIPH_UART1 PRCM_PERIPH_I2C0 PRCM_PERIPH_I2C1 PRCM_PERIPH_CRYPTO PRCM_PERIPH_TRNG PRCM_PERIPH_UDMA PRCM_PERIPH_GPIO PRCM_PERIPH_I2S

Returns
  None

See also
  PRCMLoadSet()

Definition at line 648 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.

Note
  For specifics regarding on/off configuration please see PRCMPowerDomainOn().

Parameters

  ui32Domains | determines which domain to request a power down for. The domains that can be turned on/off are: PRCM_DOMAIN_RFCORE : RF Core PRCM_DOMAIN_SERIAL : SSI0, UART0, I2C0 PRCM_DOMAIN_PERIPH : GPT0, GPT1, GPT2, GPT3, GPIO, SSI1, I2S, DMA, UART1, I2C1 PRCM_DOMAIN_VIMS : SRAM, FLASH, ROM PRCM_DOMAIN_SYSBUS PRCM_DOMAIN_CPU

Returns
  None

Definition at line 561 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.

- RF Core power domain:
  - Power On : Domain is on or in the process of turning on.
  - Power Off: Domain is powered down when CM3 is in deep sleep. The third option for the RF Core is to power down when the it is idle. This can be set using PRCMRfPowerDownWhenIdle()
- SERIAL power domain:
  - Power on : Domain is powered on.
  - Power off : Domain is powered off.
- PERIPHERIAL power domain:
  - Power on : Domain is powered on.
  - Power off : Domain is powered off.
- VIMS power domain:
  - Power On: Domain is powered if Bus domain is powered.
  - Power Off: Domain is only powered when CPU domain is on.
- BUS power domain:
  - Power On: Domain is on.
  - Power Off: Domain is on if requested by RF Core or if CPU domian is on.
- CPU power domain:
  - Power On: Domain is on.
  - Power Off: Domain is powering down if Cortex M3 is idle. This will also initiate a power down of the SRAM and BUS power domains, unless RF Core is requesting them to be on.

Note
  After a call to this function the status of the power domain should be checked using either PRCMPowerDomainStatus(). Any write operation to a power domain which is still not operational can result in unexpected behaviour.

Parameters

  ui32Domains | determines which power domains to turn on. The domains that can be turned on/off are: PRCM_DOMAIN_RFCORE : RF Core PRCM_DOMAIN_SERIAL : SSI0, UART0, I2C0 PRCM_DOMAIN_PERIPH : GPT0, GPT1, GPT2, GPT3, GPIO, SSI1, I2S, DMA, UART1, I2C1 PRCM_DOMAIN_VIMS : SRAM, FLASH, ROM PRCM_DOMAIN_SYSBUS PRCM_DOMAIN_CPU

Returns
  None

Definition at line 514 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.

Parameters

  ui32Domains | determines which domain to get the power status for. The parameter must be an OR'ed combination of one or several of: PRCM_DOMAIN_RFCORE : RF Core. PRCM_DOMAIN_SERIAL : SSI0, UART0, I2C0 PRCM_DOMAIN_PERIPH : GPT0, GPT1, GPT2, GPT3, GPIO, SSI1, I2S, DMA, UART1, I2C1

Returns
  Returns status of the requested domains:
  - PRCM_DOMAIN_POWER_ON : The specified domains are all powered up. This status is unconditional and the powered up status is guaranteed.
  - PRCM_DOMAIN_POWER_OFF : Any of the domains are powered down.

Definition at line 728 of file prcm.c.

Referenced by SysCtrlPowerEverything().

void PRCMRetentionDisable | ( | uint32_t | ui32PowerDomain | ) |

Disable retention on power domains.

Determines if a power domain should have retention disabled.

Parameters

  ui32PowerDomain | is a bit maks of the domains in question. The parameter must be a bitwise OR'ed value of: PRCM_DOMAIN_PERIPH PRCM_DOMAIN_CPU PRCM_DOMAIN_VIMS PRCM_DOMAIN_RFCORE

Returns
  None

Definition at line 864 of file prcm.c.

void PRCMRetentionEnable | ( | uint32_t | ui32PowerDomain | ) |

Enable retention on specific power domains.

Determines if power domain should have retention enabled.

Parameters

  ui32PowerDomain | is a bit mask of the domains in question. The parameter must be a bitwise OR'ed value of: PRCM_DOMAIN_PERIPH PRCM_DOMAIN_CPU PRCM_DOMAIN_VIMS PRCM_DOMAIN_RFCORE

Returns
  None

Definition at line 799 of file prcm.c.

__STATIC_INLINE void PRCMRfPowerDownWhenIdle | ( | void |  | ) |

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.

Returns
  None

Definition at line 791 of file prcm.h.

__STATIC_INLINE bool PRCMRfReady | ( | void |  | ) |

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.

Returns
  Returns access status of the RF Core.
  - `true` : RF Core can be accessed.
  - `false` : RF Core domain is not ready for access.

Definition at line 1085 of file prcm.h.

__STATIC_INLINE void PRCMSleep | ( | void |  | ) |

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.

Returns
  None

See also
  PRCMPeripheralSleepEnable()

Definition at line 1135 of file prcm.h.

__STATIC_INLINE bool PRCMWdtResetStatus | ( | void |  | ) |

Read reset status for WatchDog Timer.

WDT reset is the only reset status available through the PRCM module. This function can be used to check whether or not a WDT reset has occured since last time this bit was cleared.

Note
  This function will automatically clear the WDT reset status bit if asserted. If the reset bit is not asserted then nothing happens.

Returns
  Returns reset status of Watchdog Timer.
  - `true` : A WDT reset occured since last time the bit was cleared.
  - `false` : A WDT reset has not occured since last clear.

Definition at line 1111 of file prcm.h.

## Macro Definition Documentation

#define I2S_SAMPLE_RATE_16K 0x00000001

Definition at line 173 of file prcm.h.

Referenced by PRCMAudioClockConfigSet().

#define I2S_SAMPLE_RATE_24K 0x00000002

Definition at line 174 of file prcm.h.

Referenced by PRCMAudioClockConfigSet().

#define I2S_SAMPLE_RATE_32K 0x00000004

Definition at line 175 of file prcm.h.

Referenced by PRCMAudioClockConfigSet().

#define I2S_SAMPLE_RATE_48K 0x00000008

Definition at line 176 of file prcm.h.

Referenced by PRCMAudioClockConfigSet().

#define PRCM_CLOCK_DIV_1 0x0000000

Definition at line 122 of file prcm.h.

Referenced by PRCMClockConfigureSet(), PRCMInfClockConfigureGet(), PRCMInfClockConfigureSet(), and SysCtrlPowerEverything().

#define PRCM_CLOCK_DIV_128 0x0000007

Definition at line 129 of file prcm.h.

Referenced by PRCMClockConfigureSet().

#define PRCM_CLOCK_DIV_16 0x0000004

Definition at line 126 of file prcm.h.

Referenced by PRCMClockConfigureSet().

#define PRCM_CLOCK_DIV_2 0x0000001

Definition at line 123 of file prcm.h.

Referenced by PRCMClockConfigureSet(), PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().

#define PRCM_CLOCK_DIV_256 0x0000008

Definition at line 130 of file prcm.h.

Referenced by PRCMClockConfigureSet().

#define PRCM_CLOCK_DIV_32 0x0000005

Definition at line 127 of file prcm.h.

Referenced by PRCMClockConfigureSet(), PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().

#define PRCM_CLOCK_DIV_4 0x0000002

Definition at line 124 of file prcm.h.

Referenced by PRCMClockConfigureSet().

#define PRCM_CLOCK_DIV_64 0x0000006

Definition at line 128 of file prcm.h.

Referenced by PRCMClockConfigureSet().

#define PRCM_CLOCK_DIV_8 0x0000003

Definition at line 125 of file prcm.h.

Referenced by PRCMClockConfigureSet(), PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().

#define PRCM_DEEP_SLEEP_MODE 0x00000004

Definition at line 115 of file prcm.h.

Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().

#define PRCM_DOMAIN_CLKCTRL 0x00000080

Definition at line 152 of file prcm.h.

#define PRCM_DOMAIN_CPU 0x00000020

Definition at line 148 of file prcm.h.

Referenced by PowerCtrlStateSet(), PRCMClockConfigureGet(), PRCMClockConfigureSet(), PRCMPowerDomainOff(), PRCMPowerDomainOn(), PRCMRetentionDisable(), PRCMRetentionEnable(), and SysCtrlPowerEverything().

#define PRCM_DOMAIN_MCU 0x00000100

Definition at line 154 of file prcm.h.

#define PRCM_DOMAIN_PERIPH 0x00000004

Definition at line 142 of file prcm.h.

Referenced by PowerCtrlStateSet(), PRCMClockConfigureGet(), PRCMClockConfigureSet(), PRCMPowerDomainOff(), PRCMPowerDomainOn(), PRCMPowerDomainStatus(), PRCMRetentionDisable(), PRCMRetentionEnable(), SysCtrlPeripheralClockGet(), and SysCtrlPowerEverything().

#define PRCM_DOMAIN_POWER_DOWN_READY 0x00000000

Definition at line 158 of file prcm.h.

#define PRCM_DOMAIN_POWER_OFF 0x00000002

Definition at line 156 of file prcm.h.

Referenced by PRCMPowerDomainStatus().

#define PRCM_DOMAIN_POWER_ON 0x00000001

Definition at line 157 of file prcm.h.

Referenced by PRCMPowerDomainStatus(), and SysCtrlPowerEverything().

#define PRCM_DOMAIN_RFCORE 0x00000001

Definition at line 138 of file prcm.h.

Referenced by PowerCtrlStateSet(), PRCMDomainDisable(), PRCMDomainEnable(), PRCMPowerDomainOff(), PRCMPowerDomainOn(), PRCMPowerDomainStatus(), PRCMRetentionDisable(), PRCMRetentionEnable(), and SysCtrlPowerEverything().

#define PRCM_DOMAIN_SERIAL 0x00000002

Definition at line 140 of file prcm.h.

Referenced by PowerCtrlStateSet(), PRCMClockConfigureGet(), PRCMClockConfigureSet(), PRCMPowerDomainOff(), PRCMPowerDomainOn(), PRCMPowerDomainStatus(), SysCtrlPeripheralClockGet(), and SysCtrlPowerEverything().

#define PRCM_DOMAIN_SYSBUS 0x00000008

Definition at line 144 of file prcm.h.

Referenced by PRCMClockConfigureGet(), PRCMClockConfigureSet(), SysCtrlPeripheralClockGet(), and SysCtrlPowerEverything().

#define PRCM_DOMAIN_TIMER 0x00000040

Definition at line 150 of file prcm.h.

Referenced by PRCMClockConfigureGet(), PRCMClockConfigureSet(), SysCtrlPeripheralClockGet(), and SysCtrlPowerEverything().

#define PRCM_DOMAIN_VIMS 0x00000010

Definition at line 146 of file prcm.h.

Referenced by PowerCtrlStateSet(), PRCMDomainDisable(), PRCMDomainEnable(), PRCMPowerDomainOff(), PRCMPowerDomainOn(), PRCMRetentionDisable(), PRCMRetentionEnable(), and SysCtrlPowerEverything().

#define PRCM_PERIPH_CRYPTO 0x00000400

Definition at line 194 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_GPIO 0x00000500

Definition at line 197 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_I2C0 0x00000300

Definition at line 192 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_I2C1 0x00000301

Definition at line 193 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_I2S 0x00000600

Definition at line 198 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_SSI0 0x00000100

Definition at line 188 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_SSI1 0x00000101

Definition at line 189 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_TIMER0 0x00000000

Definition at line 184 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_TIMER1 0x00000001

Definition at line 185 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_TIMER2 0x00000002

Definition at line 186 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_TIMER3 0x00000003

Definition at line 187 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_TRNG 0x00000401

Definition at line 195 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_UART0 0x00000200

Definition at line 190 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_UART1 0x00000201

Definition at line 191 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_PERIPH_UDMA 0x00000408

Definition at line 196 of file prcm.h.

Referenced by SysCtrlPeripheralClockGet().

#define PRCM_RUN_MODE 0x00000001

Definition at line 113 of file prcm.h.

Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().

#define PRCM_SLEEP_MODE 0x00000002

Definition at line 114 of file prcm.h.

Referenced by PRCMInfClockConfigureGet(), and PRCMInfClockConfigureSet().

#define PRCM_WCLK_DUAL_PHASE 0x00000002

Definition at line 170 of file prcm.h.

#define PRCM_WCLK_NEG_EDGE 0x00000008

Definition at line 167 of file prcm.h.

#define PRCM_WCLK_POS_EDGE 0x00000000

Definition at line 168 of file prcm.h.

#define PRCM_WCLK_SINGLE_PHASE 0x00000000

Definition at line 169 of file prcm.h.

Referenced by PRCMAudioClockConfigSet(), and PRCMAudioClockConfigSetOverride().

#define PRCM_WCLK_USER_DEF 0x00000004

Definition at line 171 of file prcm.h.