libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
#include <libopencm3/stm32/common/rcc_common_all.h>
Go to the source code of this file.
Data Structures | |
struct | rcc_clock_scale |
Enumerations | |
enum | rcc_clock_hsi { RCC_CLOCK_HSI_48MHZ , RCC_CLOCK_HSI_64MHZ , RCC_CLOCK_HSI_END } |
enum | rcc_clock_hse8 { RCC_CLOCK_HSE8_72MHZ , RCC_CLOCK_HSE8_END } |
enum | rcc_osc { RCC_PLL , RCC_HSE , RCC_HSI , RCC_LSE , RCC_LSI } |
enum | rcc_periph_clken { RCC_DMA = _REG_BIT(0x14, 0) , RCC_SRAM = _REG_BIT(0x14, 2) , RCC_FLTF = _REG_BIT(0x14, 4) , RCC_CRC = _REG_BIT(0x14, 6) , RCC_GPIOA = _REG_BIT(0x14, 17) , RCC_GPIOB = _REG_BIT(0x14, 18) , RCC_GPIOC = _REG_BIT(0x14, 19) , RCC_GPIOD = _REG_BIT(0x14, 20) , RCC_GPIOF = _REG_BIT(0x14, 22) , RCC_TSC = _REG_BIT(0x14, 24) , RCC_SYSCFG_COMP = _REG_BIT(0x18, 0) , RCC_ADC = _REG_BIT(0x18, 9) , RCC_TIM1 = _REG_BIT(0x18, 11) , RCC_SPI1 = _REG_BIT(0x18, 12) , RCC_USART1 = _REG_BIT(0x18, 14) , RCC_TIM15 = _REG_BIT(0x18, 16) , RCC_TIM16 = _REG_BIT(0x18, 17) , RCC_TIM17 = _REG_BIT(0x18, 18) , RCC_TIM2 = _REG_BIT(0x1C, 0) , RCC_TIM3 = _REG_BIT(0x1C, 1) , RCC_TIM6 = _REG_BIT(0x1C, 4) , RCC_TIM14 = _REG_BIT(0x1C, 8) , RCC_WWDG = _REG_BIT(0x1C, 11) , RCC_SPI2 = _REG_BIT(0x1C, 14) , RCC_SPI3 = _REG_BIT(0x1C, 15) , RCC_USART2 = _REG_BIT(0x1C, 17) , RCC_I2C1 = _REG_BIT(0x1C, 21) , RCC_I2C2 = _REG_BIT(0x1C, 22) , RCC_USB = _REG_BIT(0x1C, 23) , RCC_PWR = _REG_BIT(0x1C, 28) , RCC_DAC = _REG_BIT(0x1C, 29) , RCC_CEC = _REG_BIT(0x1C, 30) } |
enum | rcc_periph_rst { RST_BACKUPDOMAIN = _REG_BIT(0x20, 16) , RST_GPIOA = _REG_BIT(0x28, 17) , RST_GPIOB = _REG_BIT(0x28, 18) , RST_GPIOC = _REG_BIT(0x28, 19) , RST_GPIOD = _REG_BIT(0x28, 20) , RST_GPIOE = _REG_BIT(0x28, 21) , RST_GPIOF = _REG_BIT(0x28, 22) , RST_TSC = _REG_BIT(0x28, 24) , RST_SYSCFG = _REG_BIT(0x0C, 0) , RST_ADC = _REG_BIT(0x0C, 9) , RST_TIM1 = _REG_BIT(0x0C, 11) , RST_SPI1 = _REG_BIT(0x0C, 12) , RST_USART1 = _REG_BIT(0x0C, 14) , RST_TIM15 = _REG_BIT(0x0C, 16) , RST_TIM16 = _REG_BIT(0x0C, 17) , RST_TIM17 = _REG_BIT(0x0C, 18) , RST_TIM2 = _REG_BIT(0x10, 0) , RST_TIM3 = _REG_BIT(0x10, 1) , RST_TIM6 = _REG_BIT(0x10, 4) , RST_TIM14 = _REG_BIT(0x10, 8) , RST_WWDG = _REG_BIT(0x10, 11) , RST_SPI2 = _REG_BIT(0x10, 14) , RST_SPI3 = _REG_BIT(0x10, 15) , RST_USART2 = _REG_BIT(0x10, 17) , RST_I2C1 = _REG_BIT(0x10, 21) , RST_I2C2 = _REG_BIT(0x10, 22) , RST_USB = _REG_BIT(0x10, 23) , RST_PWR = _REG_BIT(0x10, 28) , RST_DAC = _REG_BIT(0x10, 29) , RST_CEC = _REG_BIT(0x10, 30) } |
Functions | |
void | rcc_osc_ready_int_clear (enum rcc_osc osc) |
RCC Clear the Oscillator Ready Interrupt Flag. More... | |
void | rcc_osc_ready_int_enable (enum rcc_osc osc) |
RCC Enable the Oscillator Ready Interrupt. More... | |
void | rcc_osc_ready_int_disable (enum rcc_osc osc) |
RCC Disable the Oscillator Ready Interrupt. More... | |
int | rcc_osc_ready_int_flag (enum rcc_osc osc) |
RCC Read the Oscillator Ready Interrupt Flag. More... | |
void | rcc_css_int_clear (void) |
RCC Clear the Clock Security System Interrupt Flag. More... | |
int | rcc_css_int_flag (void) |
RCC Read the Clock Security System Interrupt Flag. More... | |
void | rcc_osc_on (enum rcc_osc osc) |
RCC Turn on an Oscillator. More... | |
void | rcc_osc_off (enum rcc_osc osc) |
RCC Turn off an Oscillator. More... | |
void | rcc_css_enable (void) |
RCC Enable the Clock Security System. More... | |
void | rcc_css_disable (void) |
RCC Disable the Clock Security System. More... | |
void | rcc_set_sysclk_source (uint32_t clk) |
RCC Set the Source for the System Clock. More... | |
void | rcc_set_pll_multiplication_factor (uint32_t mul) |
RCC Set the PLL Multiplication Factor. More... | |
void | rcc_set_pll_source (uint32_t pllsrc) |
RCC Set the PLL Clock Source. More... | |
void | rcc_set_pllxtpre (uint32_t pllxtpre) |
RCC Set the HSE Frequency Divider used as PLL Clock Source. More... | |
uint32_t | rcc_rtc_clock_enabled_flag (void) |
RCC RTC Clock Enabled Flag. More... | |
void | rcc_enable_rtc_clock (void) |
RCC Enable the RTC clock. More... | |
void | rcc_set_rtc_clock_source (enum rcc_osc clock_source) |
RCC Set the Source for the RTC clock. More... | |
void | rcc_set_adcpre (uint32_t adcpre) |
ADC Setup the A/D Clock. More... | |
void | rcc_set_ppre2 (uint32_t ppre1) |
RCC Set the APB2 Prescale Factor. More... | |
void | rcc_set_ppre1 (uint32_t ppre1) |
RCC Set the APB1 Prescale Factor. More... | |
void | rcc_set_hpre (uint32_t hpre) |
RCC Set the AHB Prescale Factor. More... | |
void | rcc_set_usbpre (uint32_t usbpre) |
RCC Set the USB Prescale Factor. More... | |
void | rcc_set_prediv (uint32_t prediv) |
uint32_t | rcc_system_clock_source (void) |
RCC Get the System Clock Source. More... | |
void | rcc_clock_setup_pll (const struct rcc_clock_scale *clock) |
Setup clocks to run from PLL. More... | |
void | rcc_backupdomain_reset (void) |
RCC Reset the Backup Domain. More... | |
Variables | |
uint32_t | rcc_ahb_frequency |
uint32_t | rcc_apb1_frequency |
Set the default clock frequencies. More... | |
uint32_t | rcc_apb2_frequency |
const struct rcc_clock_scale | rcc_hsi_configs [RCC_CLOCK_HSI_END] |
const struct rcc_clock_scale | rcc_hse8_configs [RCC_CLOCK_HSE8_END] |