CC26xx Driver Library
[prcm.h] 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 get the infrastructure clock configuration. 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...
 

Detailed Description

Function Documentation

void PRCMAudioClockConfigOverride ( uint8_t  ui8SamplingEdge,
uint8_t  ui8WCLKPhase,
uint32_t  ui32MstDiv,
uint32_t  ui32BitDiv,
uint32_t  ui32WordDiv 
)

Configure the audio clocks for I2S module.

Note
See hardware documentation before setting audio clock dividers. This is user's responsability to provide valid clock dividers.
Parameters
ui8SamplingEdgeDefine the clock polarity:
ui8WCLKPhaseDefine I2S phase used
  • PRCM_I2S_WCLK_SINGLE_PHASE
  • PRCM_I2S_WCLK_DUAL_PHASE
  • PRCM_I2S_WCLK_USER_DEF
ui32MstDivis the desired master clock divider.
ui32BitDivis the desired bit clock divider.
ui32WordDivis the desired word clock divider.
Returns
None
368 {
369  // Check the arguments.
370  ASSERT( ui8BitsPerSample == PRCM_WCLK_SINGLE_PHASE
371  || ui8BitsPerSample == PRCM_WCLK_DUAL_PHASE
372  || ui8BitsPerSample == PRCM_WCLK_USER_DEF);
373 
374  // Make sure the audio clock generation is disabled before reconfiguring.
376 
377  // Make sure to compensate the Frame clock division factor if using single
378  // phase format.
379  if((ui8WCLKPhase) == PRCM_WCLK_SINGLE_PHASE)
380  {
381  ui32WordDiv -= 1;
382  }
383 
384  // Write the clock division factors.
385  HWREG(PRCM_BASE + PRCM_O_I2SMCLKDIV) = ui32MstDiv;
386  HWREG(PRCM_BASE + PRCM_O_I2SBCLKDIV) = ui32BitDiv;
387  HWREG(PRCM_BASE + PRCM_O_I2SWCLKDIV) = ui32WordDiv;
388 
389  // Configure the Word clock format and polarity and enable it.
390  HWREG(PRCM_BASE + PRCM_O_I2SCLKCTL) = (ui8SamplingEdge << PRCM_I2SCLKCTL_SMPL_ON_POSEDGE_S) |
391  (ui8WCLKPhase << PRCM_I2SCLKCTL_WCLK_PHASE_S ) |
392  (1 << PRCM_I2SCLKCTL_EN_S );
393 }
#define PRCM_WCLK_DUAL_PHASE
Definition: prcm.h:173
#define PRCM_WCLK_USER_DEF
Definition: prcm.h:174
#define PRCM_WCLK_SINGLE_PHASE
Definition: prcm.h:172
#define ASSERT(expr)
Definition: debug.h:73
static void PRCMAudioClockDisable(void)
Disable the audio clock generation.
Definition: prcm.h:429

Here is the call graph for this function:

void PRCMAudioClockConfigSet ( uint32_t  ui32ClkConfig,
uint32_t  ui32SampleRate 
)

Configure the audio clock generation.

