CC13xx Driver Library
prcm.c
Go to the documentation of this file.
1 /******************************************************************************
2 * Filename: prcm.c
3 * Revised: 2015-05-11 10:13:03 +0200 (Mon, 11 May 2015)
4 * Revision: 43466
5 *
6 * Description: Driver for the PRCM.
7 *
8 * Copyright (c) 2015, Texas Instruments Incorporated
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions are met:
13 *
14 * 1) Redistributions of source code must retain the above copyright notice,
15 * this list of conditions and the following disclaimer.
16 *
17 * 2) Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
20 *
21 * 3) Neither the name of the ORGANIZATION nor the names of its contributors may
22 * be used to endorse or promote products derived from this software without
23 * specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 ******************************************************************************/
38 
39 #include <driverlib/prcm.h>
40 
41 //*****************************************************************************
42 //
43 // Handle support for DriverLib in ROM:
44 // This section will undo prototype renaming made in the header file
45 //
46 //*****************************************************************************
47 #if !defined(DOXYGEN)
48  #undef PRCMInfClockConfigureSet
49  #define PRCMInfClockConfigureSet NOROM_PRCMInfClockConfigureSet
50  #undef PRCMInfClockConfigureGet
51  #define PRCMInfClockConfigureGet NOROM_PRCMInfClockConfigureGet
52  #undef PRCMAudioClockConfigSet
53  #define PRCMAudioClockConfigSet NOROM_PRCMAudioClockConfigSet
54  #undef PRCMAudioClockConfigSetOverride
55  #define PRCMAudioClockConfigSetOverride NOROM_PRCMAudioClockConfigSetOverride
56  #undef PRCMPowerDomainOn
57  #define PRCMPowerDomainOn NOROM_PRCMPowerDomainOn
58  #undef PRCMPowerDomainOff
59  #define PRCMPowerDomainOff NOROM_PRCMPowerDomainOff
60  #undef PRCMPeripheralRunEnable
61  #define PRCMPeripheralRunEnable NOROM_PRCMPeripheralRunEnable
62  #undef PRCMPeripheralRunDisable
63  #define PRCMPeripheralRunDisable NOROM_PRCMPeripheralRunDisable
64  #undef PRCMPeripheralSleepEnable
65  #define PRCMPeripheralSleepEnable NOROM_PRCMPeripheralSleepEnable
66  #undef PRCMPeripheralSleepDisable
67  #define PRCMPeripheralSleepDisable NOROM_PRCMPeripheralSleepDisable
68  #undef PRCMPeripheralDeepSleepEnable
69  #define PRCMPeripheralDeepSleepEnable NOROM_PRCMPeripheralDeepSleepEnable
70  #undef PRCMPeripheralDeepSleepDisable
71  #define PRCMPeripheralDeepSleepDisable NOROM_PRCMPeripheralDeepSleepDisable
72  #undef PRCMPowerDomainStatus
73  #define PRCMPowerDomainStatus NOROM_PRCMPowerDomainStatus
74  #undef PRCMDeepSleep
75  #define PRCMDeepSleep NOROM_PRCMDeepSleep
76 #endif
77 
78 
79 //*****************************************************************************
80 //
81 // Arrays that maps the "peripheral set" number (which is stored in the
82 // third nibble of the PRCM_PERIPH_* defines) to the PRCM register that
83 // contains the relevant bit for that peripheral.
84 //
85 //*****************************************************************************
86 
87 // Run mode registers
88 static const uint32_t g_pui32RCGCRegs[] =
89 {
97 };
98 
99 // Sleep mode registers
100 static const uint32_t g_pui32SCGCRegs[] =
101 {
109 };
110 
111 // Deep sleep mode registers
112 static const uint32_t g_pui32DCGCRegs[] =
113 {
121 };
122 
123 //*****************************************************************************
124 //
125 // This macro extracts the array index out of the peripheral number
126 //
127 //*****************************************************************************
128 #define PRCM_PERIPH_INDEX(a) (((a) >> 8) & 0xf)
129 
130 //*****************************************************************************
131 //
132 // This macro extracts the peripheral instance number and generates bit mask
133 //
134 //*****************************************************************************
135 #define PRCM_PERIPH_MASKBIT(a) (0x00000001 << ((a) & 0xf))
136 
137 
138 //*****************************************************************************
139 //
141 //
142 //*****************************************************************************
143 void
144 PRCMInfClockConfigureSet(uint32_t ui32ClkDiv, uint32_t ui32PowerMode)
145 {
146  uint32_t ui32Divisor;
147 
148  //
149  // Check the arguments.
150  //
151  ASSERT((ui32ClkDiv == PRCM_CLOCK_DIV_1) ||
152  (ui32ClkDiv == PRCM_CLOCK_DIV_2) ||
153  (ui32ClkDiv == PRCM_CLOCK_DIV_8) ||
154  (ui32ClkDiv == PRCM_CLOCK_DIV_32));
155  ASSERT((ui32PowerMode == PRCM_RUN_MODE) ||
156  (ui32PowerMode == PRCM_SLEEP_MODE) ||
157  (ui32PowerMode == PRCM_DEEP_SLEEP_MODE));
158 
159  ui32Divisor = 0;
160 
161  //
162  // Find the correct division factor.
163  //
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  //
182  // Determine the correct power mode set the division factor accordingly.
183  //
184  if(ui32PowerMode == PRCM_RUN_MODE)
185  {
186  HWREG(PRCM_BASE + PRCM_O_INFRCLKDIVR) = ui32Divisor;
187  }
188  else if(ui32PowerMode == PRCM_SLEEP_MODE)
189  {
190  HWREG(PRCM_BASE + PRCM_O_INFRCLKDIVS) = ui32Divisor;
191  }
192  else if(ui32PowerMode == PRCM_DEEP_SLEEP_MODE)
193  {
194  HWREG(PRCM_BASE + PRCM_O_INFRCLKDIVDS) = ui32Divisor;
195  }
196 }
197 
198 //*****************************************************************************
199 //
201 //
202 //*****************************************************************************
203 uint32_t
204 PRCMInfClockConfigureGet(uint32_t ui32PowerMode)
205 {
206  uint32_t ui32ClkDiv;
207  uint32_t ui32Divisor;
208 
209  //
210  // Check the arguments.
211  //
212  ASSERT((ui32PowerMode == PRCM_RUN_MODE) ||
213  (ui32PowerMode == PRCM_SLEEP_MODE) ||
214  (ui32PowerMode == PRCM_DEEP_SLEEP_MODE));
215 
216  ui32ClkDiv = 0;
217  ui32Divisor = 0;
218 
219  //
220  // Determine the correct power mode.
221  //
222  if(ui32PowerMode == PRCM_RUN_MODE)
223  {
224  ui32ClkDiv = HWREG(PRCM_BASE + PRCM_O_INFRCLKDIVR);
225  }
226  else if(ui32PowerMode == PRCM_SLEEP_MODE)
227  {
228  ui32ClkDiv = HWREG(PRCM_BASE + PRCM_O_INFRCLKDIVS);
229  }
230  else if(ui32PowerMode == PRCM_DEEP_SLEEP_MODE)
231  {
232  ui32ClkDiv = HWREG(PRCM_BASE + PRCM_O_INFRCLKDIVDS);
233  }
234 
235  //
236  // Find the correct division factor.
237  //
238  if(ui32ClkDiv == 0x0)
239  {
240  ui32Divisor = PRCM_CLOCK_DIV_1;
241  }
242  else if(ui32ClkDiv == 0x1)
243  {
244  ui32Divisor = PRCM_CLOCK_DIV_2;
245  }
246  else if(ui32ClkDiv == 0x2)
247  {
248  ui32Divisor = PRCM_CLOCK_DIV_8;
249  }
250  else if(ui32ClkDiv == 0x3)
251  {
252  ui32Divisor = PRCM_CLOCK_DIV_32;
253  }
254 
255  //
256  // Return the clock division factor.
257  //
258  return ui32Divisor;
259 }
260 
261 
262 //*****************************************************************************
263 //
265 //
266 //*****************************************************************************
267 void
268 PRCMAudioClockConfigSet(uint32_t ui32ClkConfig, uint32_t ui32SampleRate)
269 {
270  uint32_t ui32Reg;
271  uint32_t ui32MstDiv;
272  uint32_t ui32BitDiv;
273  uint32_t ui32WordDiv;
274 
275  //
276  // Check the arguments.
277  //
279  ASSERT((ui32SampleRate == I2S_SAMPLE_RATE_16K) ||
280  (ui32SampleRate == I2S_SAMPLE_RATE_24K) ||
281  (ui32SampleRate == I2S_SAMPLE_RATE_32K) ||
282  (ui32SampleRate == I2S_SAMPLE_RATE_48K));
283 
284  ui32MstDiv = 0;
285  ui32BitDiv = 0;
286  ui32WordDiv = 0;
287 
288  //
289  // Make sure the audio clock generation is disabled before reconfiguring.
290  //
292 
293  //
294  // Define the clock division factors for the audio interface.
295  //
296  switch(ui32SampleRate)
297  {
298  case I2S_SAMPLE_RATE_16K :
299  ui32MstDiv = 6;
300  ui32BitDiv = 60;
301  ui32WordDiv = 25;
302  break;
303  case I2S_SAMPLE_RATE_24K :
304  ui32MstDiv = 4;
305  ui32BitDiv = 40;
306  ui32WordDiv = 25;
307  break;
308  case I2S_SAMPLE_RATE_32K :
309  ui32MstDiv = 3;
310  ui32BitDiv = 30;
311  ui32WordDiv = 25;
312  break;
313  case I2S_SAMPLE_RATE_48K :
314  ui32MstDiv = 2;
315  ui32BitDiv = 20;
316  ui32WordDiv = 25;
317  break;
318  }
319 
320  //
321  // Make sure to compensate the Frame clock division factor if using single
322  // phase format.
323  //
324  if((ui32ClkConfig & PRCM_I2SCLKCTL_WCLK_PHASE_M) == PRCM_WCLK_SINGLE_PHASE)
325  {
326  ui32WordDiv -= 1;
327  }
328 
329  //
330  // Write the clock division factors.
331  //
332  HWREG(PRCM_BASE + PRCM_O_I2SMCLKDIV) = ui32MstDiv;
333  HWREG(PRCM_BASE + PRCM_O_I2SBCLKDIV) = ui32BitDiv;
334  HWREG(PRCM_BASE + PRCM_O_I2SWCLKDIV) = ui32WordDiv;
335 
336  //
337  // Configure the Word clock format and polarity.
338  //
341  HWREG(PRCM_BASE + PRCM_O_I2SCLKCTL) = ui32Reg | ui32ClkConfig;
342 }
343 
344 //*****************************************************************************
345 //
347 //
348 //*****************************************************************************
349 
350 void
351 PRCMAudioClockConfigSetOverride(uint32_t ui32ClkConfig, uint32_t ui32MstDiv,
352  uint32_t ui32BitDiv, uint32_t ui32WordDiv)
353 {
354  uint32_t ui32Reg;
355 
356  //
357  // Check the arguments.
358  //
360 
361  //
362  // Make sure the audio clock generation is disabled before reconfiguring.
363  //
365 
366  //
367  // Make sure to compensate the Frame clock division factor if using single
368  // phase format.
369  //
370  if((ui32ClkConfig & PRCM_I2SCLKCTL_WCLK_PHASE_M) == PRCM_WCLK_SINGLE_PHASE)
371  {
372  ui32WordDiv -= 1;
373  }
374 
375  //
376  // Write the clock division factors.
377  //
378  HWREG(PRCM_BASE + PRCM_O_I2SMCLKDIV) = ui32MstDiv;
379  HWREG(PRCM_BASE + PRCM_O_I2SBCLKDIV) = ui32BitDiv;
380  HWREG(PRCM_BASE + PRCM_O_I2SWCLKDIV) = ui32WordDiv;
381 
382  //
383  // Configure the Word clock format and polarity.
384  //
387  HWREG(PRCM_BASE + PRCM_O_I2SCLKCTL) = ui32Reg | ui32ClkConfig;
388 }
389 
390 //*****************************************************************************
391 //
393 //
394 //*****************************************************************************
395 void
396 PRCMPowerDomainOn(uint32_t ui32Domains)
397 {
398  //
399  // Check the arguments.
400  //
401  ASSERT((ui32Domains & PRCM_DOMAIN_RFCORE) ||
402  (ui32Domains & PRCM_DOMAIN_SERIAL) ||
403  (ui32Domains & PRCM_DOMAIN_PERIPH) ||
404  (ui32Domains & PRCM_DOMAIN_CPU) ||
405  (ui32Domains & PRCM_DOMAIN_VIMS));
406 
407  //
408  // Assert the request to power on the right domains.
409  //
410  if(ui32Domains & PRCM_DOMAIN_RFCORE)
411  {
412  HWREG(PRCM_BASE +
415  }
416  if(ui32Domains & PRCM_DOMAIN_SERIAL)
417  {
418  HWREG(PRCM_BASE +
420  }
421  if(ui32Domains & PRCM_DOMAIN_PERIPH)
422  {
423  HWREG(PRCM_BASE +
425  }
426  if(ui32Domains & PRCM_DOMAIN_VIMS)
427  {
428  HWREG(PRCM_BASE + PRCM_O_PDCTL1VIMS) |=
430  }
431  if(ui32Domains & PRCM_DOMAIN_CPU)
432  {
434  }
435 }
436 
437 //*****************************************************************************
438 //
440 //
441 //*****************************************************************************
442 void
443 PRCMPowerDomainOff(uint32_t ui32Domains)
444 {
445  //
446  // Check the arguments.
447  //
448  ASSERT((ui32Domains & PRCM_DOMAIN_RFCORE) ||
449  (ui32Domains & PRCM_DOMAIN_SERIAL) ||
450  (ui32Domains & PRCM_DOMAIN_PERIPH) ||
451  (ui32Domains & PRCM_DOMAIN_CPU) ||
452  (ui32Domains & PRCM_DOMAIN_VIMS));
453 
454  //
455  // Assert the request to power off the right domains.
456  //
457  if(ui32Domains & PRCM_DOMAIN_RFCORE)
458  {
459  HWREG(PRCM_BASE +
462  }
463  if(ui32Domains & PRCM_DOMAIN_SERIAL)
464  {
465  HWREG(PRCM_BASE +
467  }
468  if(ui32Domains & PRCM_DOMAIN_PERIPH)
469  {
470  HWREG(PRCM_BASE +
472  }
473  if(ui32Domains & PRCM_DOMAIN_VIMS)
474  {
475  HWREG(PRCM_BASE + PRCM_O_PDCTL1VIMS) &=
477  }
478  if(ui32Domains & PRCM_DOMAIN_CPU)
479  {
481  }
482 }
483 
484 //*****************************************************************************
485 //
487 //
488 //*****************************************************************************
489 void
490 PRCMPeripheralRunEnable(uint32_t ui32Peripheral)
491 {
492  //
493  // Check the arguments.
494  //
495  ASSERT(PRCMPeripheralValid(ui32Peripheral));
496 
497  //
498  // Enable module in Run Mode.
499  //
500  HWREG(PRCM_BASE + g_pui32RCGCRegs[PRCM_PERIPH_INDEX(ui32Peripheral)]) |=
501  PRCM_PERIPH_MASKBIT(ui32Peripheral);
502 }
503 
504 //*****************************************************************************
505 //
507 //
508 //*****************************************************************************
509 void
510 PRCMPeripheralRunDisable(uint32_t ui32Peripheral)
511 {
512  //
513  // Check the arguments.
514  //
515  ASSERT(PRCMPeripheralValid(ui32Peripheral));
516 
517  //
518  // Disable module in Run Mode.
519  //
520  HWREG(PRCM_BASE + g_pui32RCGCRegs[PRCM_PERIPH_INDEX(ui32Peripheral)]) &=
521  ~PRCM_PERIPH_MASKBIT(ui32Peripheral);
522 }
523 
524 //*****************************************************************************
525 //
527 //
528 //*****************************************************************************
529 void
530 PRCMPeripheralSleepEnable(uint32_t ui32Peripheral)
531 {
532  //
533  // Check the arguments.
534  //
535  ASSERT(PRCMPeripheralValid(ui32Peripheral));
536 
537  //
538  // Enable this peripheral in sleep mode.
539  //
540  HWREG(PRCM_BASE + g_pui32SCGCRegs[PRCM_PERIPH_INDEX(ui32Peripheral)]) |=
541  PRCM_PERIPH_MASKBIT(ui32Peripheral);
542 }
543 
544 //*****************************************************************************
545 //
547 //
548 //*****************************************************************************
549 void
550 PRCMPeripheralSleepDisable(uint32_t ui32Peripheral)
551 {
552  //
553  // Check the arguments.
554  //
555  ASSERT(PRCMPeripheralValid(ui32Peripheral));
556 
557  //
558  // Disable this peripheral in sleep mode
559  //
560  HWREG(PRCM_BASE + g_pui32SCGCRegs[PRCM_PERIPH_INDEX(ui32Peripheral)]) &=
561  ~PRCM_PERIPH_MASKBIT(ui32Peripheral);
562 }
563 
564 //*****************************************************************************
565 //
567 //
568 //*****************************************************************************
569 void
570 PRCMPeripheralDeepSleepEnable(uint32_t ui32Peripheral)
571 {
572  //
573  // Check the arguments.
574  //
575  ASSERT(PRCMPeripheralValid(ui32Peripheral));
576 
577  //
578  // Enable this peripheral in deep-sleep mode.
579  //
580  HWREG(PRCM_BASE + g_pui32DCGCRegs[PRCM_PERIPH_INDEX(ui32Peripheral)]) |=
581  PRCM_PERIPH_MASKBIT(ui32Peripheral);
582 }
583 
584 //*****************************************************************************
585 //
587 //
588 //*****************************************************************************
589 void
590 PRCMPeripheralDeepSleepDisable(uint32_t ui32Peripheral)
591 {
592  //
593  // Check the arguments.
594  //
595  ASSERT(PRCMPeripheralValid(ui32Peripheral));
596 
597  //
598  // Disable this peripheral in Deep Sleep mode.
599  //
600  HWREG(PRCM_BASE + g_pui32DCGCRegs[PRCM_PERIPH_INDEX(ui32Peripheral)]) &=
601  ~PRCM_PERIPH_MASKBIT(ui32Peripheral);
602 }
603 
604 //*****************************************************************************
605 //
607 //
608 //*****************************************************************************
609 uint32_t
610 PRCMPowerDomainStatus(uint32_t ui32Domains)
611 {
612  bool bStatus;
613  uint32_t ui32StatusRegister0;
614  uint32_t ui32StatusRegister1;
615 
616  //
617  // Check the arguments.
618  //
619  ASSERT((ui32Domains & (PRCM_DOMAIN_RFCORE |
622 
623  bStatus = true;
624  ui32StatusRegister0 = HWREG(PRCM_BASE + PRCM_O_PDSTAT0);
625  ui32StatusRegister1 = HWREG(PRCM_BASE + PRCM_O_PDSTAT1);
626 
627  //
628  // Return the correct power status.
629  //
630  if(ui32Domains & PRCM_DOMAIN_RFCORE)
631  {
632  bStatus = bStatus &&
633  ((ui32StatusRegister0 & PRCM_PDSTAT0_RFC_ON) ||
634  (ui32StatusRegister1 & PRCM_PDSTAT1_RFC_ON));
635  }
636  if(ui32Domains & PRCM_DOMAIN_SERIAL)
637  {
638  bStatus = bStatus && (ui32StatusRegister0 & PRCM_PDSTAT0_SERIAL_ON);
639  }
640  if(ui32Domains & PRCM_DOMAIN_PERIPH)
641  {
642  bStatus = bStatus && (ui32StatusRegister0 & PRCM_PDSTAT0_PERIPH_ON);
643  }
644 
645  //
646  // Return the status.
647  //
648  return (bStatus ? PRCM_DOMAIN_POWER_ON : PRCM_DOMAIN_POWER_OFF);
649 }
650 
651 //*****************************************************************************
652 //
654 //
655 //*****************************************************************************
656 void
658 {
659  //
660  // Enable deep-sleep.
661  //
662  HWREG(NVIC_SYS_CTRL) |= NVIC_SYS_CTRL_SLEEPDEEP;
663 
664  //
665  // Wait for an interrupt.
666  //
667  CPUwfi();
668 
669  //
670  // Disable deep-sleep so that a future sleep will work correctly.
671  //
672  HWREG(NVIC_SYS_CTRL) &= ~(NVIC_SYS_CTRL_SLEEPDEEP);
673 }
#define I2S_SAMPLE_RATE_48K
Definition: prcm.h:172
#define I2S_SAMPLE_RATE_16K
Definition: prcm.h:169
static const uint32_t g_pui32RCGCRegs[]
Definition: prcm.c:88
uint32_t PRCMInfClockConfigureGet(uint32_t ui32PowerMode)
Use this function to get the infrastructure clock configuration.
Definition: prcm.c:204
#define I2S_SAMPLE_RATE_24K
Definition: prcm.h:170
#define PRCM_DEEP_SLEEP_MODE
Definition: prcm.h:111
uint32_t PRCMPowerDomainStatus(uint32_t ui32Domains)
Get the status for a specific power domain.
Definition: prcm.c:610
static const uint32_t g_pui32DCGCRegs[]
Definition: prcm.c:112
#define PRCM_CLOCK_DIV_8
Definition: prcm.h:121
#define PRCM_DOMAIN_VIMS
Definition: prcm.h:142
#define PRCM_WCLK_SINGLE_PHASE
Definition: prcm.h:165
void PRCMPeripheralSleepEnable(uint32_t ui32Peripheral)
Enables a peripheral in sleep mode.
Definition: prcm.c:530
void PRCMPeripheralSleepDisable(uint32_t ui32Peripheral)
Disables a peripheral in sleep mode.
Definition: prcm.c:550
#define PRCM_DOMAIN_PERIPH
Definition: prcm.h:138
#define PRCM_PERIPH_MASKBIT(a)
Definition: prcm.c:135
#define I2S_SAMPLE_RATE_32K
Definition: prcm.h:171
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.
Definition: prcm.c:351
#define PRCM_CLOCK_DIV_32
Definition: prcm.h:123
static void CPUwfi(void)
Wait for interrupt.
Definition: cpu.h:144
static const uint32_t g_pui32SCGCRegs[]
Definition: prcm.c:100
#define ASSERT(expr)
Definition: debug.h:74
#define PRCM_PERIPH_INDEX(a)
Definition: prcm.c:128
#define PRCM_SLEEP_MODE
Definition: prcm.h:110
void PRCMDeepSleep(void)
Put the processor into deep-sleep mode.
Definition: prcm.c:657
#define PRCM_CLOCK_DIV_1
Definition: prcm.h:118
void PRCMInfClockConfigureSet(uint32_t ui32ClkDiv, uint32_t ui32PowerMode)
Configure the infrastructure clock.
Definition: prcm.c:144
#define PRCM_DOMAIN_POWER_ON
Definition: prcm.h:153
void PRCMPowerDomainOn(uint32_t ui32Domains)
Turn power on in power domains in the MCU domain.
Definition: prcm.c:396
#define PRCM_DOMAIN_SERIAL
Definition: prcm.h:136
#define PRCM_DOMAIN_RFCORE
Definition: prcm.h:134
void PRCMPeripheralRunDisable(uint32_t ui32Peripheral)
Disables a peripheral in Run mode.
Definition: prcm.c:510
#define PRCM_CLOCK_DIV_2
Definition: prcm.h:119
static void PRCMAudioClockDisable(void)
Disable the audio clock generation.
Definition: prcm.h:458
#define PRCM_DOMAIN_CPU
Definition: prcm.h:144
void PRCMPeripheralRunEnable(uint32_t ui32Peripheral)
Enables a peripheral in Run mode.
Definition: prcm.c:490
void PRCMPeripheralDeepSleepEnable(uint32_t ui32Peripheral)
Enables a peripheral in deep-sleep mode.
Definition: prcm.c:570
void PRCMPowerDomainOff(uint32_t ui32Domains)
Turn off a specific power domain.
Definition: prcm.c:443
void PRCMPeripheralDeepSleepDisable(uint32_t ui32Peripheral)
Disables a peripheral in deep-sleep mode.
Definition: prcm.c:590
void PRCMAudioClockConfigSet(uint32_t ui32ClkConfig, uint32_t ui32SampleRate)
Configure the audio clock generation.
Definition: prcm.c:268
#define PRCM_DOMAIN_POWER_OFF
Definition: prcm.h:152
#define PRCM_RUN_MODE
Definition: prcm.h:109