#include "chip.h"
#include <assert.h>
Go to the source code of this file.
Detailed Description
Purpose
Interface for configuring and using Power Management Controller (PMC) peripherals.
Implementation of Power Management Controller (PMC).
Definition in file pmc.c.
Function Documentation
void PMC_ConfigureMckWithPlla |
( |
uint32_t |
mul, |
|
|
uint32_t |
div, |
|
|
uint32_t |
prescaler | |
|
) |
| | |
Configure PLLA as clock input for MCK.
- Parameters:
-
| mul | PLL multiplier factor (not shifted, don't minus 1). |
| div | PLL divider factor (not shifted). |
| prescaler | Master Clock prescaler (shifted as in register). |
Definition at line 496 of file pmc.c.
void PMC_ConfigurePCK0 |
( |
uint32_t |
MasterClk, |
|
|
uint32_t |
prescaler | |
|
) |
| | |
Configure PLLA as clock input for MCK.
- Parameters:
-
| mul | PLL multiplier factor (not shifted, don't minus 1). |
| div | PLL divider factor (not shifted). |
| prescaler | Master Clock prescaler (shifted as in register). |
Definition at line 545 of file pmc.c.
void PMC_ConfigurePCK1 |
( |
uint32_t |
MasterClk, |
|
|
uint32_t |
prescaler | |
|
) |
| | |
Configure PLLA as clock input for MCK.
- Parameters:
-
| mul | PLL multiplier factor (not shifted, don't minus 1). |
| div | PLL divider factor (not shifted). |
| prescaler | Master Clock prescaler (shifted as in register). |
Definition at line 566 of file pmc.c.
void PMC_ConfigurePCK2 |
( |
uint32_t |
MasterClk, |
|
|
uint32_t |
prescaler | |
|
) |
| | |
Configure PLLA as clock input for MCK.
- Parameters:
-
| mul | PLL multiplier factor (not shifted, don't minus 1). |
| div | PLL divider factor (not shifted). |
| prescaler | Master Clock prescaler (shifted as in register). |
Definition at line 586 of file pmc.c.
void PMC_DisablePeripheral |
( |
uint32_t |
dwId |
) |
|
Disables the clock of a peripheral. The peripheral ID is used to identify which peripheral is targeted.
- Note:
- The ID must NOT be shifted (i.e. 1 << ID_xxx).
- Parameters:
-
| id | Peripheral ID (ID_xxx). |
Definition at line 185 of file pmc.c.
void PMC_EnableIntRC4_8_12MHz |
( |
uint32_t |
freqSelect |
) |
|
Enable internal 4/8/12MHz fast RC as main clock input.
- Parameters:
-
| freqSelect | fast RC frequency (FAST_RC_4MHZ, FAST_RC_8MHZ, FAST_RC_12MHZ). |
Definition at line 368 of file pmc.c.
void PMC_EnablePeripheral |
( |
uint32_t |
dwId |
) |
|
Enables the clock of a peripheral. The peripheral ID is used to identify which peripheral is targeted.
- Note:
- The ID must NOT be shifted (i.e. 1 << ID_xxx).
- Parameters:
-
| id | Peripheral ID (ID_xxx). |
Definition at line 156 of file pmc.c.
void PMC_EnableXT32KFME |
( |
void |
|
) |
|
Configure PLLA as clock input for MCK.
- Parameters:
-
| mul | PLL multiplier factor (not shifted, don't minus 1). |
| div | PLL divider factor (not shifted). |
| prescaler | Master Clock prescaler (shifted as in register). |
Definition at line 520 of file pmc.c.
uint32_t PMC_IsPeriphEnabled |
( |
uint32_t |
dwId |
) |
|
Get Periph Status for the given peripheral ID.
- Parameters:
-
| id | Peripheral ID (ID_xxx). |
Definition at line 243 of file pmc.c.
void PMC_SetMckSelection |
( |
uint32_t |
clockSource, |
|
|
uint32_t |
prescaler | |
|
) |
| | |
Selection of Master Clock.
- Parameters:
-
| clockSource | Master Clock source. |
| prescaler | Master Clock prescaler. |
- Note:
- The PMC_MCKR register must not be programmed in a single write operation (see. Product Data Sheet).
Definition at line 444 of file pmc.c.
void PMC_SetPllaClock |
( |
uint32_t |
mul, |
|
|
uint32_t |
div | |
|
) |
| | |
Configure PLLA clock by giving MUL and DIV. Disable PLLA when 'mul' set to 0.
- Parameters:
-
| mul | PLL multiplier factor. |
| div | PLL divider factor. |
Definition at line 418 of file pmc.c.