Deprecated:
This function will be removed in a future release.

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.
Parameters
ui32ClkConfigis the audio clock configuration. The parameter is a bitwise OR'ed value consisting of:
ui32SampleRateis the desired audio clock sample rate. The supported sample rate configurations are:
Returns
None
See also
PRCMAudioClockConfigSetOverride()
259 {
260  uint32_t ui32Reg;
261  uint32_t ui32MstDiv;
262  uint32_t ui32BitDiv;
263  uint32_t ui32WordDiv;
264 
265  // Check the arguments.
267  ASSERT((ui32SampleRate == I2S_SAMPLE_RATE_16K) ||
268  (ui32SampleRate == I2S_SAMPLE_RATE_24K) ||
269  (ui32SampleRate == I2S_SAMPLE_RATE_32K) ||
270  (ui32SampleRate == I2S_SAMPLE_RATE_48K));
271 
272  ui32MstDiv = 0;
273  ui32BitDiv = 0;
274  ui32WordDiv = 0;
275 
276  // Make sure the audio clock generation is disabled before reconfiguring.
278 
279  // Define the clock division factors for the audio interface.
280  switch(ui32SampleRate)
281  {
282  case I2S_SAMPLE_RATE_16K :
283  ui32MstDiv = 6;
284  ui32BitDiv = 60;
285  ui32WordDiv = 25;
286  break;
287  case I2S_SAMPLE_RATE_24K :
288  ui32MstDiv = 4;
289  ui32BitDiv = 40;
290  ui32WordDiv = 25;
291  break;
292  case I2S_SAMPLE_RATE_32K :
293  ui32MstDiv = 3;
294  ui32BitDiv = 30;
295  ui32WordDiv = 25;
296  break;
297  case I2S_SAMPLE_RATE_48K :
298  ui32MstDiv = 2;
299  ui32BitDiv = 20;
300  ui32WordDiv = 25;
301  break;
302  }
303 
304  // Make sure to compensate the Frame clock division factor if using single
305  // phase format.
306  if((ui32ClkConfig & PRCM_I2SCLKCTL_WCLK_PHASE_M) == PRCM_WCLK_SINGLE_PHASE)
307  {
308  ui32WordDiv -= 1;
309  }
310 
311  // Write the clock division factors.
312  HWREG(PRCM_BASE + PRCM_O_I2SMCLKDIV) = ui32MstDiv;
313  HWREG(PRCM_BASE + PRCM_O_I2SBCLKDIV) = ui32BitDiv;
314  HWREG(PRCM_BASE + PRCM_O_I2SWCLKDIV) = ui32WordDiv;
315 
316  // Configure the Word clock format and polarity.
319  HWREG(PRCM_BASE + PRCM_O_I2SCLKCTL) = ui32Reg | ui32ClkConfig;
320 }
#define I2S_SAMPLE_RATE_48K
Definition: prcm.h:184
#define I2S_SAMPLE_RATE_16K
Definition: prcm.h:181
#define I2S_SAMPLE_RATE_24K
Definition: prcm.h:182
#define PRCM_WCLK_SINGLE_PHASE
Definition: prcm.h:172
#define I2S_SAMPLE_RATE_32K
Definition: prcm.h:183
#define ASSERT(expr)
Definition: debug.h:73
static void PRCMAudioClockDisable(void)
Disable the audio clock generation.
Definition: prcm.h:429

Here is the call graph for this function:

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.

Deprecated:
This function will be removed in a future release.

Use this function to set the audio clock divider values manually.

Note
See hardware documentation before setting audio clock dividers manually.
Parameters
ui32ClkConfigis the audio clock configuration. The parameter is a bitwise OR'ed value consisting of:
ui32MstDivis the desired master clock divider.
ui32WordDivis the desired word clock divider.
ui32BitDivis the desired bit clock divider.
Returns
None
See also
PRCMAudioClockConfigSet()
330 {
331  uint32_t ui32Reg;
332 
333  // Check the arguments.
335 
336  // Make sure the audio clock generation is disabled before reconfiguring.
338 
339  // Make sure to compensate the Frame clock division factor if using single
340  // phase format.
341  if((ui32ClkConfig & PRCM_I2SCLKCTL_WCLK_PHASE_M) == PRCM_WCLK_SINGLE_PHASE)
342  {
343  ui32WordDiv -= 1;
344  }
345 
346  // Write the clock division factors.
347  HWREG(PRCM_BASE + PRCM_O_I2SMCLKDIV) = ui32MstDiv;
348  HWREG(PRCM_BASE + PRCM_O_I2SBCLKDIV) = ui32BitDiv;
349  HWREG(PRCM_BASE + PRCM_O_I2SWCLKDIV) = ui32WordDiv;
350 
351  // Configure the Word clock format and polarity.
354  HWREG(PRCM_BASE + PRCM_O_I2SCLKCTL) = ui32Reg | ui32ClkConfig;
355 }
#define PRCM_WCLK_SINGLE_PHASE
Definition: prcm.h:172
#define ASSERT(expr)
Definition: debug.h:73
static void PRCMAudioClockDisable(void)
Disable the audio clock generation.
Definition: prcm.h:429

Here is the call graph for this function:

static void PRCMAudioClockDisable ( void  )
inlinestatic

Disable the audio clock generation.

Use this function to disable the audio clock generation.

Returns
None

Referenced by PRCMAudioClockConfigOverride(), PRCMAudioClockConfigSet(), and PRCMAudioClockConfigSetOverride().

430 {
431  // Disable the audio clock generation
433 }
static void PRCMAudioClockEnable ( void  )
inlinestatic

Enable the audio clock generation.

Use this function to enable the audio clock generation.

Returns
None
414 {
415  // Enable the audio clock generation.
417 }
void PRCMAudioClockExternalSource ( void  )

Configure the audio clocks to be externally generated.

