EFM32 Happy Gecko Software Documentation
efm32hg-doc-5.1.2
|
Clock management unit (CMU) API.
Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no obligation to support this Software. Silicon Labs is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.
Silicon Labs will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.
Definition in file em_cmu.h.
Go to the source code of this file.
Data Structures | |
struct | CMU_HFXOInit_TypeDef |
struct | CMU_LFXOInit_TypeDef |
Macros | |
#define | CMU_HFXOINIT_DEFAULT |
#define | CMU_HFXOINIT_EXTERNAL_CLOCK |
#define | CMU_LFXOINIT_DEFAULT |
#define | CMU_LFXOINIT_EXTERNAL_CLOCK |
#define | cmuClkDiv_1 1 |
#define | cmuClkDiv_1024 1024 |
#define | cmuClkDiv_128 128 |
#define | cmuClkDiv_16 16 |
#define | cmuClkDiv_16384 16384 |
#define | cmuClkDiv_2 2 |
#define | cmuClkDiv_2048 2048 |
#define | cmuClkDiv_256 256 |
#define | cmuClkDiv_32 32 |
#define | cmuClkDiv_32768 32768 |
#define | cmuClkDiv_4 4 |
#define | cmuClkDiv_4096 4096 |
#define | cmuClkDiv_512 512 |
#define | cmuClkDiv_64 64 |
#define | cmuClkDiv_8 8 |
#define | cmuClkDiv_8192 8192 |
Typedefs | |
typedef uint32_t | CMU_ClkDiv_TypeDef |
Functions | |
CMU_AUXHFRCOBand_TypeDef | CMU_AUXHFRCOBandGet (void) |
Get AUXHFRCO band in use. More... | |
void | CMU_AUXHFRCOBandSet (CMU_AUXHFRCOBand_TypeDef band) |
Set AUXHFRCO band and the tuning value based on the value in the calibration table made during production. More... | |
uint32_t | CMU_Calibrate (uint32_t HFCycles, CMU_Osc_TypeDef ref) |
Calibrate clock. More... | |
void | CMU_CalibrateConfig (uint32_t downCycles, CMU_Osc_TypeDef downSel, CMU_Osc_TypeDef upSel) |
Configure clock calibration. More... | |
__STATIC_INLINE void | CMU_CalibrateCont (bool enable) |
Configures continuous calibration mode. More... | |
uint32_t | CMU_CalibrateCountGet (void) |
Get calibration count register. More... | |
__STATIC_INLINE void | CMU_CalibrateStart (void) |
Starts calibration. More... | |
__STATIC_INLINE void | CMU_CalibrateStop (void) |
Stop the calibration counters. | |
CMU_ClkDiv_TypeDef | CMU_ClockDivGet (CMU_Clock_TypeDef clock) |
Get clock divisor/prescaler. More... | |
void | CMU_ClockDivSet (CMU_Clock_TypeDef clock, CMU_ClkDiv_TypeDef div) |
Set clock divisor/prescaler. More... | |
void | CMU_ClockEnable (CMU_Clock_TypeDef clock, bool enable) |
Enable/disable a clock. More... | |
uint32_t | CMU_ClockFreqGet (CMU_Clock_TypeDef clock) |
Get clock frequency for a clock point. More... | |
CMU_Select_TypeDef | CMU_ClockSelectGet (CMU_Clock_TypeDef clock) |
Get currently selected reference clock used for a clock branch. More... | |
void | CMU_ClockSelectSet (CMU_Clock_TypeDef clock, CMU_Select_TypeDef ref) |
Select reference clock/oscillator used for a clock branch. More... | |
__STATIC_INLINE uint32_t | CMU_DivToLog2 (CMU_ClkDiv_TypeDef div) |
Convert dividend to logarithmic value. Only works for even numbers equal to 2^n. More... | |
void | CMU_FreezeEnable (bool enable) |
CMU low frequency register synchronization freeze control. More... | |
CMU_HFRCOBand_TypeDef | CMU_HFRCOBandGet (void) |
Get HFRCO band in use. More... | |
void | CMU_HFRCOBandSet (CMU_HFRCOBand_TypeDef band) |
Set HFRCO band and the tuning value based on the value in the calibration table made during production. More... | |
uint32_t | CMU_HFRCOStartupDelayGet (void) |
Get the HFRCO startup delay. More... | |
void | CMU_HFRCOStartupDelaySet (uint32_t delay) |
Set the HFRCO startup delay. More... | |
void | CMU_HFXOInit (const CMU_HFXOInit_TypeDef *hfxoInit) |
Set HFXO control registers. More... | |
__STATIC_INLINE void | CMU_IntClear (uint32_t flags) |
Clear one or more pending CMU interrupts. More... | |
__STATIC_INLINE void | CMU_IntDisable (uint32_t flags) |
Disable one or more CMU interrupts. More... | |
__STATIC_INLINE void | CMU_IntEnable (uint32_t flags) |
Enable one or more CMU interrupts. More... | |
__STATIC_INLINE uint32_t | CMU_IntGet (void) |
Get pending CMU interrupts. More... | |
__STATIC_INLINE uint32_t | CMU_IntGetEnabled (void) |
Get enabled and pending CMU interrupt flags. More... | |
__STATIC_INLINE void | CMU_IntSet (uint32_t flags) |
Set one or more pending CMU interrupts. More... | |
uint32_t | CMU_LCDClkFDIVGet (void) |
Get the LCD framerate divisor (FDIV) setting. More... | |
void | CMU_LCDClkFDIVSet (uint32_t div) |
Set the LCD framerate divisor (FDIV) setting. More... | |
void | CMU_LFXOInit (const CMU_LFXOInit_TypeDef *lfxoInit) |
Set LFXO control registers. More... | |
__STATIC_INLINE void | CMU_Lock (void) |
Lock the CMU in order to protect some of its registers against unintended modification. More... | |
__STATIC_INLINE uint32_t | CMU_Log2ToDiv (uint32_t log2) |
Convert logarithm of 2 prescaler to division factor. More... | |
void | CMU_OscillatorEnable (CMU_Osc_TypeDef osc, bool enable, bool wait) |
Enable/disable oscillator. More... | |
uint32_t | CMU_OscillatorTuningGet (CMU_Osc_TypeDef osc) |
Get oscillator frequency tuning setting. More... | |
void | CMU_OscillatorTuningSet (CMU_Osc_TypeDef osc, uint32_t val) |
Set the oscillator frequency tuning control. More... | |
bool | CMU_PCNTClockExternalGet (unsigned int instance) |
Determine if currently selected PCNTn clock used is external or LFBCLK. More... | |
void | CMU_PCNTClockExternalSet (unsigned int instance, bool external) |
Select PCNTn clock. More... | |
__STATIC_INLINE void | CMU_Unlock (void) |
Unlock the CMU so that writing to locked registers again is possible. | |
CMU_USHFRCOBand_TypeDef | CMU_USHFRCOBandGet (void) |
Get USHFRCO band in use. More... | |
void | CMU_USHFRCOBandSet (CMU_USHFRCOBand_TypeDef band) |
Set USHFRCO band to use. More... | |