2.15 Clock Generator (CLOCK)
This Plib implements software abstraction for CLOCK Peripheral.
Library Interface
Clock Generator peripheral library provides the following interfaces:
Functions
Name | Description |
---|---|
CLOCK_Initialize | Initializes all the modules related to the system clock |
SYSCTRL_CallbackRegister | Register the function to be called when an SYSCTRL interrupt is generated |
OSCCTRL_CallbackRegister | Register the function to be called when an External Oscillator or DPLL event is generated |
OSC32KCTRL_CallbackRegister | Register the function to be called when the 32KHz External Oscillator has failed |
MCLK_CallbackRegister | Register the function to be called when the MCLK is ready |
CLK_Initialize | Initializes hardware of the System Clock and Peripheral Clock |
CLK_TDSCLKSelectXTAL | Selects 32KHz Crystal Oscillator as Slow Clock (SLCK) source |
CLK_EnableMainRCOscillator | Enables main RC oscillator |
CLK_DisableMainRCOscillator | Disables main RC oscillator |
CLK_EnableMainXTALOscillator | Enables main XTAL oscillator |
CLK_DisableMainXTALOscillator | Disables main XTAL oscillator |
CLK_MainOscillatorSelectXTAL | Selects XTAL as main oscillator source |
CLK_MainOscillatorSelectRC | Selects RC oscillator as main coscillator source |
CLK_PLLEnable | Enables PLL |
CLK_PLLDisable | Disbales PLL |
CLK_PLLConfig | Configures given PLL parameters |
CLK_UPLLInitStart | Starts initialization of UPLL Clock |
CLK_UPLLInitMiddle | Controls UPLL Voltage Regulator |
CLK_UPLLInitEnd | Ends initialization of UPLL Clock |
CLK_Core0ClkConfig | Configures core 0 clock parameters |
CLK_Core1BusMasterClkEnable | Enables core 1 master clock |
CLK_Core1BusMasterClkDisable | Disables core 1 master clock |
CLK_Core1ClkConfig | Configures core 1 clock parameters |
CLK_Core1ProcessorClkEnable | Enables core 1 processor clock |
CLK_Core1ProcessorClkDisable | Disables core 1 processor clock |
CLK_PCKConfig | Configures programmable clock parameters |
CLK_PCKOutputEnable | Enables PCK output |
CLK_PCKOutputDisable | Disables PCK output |
CLK_PeripheralClockConfigGet | Reads peripheral clock parameters |
CLK_PeripheralClockConfigSet | Configures peripheral clock parameters |
CLOCK_GeneratorFrequencyGet | Returns clock generator frequency in Hz |
CLOCK_FailStatusGet | Returns clock generator failure status |
CLOCK_MonitorEnable |
Enables clock monitor |
CLOCK_MonitorDisable | Disables clock monitor |
CLOCK_MonitorIsReady | Checks if the clock monitor capture data is ready |
CLOCK_MonitorAccumulatedCountGet |
Returns the accumulated data after the capture |
CLOCK_MonitorMonCallbackRegister | Override default callback and to define custom callback for CLOCK Monitor Saturation event |
CLOCK_MonitorWarnCallbackRegister | Override default callback and to define custom callback for CLOCK Monitor Warning event |
CLOCK_MonitorFailCallbackRegister | Override default callback and to define custom callback for CLOCK Monitor Fail event |
CLOCK_MonitorRdyCallbackRegister | Override default callback and to define custom callback for CLOCK Monitor Data Ready event |
CLOCK_CombinedClockFailCallbackRegister | Override default callback and to define custom callback for CLOCK Combined Clock Fail event |
Data types and constants
Name | Type | Description |
---|---|---|
OSCCTRL_CFD_CALLBACK | Typedef | Defines the data type and function signature for the External Oscillator callback function |
OSC32KCTRL_CFD_CALLBACK | Typedef | Defines the data type and function signature for the External 32KHz Oscillator clock failure detection callback function |
MCLK_CKRDY_CALLBACK | Typedef | Defines the data type and function signature for the Main Clock Ready callback function |
SYSCTRL_CALLBACK | Typedef | Defines the data type and function signature for the System Control callback function |
SYSCTRL_INTERRUPT_MASK | Enum | System Control Interrupt Mask |
CLOCK_GENERATOR | Enum | Defines the Clock Generators |
CLOCK_FAIL_STATUS_MASKS | Enum | Defines fail status masks |
CLOCK_MONITOR | Enum | Defines Clock Monitors |
CLOCK_MonitorMonCallback | Typedef | Defines the Clock-Monitor Saturation callback function prototype |
CLOCK_MonitorWarnCallback | Typedef | Defines the Clock-Monitor Warning callback function prototype |
CLOCK_MonitorFailCallback | Typedef | Defines the Clock-Monitor Fail callback function prototype |
CLOCK_MonitorRdyCallback | Typedef | Defines the Clock-Monitor Data Ready callback function prototype |
CLOCK_CombinedFailCallback | Typedef |
Defines the Clock-Fail callback function prototype |
Note: Not all APIs maybe implemented. See the specific device
family section for available APIs.