Use this function to set the audio clocks as external.

Returns
None
See also
PRCMAudioClockInternalSource()
411 {
413 }
void PRCMAudioClockInternalSource ( void  )

Configure the audio clocks to be internally generated.

Use this function to set the audio clocks as internal.

Returns
None
See also
PRCMAudioClockExternalSource()
401 {
403 }
static void PRCMCacheRetentionDisable ( void  )
inlinestatic

Disable CACHE RAM retention.

Disables CACHE RAM retention on both VIMS_TRAM and VIMS_CRAM

Returns
None

Referenced by SysCtrlStandby().

1138 {
1140 }
static void PRCMCacheRetentionEnable ( void  )
inlinestatic

Enable CACHE RAM retention.

Enables CACHE RAM retention on both VIMS_TRAM and VIMS_CRAM

Returns
None

Referenced by SysCtrlIdle().

1123 {
1125 }
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()

Referenced by SysCtrlIdle(), and SysCtrlStandby().

638 {
639  // Enable deep-sleep.
640  HWREG(NVIC_SYS_CTRL) |= NVIC_SYS_CTRL_SLEEPDEEP;
641 
642  // Wait for an interrupt.
643  CPUwfi();
644 
645  // Disable deep-sleep so that a future sleep will work correctly.
646  HWREG(NVIC_SYS_CTRL) &= ~(NVIC_SYS_CTRL_SLEEPDEEP);
647 }
static void CPUwfi(void)
Wait for interrupt.
Definition: cpu.h:193

Here is the call graph for this function:

static void PRCMDomainDisable ( uint32_t  ui32Domains)
inlinestatic

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
ui32Domainsis a bit mask containing the clock domains to disable. The independent clock domains inside the MCU voltage domain are:
Returns
None
See also
PRCMDomainEnable()
673 {
674  // Check the arguments.
675  ASSERT((ui32Domains & PRCM_DOMAIN_RFCORE) ||
676  (ui32Domains & PRCM_DOMAIN_VIMS));
677 
678  // Disable the power domains.
679  if(ui32Domains & PRCM_DOMAIN_RFCORE)
680  {
681  HWREG(PRCM_BASE + PRCM_O_RFCCLKG) = 0x0;
682  }
683  if(ui32Domains & PRCM_DOMAIN_VIMS)
684  {
685  HWREG(PRCM_BASE + PRCM_O_VIMSCLKG) = 0x0;
686  }
687 }
#define PRCM_DOMAIN_VIMS
Definition: prcm.h:145
#define ASSERT(expr)
Definition: debug.h:73
#define PRCM_DOMAIN_RFCORE
Definition: prcm.h:137
static void PRCMDomainEnable ( uint32_t  ui32Domains)
inlinestatic

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
ui32Domainsis a bit mask containing the clock domains to enable. The independent clock domains inside the MCU voltage domain which can be configured are:
Returns
None
634 {
635  // Check the arguments.
636  ASSERT((ui32Domains & PRCM_DOMAIN_RFCORE) ||
637  (ui32Domains & PRCM_DOMAIN_VIMS));
638 
639  // Enable the clock domain(s).
640  if(ui32Domains & PRCM_DOMAIN_RFCORE)
641  {
643  }
644  if(ui32Domains & PRCM_DOMAIN_VIMS)
645  {
647  }
648 }
#define PRCM_DOMAIN_VIMS
Definition: prcm.h:145
#define ASSERT(expr)
Definition: debug.h:73
#define PRCM_DOMAIN_RFCORE
Definition: prcm.h:137
static uint32_t PRCMGPTimerClockDivisionGet ( void  )
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.

Returns
Returns one of the following values:
See also
PRCMGPTimerClockDivisionSet()
398 {
399  return ( HWREG( PRCM_BASE + PRCM_O_GPTCLKDIV ));
400 }
static void PRCMGPTimerClockDivisionSet ( uint32_t  clkDiv)
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.

Note
For change to take effect, PRCMLoadSet() needs to be called
Parameters
clkDivis the division factor to set. The argument must be only one of the following values:
Returns
None
See also
PRCMGPTimerClockDivisionGet()
370 {
371  ASSERT( clkDiv <= PRCM_GPTCLKDIV_RATIO_DIV256 );
372 
373  HWREG( PRCM_BASE + PRCM_O_GPTCLKDIV ) = clkDiv;
374 }
#define ASSERT(expr)
Definition: debug.h:73
uint32_t PRCMInfClockConfigureGet ( uint32_t  ui32PowerMode)

