Clock management unit (CMU) API. More...
#include "em_device.h"
#include <stdbool.h>
#include "em_bitband.h"
Go to the source code of this file.
Defines | |
#define | cmuClkDiv_1 1 |
#define | cmuClkDiv_2 2 |
#define | cmuClkDiv_4 4 |
#define | cmuClkDiv_8 8 |
#define | cmuClkDiv_16 16 |
#define | cmuClkDiv_32 32 |
#define | cmuClkDiv_64 64 |
#define | cmuClkDiv_128 128 |
#define | cmuClkDiv_256 256 |
#define | cmuClkDiv_512 512 |
#define | cmuClkDiv_1024 1024 |
#define | cmuClkDiv_2048 2048 |
#define | cmuClkDiv_4096 4096 |
#define | cmuClkDiv_8192 8192 |
#define | cmuClkDiv_16384 16384 |
#define | cmuClkDiv_32768 32768 |
Typedefs | |
typedef uint32_t | CMU_ClkDiv_TypeDef |
Enumerations | |
enum | CMU_HFRCOBand_TypeDef { cmuHFRCOBand_1MHz = _CMU_HFRCOCTRL_BAND_1MHZ, cmuHFRCOBand_7MHz = _CMU_HFRCOCTRL_BAND_7MHZ, cmuHFRCOBand_11MHz = _CMU_HFRCOCTRL_BAND_11MHZ, cmuHFRCOBand_14MHz = _CMU_HFRCOCTRL_BAND_14MHZ, cmuHFRCOBand_21MHz = _CMU_HFRCOCTRL_BAND_21MHZ } |
enum | CMU_Clock_TypeDef { cmuClock_HF, cmuClock_DBG, cmuClock_AUX, cmuClock_HFPER, cmuClock_USART0, cmuClock_USART1, cmuClock_USART2, cmuClock_UART0, cmuClock_UART1, cmuClock_TIMER0, cmuClock_TIMER1, cmuClock_TIMER2, cmuClock_TIMER3, cmuClock_ACMP0, cmuClock_ACMP1, cmuClock_PRS, cmuClock_DAC0, cmuClock_GPIO, cmuClock_VCMP, cmuClock_ADC0, cmuClock_I2C0, cmuClock_I2C1, cmuClock_CORE, cmuClock_AES, cmuClock_DMA, cmuClock_CORELE, cmuClock_EBI, cmuClock_USBC, cmuClock_USB, cmuClock_LFA, cmuClock_RTC, cmuClock_LETIMER0, cmuClock_LCDpre, cmuClock_LCD, cmuClock_PCNT0, cmuClock_PCNT1, cmuClock_PCNT2, cmuClock_LESENSE, cmuClock_LFB, cmuClock_LEUART0, cmuClock_LEUART1 } |
enum | CMU_Osc_TypeDef { cmuOsc_LFXO, cmuOsc_LFRCO, cmuOsc_HFXO, cmuOsc_HFRCO, cmuOsc_AUXHFRCO, cmuOsc_ULFRCO } |
enum | CMU_Select_TypeDef { cmuSelect_Error, cmuSelect_Disabled, cmuSelect_LFXO, cmuSelect_LFRCO, cmuSelect_HFXO, cmuSelect_HFRCO, cmuSelect_CORELEDIV2, cmuSelect_AUXHFRCO, cmuSelect_HFCLK, cmuSelect_ULFRCO } |
Functions | |
void | CMU_ClockEnable (CMU_Clock_TypeDef clock, bool enable) |
Enable/disable a clock. | |
uint32_t | CMU_ClockFreqGet (CMU_Clock_TypeDef clock) |
Get clock frequency for a clock point. | |
CMU_ClkDiv_TypeDef | CMU_ClockDivGet (CMU_Clock_TypeDef clock) |
Get clock divisor/prescaler. | |
CMU_Select_TypeDef | CMU_ClockSelectGet (CMU_Clock_TypeDef clock) |
Get currently selected reference clock used for a clock branch. | |
void | CMU_ClockDivSet (CMU_Clock_TypeDef clock, CMU_ClkDiv_TypeDef div) |
Set clock divisor/prescaler. | |
void | CMU_ClockSelectSet (CMU_Clock_TypeDef clock, CMU_Select_TypeDef ref) |
Select reference clock/oscillator used for a clock branch. | |
CMU_HFRCOBand_TypeDef | CMU_HFRCOBandGet (void) |
Get HFRCO band in use. | |
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. | |
void | CMU_HFRCOStartupDelaySet (uint32_t delay) |
Set the HFRCO startup delay. | |
uint32_t | CMU_HFRCOStartupDelayGet (void) |
Get the HFRCO startup delay. | |
void | CMU_OscillatorEnable (CMU_Osc_TypeDef osc, bool enable, bool wait) |
Enable/disable oscillator. | |
uint32_t | CMU_OscillatorTuningGet (CMU_Osc_TypeDef osc) |
Get oscillator frequency tuning setting. | |
void | CMU_OscillatorTuningSet (CMU_Osc_TypeDef osc, uint32_t val) |
Set the oscillator frequency tuning control. | |
bool | CMU_PCNTClockExternalGet (unsigned int inst) |
Determine if currently selected PCNTn clock used is external or LFBCLK. | |
void | CMU_PCNTClockExternalSet (unsigned int inst, bool external) |
Select PCNTn clock. | |
uint32_t | CMU_LCDClkFDIVGet (void) |
Get the LCD framerate divisor (FDIV) setting. | |
void | CMU_LCDClkFDIVSet (uint32_t div) |
Set the LCD framerate divisor (FDIV) setting. | |
void | CMU_FreezeEnable (bool enable) |
CMU low frequency register synchronization freeze control. | |
uint32_t | CMU_Calibrate (uint32_t HFCycles, CMU_Osc_TypeDef ref) |
Calibrate clock. | |
__STATIC_INLINE void | CMU_IntClear (uint32_t flags) |
Clear one or more pending CMU interrupts. | |
__STATIC_INLINE void | CMU_IntDisable (uint32_t flags) |
Disable one or more CMU interrupts. | |
__STATIC_INLINE void | CMU_IntEnable (uint32_t flags) |
Enable one or more CMU interrupts. | |
__STATIC_INLINE uint32_t | CMU_IntGet (void) |
Get pending CMU interrupts. | |
__STATIC_INLINE uint32_t | CMU_IntGetEnabled (void) |
Get enabled and pending CMU interrupt flags. | |
__STATIC_INLINE void | CMU_IntSet (uint32_t flags) |
Set one or more pending CMU interrupts from SW. | |
__STATIC_INLINE void | CMU_Lock (void) |
Lock the CMU in order to protect some of its registers against unintended modification. | |
__STATIC_INLINE void | CMU_Unlock (void) |
Unlock the CMU so that writing to locked registers again is possible. | |
__STATIC_INLINE uint32_t | CMU_CalibrateCountGet (void) |
Get calibration count register. | |
__STATIC_INLINE void | CMU_CalibrateStart (void) |
Starts calibration. |
Clock management unit (CMU) API.
(C) Copyright 2014 Silicon Labs, 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:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution.
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.