libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
cmu_common.c File Reference
Include dependency graph for cmu_common.c:

Go to the source code of this file.

Macros

#define _CMU_REG(i)   MMIO32(CMU_BASE + ((i) >> 5))
 
#define _CMU_BIT(i)   (1 << ((i) & 0x1f))
 

Functions

void cmu_enable_lock (void)
 Enable CMU registers lock. More...
 
void cmu_disable_lock (void)
 Disable CMU registers lock. More...
 
bool cmu_get_lock_flag (void)
 Get CMU register lock flag. More...
 
void cmu_periph_clock_enable (enum cmu_periph_clken clken)
 Enable Peripheral Clock in running mode. More...
 
void cmu_periph_clock_disable (enum cmu_periph_clken clken)
 Disable Peripheral Clock in running mode. More...
 
void cmu_osc_on (enum cmu_osc osc)
 Turn on Oscillator. More...
 
void cmu_osc_off (enum cmu_osc osc)
 Turn off Oscillator. More...
 
bool cmu_osc_ready_flag (enum cmu_osc osc)
 Get Oscillator read flag. More...
 
void cmu_wait_for_osc_ready (enum cmu_osc osc)
 Wait till oscillator is not ready. More...
 
void cmu_set_hfclk_source (enum cmu_osc osc)
 Set HFCLK clock source. More...
 
enum cmu_osc cmu_get_hfclk_source (void)
 
void cmu_clock_setup_in_hfxo_out_48mhz (void)
 HFXO output 48Mhz and core running at 48Mhz. More...