Use this function to get the infrastructure clock configuration.

Parameters
ui32PowerModedetermines which System CPU power mode to return the infrastructure clock division ratio for. The three allowed power modes are:
Returns
Returns the infrastructure clock division factor for the specified power mode.
See also
PRCMInfClockConfigureSet().
203 {
204  uint32_t ui32ClkDiv;
205  uint32_t ui32Divisor;
206 
207  // Check the arguments.
208  ASSERT((ui32PowerMode == PRCM_RUN_MODE) ||
209  (ui32PowerMode == PRCM_SLEEP_MODE) ||
210  (ui32PowerMode == PRCM_DEEP_SLEEP_MODE));
211 
212  ui32ClkDiv = 0;
213  ui32Divisor = 0;
214 
215  // Determine the correct power mode.
216  if(ui32PowerMode == PRCM_RUN_MODE)
217  {
218  ui32ClkDiv = HWREG(PRCM_BASE + PRCM_O_INFRCLKDIVR);
219  }
220  else if(ui32PowerMode == PRCM_SLEEP_MODE)
221  {
222  ui32ClkDiv = HWREG(PRCM_BASE + PRCM_O_INFRCLKDIVS);
223  }
224  else if(ui32PowerMode == PRCM_DEEP_SLEEP_MODE)
225  {
226  ui32ClkDiv = HWREG(PRCM_BASE + PRCM_O_INFRCLKDIVDS);
227  }
228 
229  // Find the correct division factor.
230  if(ui32ClkDiv == 0x0)
231  {
232  ui32Divisor = PRCM_CLOCK_DIV_1;
233  }
234  else if(ui32ClkDiv == 0x1)
235  {
236  ui32Divisor = PRCM_CLOCK_DIV_2;
237  }
238  else if(ui32ClkDiv == 0x2)
239  {
240  ui32Divisor = PRCM_CLOCK_DIV_8;
241  }
242  else if(ui32ClkDiv == 0x3)
243  {
244  ui32Divisor = PRCM_CLOCK_DIV_32;
245  }
246 
247  // Return the clock division factor.
248  return ui32Divisor;
249 }
#define PRCM_DEEP_SLEEP_MODE
Definition: prcm.h:114
#define PRCM_CLOCK_DIV_8
Definition: prcm.h:124
#define PRCM_CLOCK_DIV_32
Definition: prcm.h:126
#define ASSERT(expr)
Definition: debug.h:73
#define PRCM_SLEEP_MODE
Definition: prcm.h:113
#define PRCM_CLOCK_DIV_1
Definition: prcm.h:121
#define PRCM_CLOCK_DIV_2
Definition: prcm.h:122
#define PRCM_RUN_MODE
Definition: prcm.h:112
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.

Note
If source clock is 48 MHz, minimum clock divider is PRCM_CLOCK_DIV_2.
Parameters
ui32ClkDivdetermines 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:
ui32PowerModedetermines the System CPU operation mode for which to modify the clock division factor. The three allowed power modes are:
Returns
None
149 {
150  uint32_t ui32Divisor;
151 
152  // Check the arguments.
153  ASSERT((ui32ClkDiv == PRCM_CLOCK_DIV_1) ||
154  (ui32ClkDiv == PRCM_CLOCK_DIV_2) ||
155  (ui32ClkDiv == PRCM_CLOCK_DIV_8) ||
156  (ui32ClkDiv == PRCM_CLOCK_DIV_32));
157  ASSERT((ui32PowerMode == PRCM_RUN_MODE) ||
158  (ui32PowerMode == PRCM_SLEEP_MODE) ||
159  (ui32PowerMode == PRCM_DEEP_SLEEP_MODE));
160 
161  ui32Divisor = 0;
162 
163  // Find the correct division factor.
164  if(ui32ClkDiv == PRCM_CLOCK_DIV_1)
165  {
166  ui32Divisor = 0x0;
167  }
168  else if(ui32ClkDiv == PRCM_CLOCK_DIV_2)
169  {
170  ui32Divisor = 0x1;
171  }
172  else if(ui32ClkDiv == PRCM_CLOCK_DIV_8)
173  {
174  ui32Divisor = 0x2;
175  }
176  else if(ui32ClkDiv == PRCM_CLOCK_DIV_32)
177  {
178  ui32Divisor = 0x3;
179  }
180 
181  // Determine the correct power mode set the division factor accordingly.
182  if(ui32PowerMode == PRCM_RUN_MODE)
183  {
184  HWREG(PRCM_BASE + PRCM_O_INFRCLKDIVR) = ui32Divisor;
185  }
186  else if(ui32PowerMode == PRCM_SLEEP_MODE)
187  {
188  HWREG(PRCM_BASE + PRCM_O_INFRCLKDIVS) = ui32Divisor;
189  }
190  else if(ui32PowerMode == PRCM_DEEP_SLEEP_MODE)
191  {
192  HWREG(PRCM_BASE + PRCM_O_INFRCLKDIVDS) = ui32Divisor;
193  }
194 }
#define PRCM_DEEP_SLEEP_MODE
Definition: prcm.h:114
#define PRCM_CLOCK_DIV_8
Definition: prcm.h:124
#define PRCM_CLOCK_DIV_32
Definition: prcm.h:126
#define ASSERT(expr)
Definition: debug.h:73
#define PRCM_SLEEP_MODE
Definition: prcm.h:113
#define PRCM_CLOCK_DIV_1
Definition: prcm.h:121
#define PRCM_CLOCK_DIV_2
Definition: prcm.h:122
#define PRCM_RUN_MODE
Definition: prcm.h:112
static bool PRCMLoadGet ( void  )
inlinestatic

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()

