LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
clock_18xx_43xx.c File Reference
#include "clock_18xx_43xx.h"

Go to the source code of this file.

Data Structures

struct  CLK_PERIPH_TO_BASE_T
 

Functions

static uint32_t Chip_Clock_TestMainPLLMultiplier (uint32_t InputHz, uint32_t TestMult, uint32_t MinHz, uint32_t MaxHz)
 
static uint32_t Chip_Clock_GetDivRate (CGU_CLKIN_T clock, CGU_IDIV_T divider)
 
static CGU_BASE_CLK_T Chip_Clock_FindBseClock (CCU_CLK_T clk)
 
void Chip_Clock_EnableCrystal (void)
 Enables the crystal oscillator.
 
void IP_Clock_DisableCrystal (void)
 
uint32_t Chip_Clock_SetupMainPLLHz (CGU_CLKIN_T Input, uint32_t MinHz, uint32_t DesiredHz, uint32_t MaxHz)
 Configures the main PLL.
 
uint32_t Chip_Clock_SetupMainPLLMult (CGU_CLKIN_T Input, uint32_t mult)
 Directly set the PLL multipler.
 
uint32_t Chip_Clock_GetMainPLLHz (void)
 Returns the frequency of the main PLL.
 
void Chip_Clock_DisableMainPLL (void)
 Disables the main PLL.
 
bool Chip_Clock_MainPLLLocked (void)
 Returns the lock status of the main PLL.
 
void Chip_Clock_SetDivider (CGU_IDIV_T Divider, CGU_CLKIN_T Input, uint32_t Divisor)
 Sets up a CGU clock divider and it's input clock.
 
CGU_CLKIN_T Chip_Clock_GetDividerSource (CGU_IDIV_T Divider)
 Gets a CGU clock divider source.
 
uint32_t Chip_Clock_GetDividerDivisor (CGU_IDIV_T Divider)
 Gets a CGU clock divider divisor.
 
uint32_t Chip_Clock_GetClockInputHz (CGU_CLKIN_T input)
 Returns the frequency of the specified input clock source.
 
uint32_t Chip_Clock_GetBaseClocktHz (CGU_BASE_CLK_T clock)
 Returns the frequency of the specified base clock source.
 
void Chip_Clock_SetBaseClock (CGU_BASE_CLK_T BaseClock, CGU_CLKIN_T Input, bool autoblocken, bool powerdn)
 Sets a CGU Base Clock clock source.
 
void Chip_Clock_EnableBaseClock (CGU_BASE_CLK_T BaseClock)
 Enables a base clock source.
 
void Chip_Clock_DisableBaseClock (CGU_BASE_CLK_T BaseClock)
 Disables a base clock source.
 
CGU_CLKIN_T Chip_Clock_GetBaseClock (CGU_BASE_CLK_T BaseClock)
 Gets a CGU Base Clock clock source.
 
void Chip_Clock_EnableOpts (CCU_CLK_T clk, bool autoen, bool wakeupen, int div)
 Enables a peripheral clock and sets clock states.
 
void Chip_Clock_Enable (CCU_CLK_T clk)
 Enables a peripheral clock.
 
void Chip_Clock_Disable (CCU_CLK_T clk)
 Disables a peripheral clock.
 
uint32_t Chip_Clock_GetRate (CCU_CLK_T clk)
 Returns a peripheral clock rate.
 

Variables

static const CLK_PERIPH_TO_BASE_T periph_to_base []
 

Function Documentation

static CGU_BASE_CLK_T Chip_Clock_FindBseClock ( CCU_CLK_T  clk)
static

Definition at line 103 of file clock_18xx_43xx.c.

static uint32_t Chip_Clock_GetDivRate ( CGU_CLKIN_T  clock,
CGU_IDIV_T  divider 
)
static

Definition at line 92 of file clock_18xx_43xx.c.

static uint32_t Chip_Clock_TestMainPLLMultiplier ( uint32_t  InputHz,
uint32_t  TestMult,
uint32_t  MinHz,
uint32_t  MaxHz 
)
static

Definition at line 80 of file clock_18xx_43xx.c.

void IP_Clock_DisableCrystal ( void  )

Definition at line 145 of file clock_18xx_43xx.c.

Variable Documentation