2.14 Clock Generator (CLOCK)

This Plib implements software abstraction for CLOCK Peripheral.

Library Interface

Clock Generator peripheral library provides the following interfaces:

Functions
NameDescription
CLOCK_InitializeInitializes all the modules related to the system clock
SYSCTRL_CallbackRegisterRegister the function to be called when an SYSCTRL interrupt is generated
OSCCTRL_CallbackRegisterRegister the function to be called when an External Oscillator or DPLL event is generated
OSC32KCTRL_CallbackRegisterRegister the function to be called when the 32KHz External Oscillator has failed
MCLK_CallbackRegisterRegister the function to be called when the MCLK is ready
CLK_InitializeInitializes hardware of the System Clock and Peripheral Clock
CLK_TDSCLKSelectXTALSelects 32KHz Crystal Oscillator as Slow Clock (SLCK) source
CLK_EnableMainRCOscillatorEnables main RC oscillator
CLK_DisableMainRCOscillatorDisables main RC oscillator
CLK_EnableMainXTALOscillatorEnables main XTAL oscillator
CLK_DisableMainXTALOscillatorDisables main XTAL oscillator
CLK_MainOscillatorSelectXTALSelects XTAL as main oscillator source
CLK_MainOscillatorSelectRCSelects RC oscillator as main coscillator source
CLK_PLLEnableEnables PLL
CLK_PLLDisableDisbales PLL
CLK_PLLConfigConfigures given PLL parameters
CLK_UPLLInitStartStarts initialization of UPLL Clock
CLK_UPLLInitMiddleControls UPLL Voltage Regulator
CLK_UPLLInitEndEnds initialization of UPLL Clock
CLK_Core0ClkConfigConfigures core 0 clock parameters
CLK_Core1BusMasterClkEnableEnables core 1 master clock
CLK_Core1BusMasterClkDisableDisables core 1 master clock
CLK_Core1ClkConfigConfigures core 1 clock parameters
CLK_Core1ProcessorClkEnableEnables core 1 processor clock
CLK_Core1ProcessorClkDisableDisables core 1 processor clock
CLK_PCKConfigConfigures programmable clock parameters
CLK_PCKOutputEnableEnables PCK output
CLK_PCKOutputDisableDisables PCK output
CLK_PeripheralClockConfigGetReads peripheral clock parameters
CLK_PeripheralClockConfigSetConfigures peripheral clock parameters

Data types and constants

NameTypeDescription
OSCCTRL_CFD_CALLBACKTypedefDefines the data type and function signature for the External Oscillator callback function
OSC32KCTRL_CFD_CALLBACKTypedefDefines the data type and function signature for the External 32KHz Oscillator clock failure detection callback function
MCLK_CKRDY_CALLBACKTypedefDefines the data type and function signature for the Main Clock Ready callback function
SYSCTRL_CALLBACKTypedefDefines the data type and function signature for the System Control callback function
SYSCTRL_INTERRUPT_MASKEnumSystem Control Interrupt Mask
Note: Not all APIs maybe implemented. See the specific device family section for available APIs.