Referenced by SysCtrlStandby().

606 {
607  // Return the load status.
609  true : false);
610 }
static void PRCMLoadSet ( void  )
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:

Returns
None
See also
PRCMLoadGet()

Referenced by SysCtrlStandby().

588 {
589  // Enable the update of all load related registers.
590  HWREG(PRCM_NONBUF_BASE + PRCM_O_CLKLOADCTL) = PRCM_CLKLOADCTL_LOAD;
591 }
static void PRCMMcuUldoConfigure ( uint32_t  ui32Enable)
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.

Note
Asserting this bit has no effect until:
  1. FLASH has accepted to be powered down
  2. Deepsleep must be asserted
Parameters
ui32Enable
  • 0 : Disable uLDO request
  • 1 : Enable uLDO request
Returns
None
See also
PRCMDeepSleep()

Referenced by PowerCtrlSourceSet(), and SysCtrlStandby().

332 {
333  // Enable or disable the uLDO request signal.
334  HWREGBITW(PRCM_BASE + PRCM_O_VDCTL, PRCM_VDCTL_ULDO_BITN) = ui32Enable;
335 }
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
ui32Peripheralis the peripheral to disable in deep-sleep mode. The parameter must be one of the following:
Returns
None
See also
PRCMLoadSet()

Referenced by SysCtrlStandby().

581 {
582  // Check the arguments.
583  ASSERT(PRCMPeripheralValid(ui32Peripheral));
584 
585  // Disable this peripheral in Deep Sleep mode.
586  HWREG(PRCM_BASE + g_pui32DCGCRegs[PRCM_PERIPH_INDEX(ui32Peripheral)]) &=
587  ~PRCM_PERIPH_MASKBIT(ui32Peripheral);
588 }
static const uint32_t g_pui32DCGCRegs[]
Definition: prcm.c:116
#define PRCM_PERIPH_MASKBIT(a)
Definition: prcm.c:139
#define ASSERT(expr)
Definition: debug.h:73
#define PRCM_PERIPH_INDEX(a)
Definition: prcm.c:132
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
ui32Peripheralis the peripheral to enable in deep-sleep mode. The parameter must be one of the following:
Returns
None
See also
PRCMLoadSet()
565 {
566  // Check the arguments.
567  ASSERT(PRCMPeripheralValid(ui32Peripheral));
568 
569  // Enable this peripheral in deep-sleep mode.
570  HWREG(PRCM_BASE + g_pui32DCGCRegs[PRCM_PERIPH_INDEX(ui32Peripheral)]) |=
571  PRCM_PERIPH_MASKBIT(ui32Peripheral);
572 }
static const uint32_t g_pui32DCGCRegs[]
Definition: prcm.c:116
#define PRCM_PERIPH_MASKBIT(a)
Definition: prcm.c:139
#define ASSERT(expr)
Definition: debug.h:73
#define PRCM_PERIPH_INDEX(a)
Definition: prcm.c:132
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.

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
ui32Peripheralis the peripheral to disable. The parameter must be one of the following:
Returns
None
See also
PRCMLoadSet()
517 {
518  // Check the arguments.
519  ASSERT(PRCMPeripheralValid(ui32Peripheral));
520 
521  // Disable module in Run Mode.
522  HWREG(PRCM_BASE + g_pui32RCGCRegs[PRCM_PERIPH_INDEX(ui32Peripheral)]) &=
523  ~PRCM_PERIPH_MASKBIT(ui32Peripheral);
524 }
static const uint32_t g_pui32RCGCRegs[]
Definition: prcm.c:92
#define PRCM_PERIPH_MASKBIT(a)
Definition: prcm.c:139
#define ASSERT(expr)
Definition: debug.h:73
#define PRCM_PERIPH_INDEX(a)
Definition: prcm.c:132
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
ui32Peripheralis the peripheral to enable. The parameter must be one of the following:
Returns
None
See also
PRCMLoadSet()
501 {
502  // Check the arguments.
503  ASSERT(PRCMPeripheralValid(ui32Peripheral));
504 
505  // Enable module in Run Mode.
506  HWREG(PRCM_BASE + g_pui32RCGCRegs[PRCM_PERIPH_INDEX(ui32Peripheral)]) |=
507  PRCM_PERIPH_MASKBIT(ui32Peripheral);
508 }
static const uint32_t g_pui32RCGCRegs[]
Definition: prcm.c:92
#define PRCM_PERIPH_MASKBIT(a)
Definition: prcm.c:139
#define ASSERT(expr)
Definition: debug.h:73
#define PRCM_PERIPH_INDEX(a)
Definition: prcm.c:132
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
ui32Peripheralis the peripheral to disable in sleep mode. The parameter must be one of the following:
Returns
None
See also
PRCMLoadSet()
549 {
550  // Check the arguments.
551  ASSERT(PRCMPeripheralValid(ui32Peripheral));
552 
553  // Disable this peripheral in sleep mode
554  HWREG(PRCM_BASE + g_pui32SCGCRegs[PRCM_PERIPH_INDEX(ui32Peripheral)]) &=
555  ~PRCM_PERIPH_MASKBIT(ui32Peripheral);
556 }
#define PRCM_PERIPH_MASKBIT(a)
Definition: prcm.c:139
static const uint32_t g_pui32SCGCRegs[]
Definition: prcm.c:104
#define ASSERT(expr)
Definition: debug.h:73
#define PRCM_PERIPH_INDEX(a)
Definition: prcm.c:132
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
ui32Peripheralis the peripheral to enable in sleep mode. The parameter must be one of the following:
Returns
None
See also
PRCMLoadSet()
533 {
534  // Check the arguments.
535  ASSERT(PRCMPeripheralValid(ui32Peripheral));
536 
537  // Enable this peripheral in sleep mode.
538  HWREG(PRCM_BASE + g_pui32SCGCRegs[PRCM_PERIPH_INDEX(ui32Peripheral)]) |=
539  PRCM_PERIPH_MASKBIT(ui32Peripheral);
540 }
#define PRCM_PERIPH_MASKBIT(a)
Definition: prcm.c:139
static const uint32_t g_pui32SCGCRegs[]
Definition: prcm.c:104
#define ASSERT(expr)
Definition: debug.h:73
#define PRCM_PERIPH_INDEX(a)
Definition: prcm.c:132
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
ui32Domainsdetermines 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
  • PRCM_DOMAIN_VIMS : SRAM, FLASH, ROM
  • PRCM_DOMAIN_VIMS_OFF_NO_WAKEUP : SRAM, FLASH, ROM
  • PRCM_DOMAIN_SYSBUS
  • PRCM_DOMAIN_CPU
Returns
None

Referenced by SysCtrlIdle(), and SysCtrlStandby().

460 {
461  // Check the arguments.
462  ASSERT((ui32Domains & PRCM_DOMAIN_RFCORE) ||
463  (ui32Domains & PRCM_DOMAIN_SERIAL) ||
464  (ui32Domains & PRCM_DOMAIN_PERIPH) ||
465  (ui32Domains & PRCM_DOMAIN_CPU) ||
466  (ui32Domains & PRCM_DOMAIN_VIMS));
467 
468  // Assert the request to power off the right domains.
469  if(ui32Domains & PRCM_DOMAIN_RFCORE)
470  {
471  HWREG(PRCM_BASE + PRCM_O_PDCTL0RFC ) = 0;
472  }
473  if(ui32Domains & PRCM_DOMAIN_SERIAL)
474  {
475  HWREG(PRCM_BASE + PRCM_O_PDCTL0SERIAL) = 0;
476  }
477  if(ui32Domains & PRCM_DOMAIN_PERIPH)
478  {
479  HWREG(PRCM_BASE + PRCM_O_PDCTL0PERIPH) = 0;
480  }
481  if(ui32Domains & PRCM_DOMAIN_VIMS)
482  {
483  // Write bits ui32Domains[17:16] to the VIMS_MODE alias register.
484  // PRCM_DOMAIN_VIMS sets VIMS_MODE=0b00, PRCM_DOMAIN_VIMS_OFF_NO_WAKEUP sets VIMS_MODE=0b10.
485  ASSERT(!(ui32Domains & 0x00010000));
486  HWREG(PRCM_BASE + PRCM_O_PDCTL1VIMS ) = ( ui32Domains >> 16 ) & 3;
487  }
488  if(ui32Domains & PRCM_DOMAIN_CPU)
489  {
490  HWREG(PRCM_BASE + PRCM_O_PDCTL1CPU ) = 0;
491  }
492 }
#define PRCM_DOMAIN_VIMS
Definition: prcm.h:145
#define PRCM_DOMAIN_PERIPH
Definition: prcm.h:141
#define ASSERT(expr)
Definition: debug.h:73
#define PRCM_DOMAIN_SERIAL
Definition: prcm.h:139
#define PRCM_DOMAIN_RFCORE
Definition: prcm.h:137
#define PRCM_DOMAIN_CPU
Definition: prcm.h:151
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 System CPU 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 domain is on.
  • CPU power domain:
    • Power On : Domain is on.
    • Power Off : Domain is powering down if System CPU 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 behavior.
Parameters
ui32Domainsdetermines 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
  • PRCM_DOMAIN_VIMS : SRAM, FLASH, ROM
  • PRCM_DOMAIN_SYSBUS
  • PRCM_DOMAIN_CPU
Returns
None
422 {
423  // Check the arguments.
424  ASSERT((ui32Domains & PRCM_DOMAIN_RFCORE) ||
425  (ui32Domains & PRCM_DOMAIN_SERIAL) ||
426  (ui32Domains & PRCM_DOMAIN_PERIPH) ||
427  (ui32Domains & PRCM_DOMAIN_CPU) ||
428  (ui32Domains & PRCM_DOMAIN_VIMS));
429 
430  // Assert the request to power on the right domains.
431  if(ui32Domains & PRCM_DOMAIN_RFCORE)
432  {
433  HWREG(PRCM_BASE + PRCM_O_PDCTL0RFC ) = 1;
434  }
435  if(ui32Domains & PRCM_DOMAIN_SERIAL)
436  {
437  HWREG(PRCM_BASE + PRCM_O_PDCTL0SERIAL) = 1;
438  }
439  if(ui32Domains & PRCM_DOMAIN_PERIPH)
440  {
441  HWREG(PRCM_BASE + PRCM_O_PDCTL0PERIPH) = 1;
442  }
443  if(ui32Domains & PRCM_DOMAIN_VIMS)
444  {
445  HWREG(PRCM_BASE + PRCM_O_PDCTL1VIMS ) = 1;
446  }
447  if(ui32Domains & PRCM_DOMAIN_CPU)
448  {
449  HWREG(PRCM_BASE + PRCM_O_PDCTL1CPU ) = 1;
450  }
451 }
#define PRCM_DOMAIN_VIMS
Definition: prcm.h:145
#define PRCM_DOMAIN_PERIPH
Definition: prcm.h:141
#define ASSERT(expr)
Definition: debug.h:73
#define PRCM_DOMAIN_SERIAL
Definition: prcm.h:139
#define PRCM_DOMAIN_RFCORE
Definition: prcm.h:137
#define PRCM_DOMAIN_CPU
Definition: prcm.h:151
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
ui32Domainsdetermines which domain to get the power status for. The parameter must be an OR'ed combination of one or several of:
Returns
Returns status of the requested domains:

Referenced by SysCtrlStandby().

597 {
598  bool bStatus;
599  uint32_t ui32StatusRegister0;
600  uint32_t ui32StatusRegister1;
601 
602  // Check the arguments.
603  ASSERT((ui32Domains & (PRCM_DOMAIN_RFCORE |
606 
607  bStatus = true;
608  ui32StatusRegister0 = HWREG(PRCM_BASE + PRCM_O_PDSTAT0);
609  ui32StatusRegister1 = HWREG(PRCM_BASE + PRCM_O_PDSTAT1);
610 
611  // Return the correct power status.
612  if(ui32Domains & PRCM_DOMAIN_RFCORE)
613  {
614  bStatus = bStatus &&
615  ((ui32StatusRegister0 & PRCM_PDSTAT0_RFC_ON) ||
616  (ui32StatusRegister1 & PRCM_PDSTAT1_RFC_ON));
617  }
618  if(ui32Domains & PRCM_DOMAIN_SERIAL)
619  {
620  bStatus = bStatus && (ui32StatusRegister0 & PRCM_PDSTAT0_SERIAL_ON);
621  }
622  if(ui32Domains & PRCM_DOMAIN_PERIPH)
623  {
624  bStatus = bStatus && (ui32StatusRegister0 & PRCM_PDSTAT0_PERIPH_ON);
625  }
626 
627  // Return the status.
628  return (bStatus ? PRCM_DOMAIN_POWER_ON : PRCM_DOMAIN_POWER_OFF);
629 }
#define PRCM_DOMAIN_PERIPH
Definition: prcm.h:141
#define ASSERT(expr)
Definition: debug.h:73
#define PRCM_DOMAIN_POWER_ON
Definition: prcm.h:160
#define PRCM_DOMAIN_SERIAL
Definition: prcm.h:139
#define PRCM_DOMAIN_RFCORE
Definition: prcm.h:137
#define PRCM_DOMAIN_POWER_OFF
Definition: prcm.h:159
static void PRCMRfPowerDownWhenIdle ( void  )
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.

Returns
None
776 {
777  // Configure the RF power domain.
779 }
static bool PRCMRfReady ( void  )
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.

Returns
Returns access status of the RF Core.
  • true : RF Core can be accessed.
  • false : RF Core domain is not ready for access.
1068 {
1069  // Return the ready status of the RF Core.
1070  return ((HWREG(PRCM_BASE + PRCM_O_PDSTAT1RFC) &
1071  PRCM_PDSTAT1RFC_ON) ? true : false);
1072 }
static void PRCMSleep ( void  )
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.

Returns
None
See also
PRCMPeripheralSleepEnable()
1091 {
1092  // Wait for an interrupt.
1093  CPUwfi();
1094 }
static void CPUwfi(void)
Wait for interrupt.
Definition: cpu.h:193

Here is the call graph for this function:

Macro Definition Documentation

#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
#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
#define PRCM_CLOCK_DIV_256   PRCM_GPTCLKDIV_RATIO_DIV256
#define PRCM_CLOCK_DIV_32   PRCM_GPTCLKDIV_RATIO_DIV32
#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
#define PRCM_DEEP_SLEEP_MODE   0x00000004
#define PRCM_DOMAIN_CLKCTRL   0x00000080
#define PRCM_DOMAIN_CPU   0x00000020
#define PRCM_DOMAIN_MCU   0x00000100
#define PRCM_DOMAIN_PERIPH   0x00000004
#define PRCM_DOMAIN_POWER_DOWN_READY   0x00000000
#define PRCM_DOMAIN_POWER_OFF   0x00000002
#define PRCM_DOMAIN_POWER_ON   0x00000001

Referenced by PRCMPowerDomainStatus().

#define PRCM_DOMAIN_SERIAL   0x00000002
#define PRCM_DOMAIN_SYSBUS   0x00000008
#define PRCM_DOMAIN_TIMER   0x00000040
#define PRCM_DOMAIN_VIMS   0x00000010
#define PRCM_DOMAIN_VIMS_OFF_NO_WAKEUP   0x00020010
#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 ))

Referenced by SysCtrlStandby().

#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 ))

Referenced by SysCtrlStandby().

#define PRCM_PERIPH_PKA   ( 0x00000400 | ( PRCM_SECDMACLKGR_PKA_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_UART1   ( 0x00000200 | ( PRCM_UARTCLKGR_CLK_EN_S + 1 ))
#define PRCM_PERIPH_UDMA   ( 0x00000400 | ( PRCM_SECDMACLKGR_DMA_CLK_EN_S ))

Referenced by SysCtrlStandby().

#define PRCM_RUN_MODE   0x00000001
#define PRCM_SLEEP_MODE   0x00000002
#define PRCM_WCLK_DUAL_PHASE   0x00000002
#define PRCM_WCLK_NEG_EDGE   0x00000008
#define PRCM_WCLK_POS_EDGE   0x00000000
#define PRCM_WCLK_SINGLE_PHASE   0x00000000
#define PRCM_WCLK_USER_DEF   0x00000004