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_osc { RCC_PLL , RCC_PLL2 , RCC_PLL3 , RCC_HSE , RCC_HSI , RCC_LSE , RCC_LSI } |
enum | rcc_periph_clken { RCC_DMA1 = _REG_BIT(0x14, 0) , RCC_DMA2 = _REG_BIT(0x14, 1) , RCC_SRAM = _REG_BIT(0x14, 2) , RCC_FLTF = _REG_BIT(0x14, 4) , RCC_CRC = _REG_BIT(0x14, 6) , RCC_FSMC = _REG_BIT(0x14, 8) , RCC_SDIO = _REG_BIT(0x14, 10) , RCC_OTGFS = _REG_BIT(0x14, 12) , RCC_ETHMAC = _REG_BIT(0x14, 14) , RCC_ETHMACTX = _REG_BIT(0x14, 15) , RCC_ETHMACRX = _REG_BIT(0x14, 16) , RCC_AFIO = _REG_BIT(0x18, 0) , RCC_GPIOA = _REG_BIT(0x18, 2) , RCC_GPIOB = _REG_BIT(0x18, 3) , RCC_GPIOC = _REG_BIT(0x18, 4) , RCC_GPIOD = _REG_BIT(0x18, 5) , RCC_GPIOE = _REG_BIT(0x18, 6) , RCC_GPIOF = _REG_BIT(0x18, 7) , RCC_GPIOG = _REG_BIT(0x18, 8) , RCC_ADC1 = _REG_BIT(0x18, 9) , RCC_ADC2 = _REG_BIT(0x18, 10) , RCC_TIM1 = _REG_BIT(0x18, 11) , RCC_SPI1 = _REG_BIT(0x18, 12) , RCC_TIM8 = _REG_BIT(0x18, 13) , RCC_USART1 = _REG_BIT(0x18, 14) , RCC_ADC3 = _REG_BIT(0x18, 15) , RCC_TIM15 = _REG_BIT(0x18, 16) , RCC_TIM16 = _REG_BIT(0x18, 17) , RCC_TIM17 = _REG_BIT(0x18, 18) , RCC_TIM9 = _REG_BIT(0x18, 19) , RCC_TIM10 = _REG_BIT(0x18, 20) , RCC_TIM11 = _REG_BIT(0x18, 21) , RCC_TIM2 = _REG_BIT(0x1C, 0) , RCC_TIM3 = _REG_BIT(0x1C, 1) , RCC_TIM4 = _REG_BIT(0x1C, 2) , RCC_TIM5 = _REG_BIT(0x1C, 3) , RCC_TIM6 = _REG_BIT(0x1C, 4) , RCC_TIM7 = _REG_BIT(0x1C, 5) , RCC_TIM12 = _REG_BIT(0x1C, 6) , RCC_TIM13 = _REG_BIT(0x1C, 7) , 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_USART3 = _REG_BIT(0x1C, 18) , RCC_UART4 = _REG_BIT(0x1C, 19) , RCC_UART5 = _REG_BIT(0x1C, 20) , RCC_I2C1 = _REG_BIT(0x1C, 21) , RCC_I2C2 = _REG_BIT(0x1C, 22) , RCC_USB = _REG_BIT(0x1C, 23) , RCC_CAN = _REG_BIT(0x1C, 25) , RCC_CAN1 = _REG_BIT(0x1C, 25) , RCC_CAN2 = _REG_BIT(0x1C, 26) , RCC_BKP = _REG_BIT(0x1C, 27) , RCC_PWR = _REG_BIT(0x1C, 28) , RCC_DAC = _REG_BIT(0x1C, 29) , RCC_CEC = _REG_BIT(0x1C, 30) } |
enum | rcc_periph_rst { RST_OTGFS = _REG_BIT(0x28, 12) , RST_ETHMAC = _REG_BIT(0x28, 14) , RST_AFIO = _REG_BIT(0x0c, 0) , RST_GPIOA = _REG_BIT(0x0c, 2) , RST_GPIOB = _REG_BIT(0x0c, 3) , RST_GPIOC = _REG_BIT(0x0c, 4) , RST_GPIOD = _REG_BIT(0x0c, 5) , RST_GPIOE = _REG_BIT(0x0c, 6) , RST_GPIOF = _REG_BIT(0x0c, 7) , RST_GPIOG = _REG_BIT(0x0c, 8) , RST_ADC1 = _REG_BIT(0x0c, 9) , RST_ADC2 = _REG_BIT(0x0c, 10) , RST_TIM1 = _REG_BIT(0x0c, 11) , RST_SPI1 = _REG_BIT(0x0c, 12) , RST_TIM8 = _REG_BIT(0x0c, 13) , RST_USART1 = _REG_BIT(0x0c, 14) , RST_ADC3 = _REG_BIT(0x0c, 15) , RST_TIM15 = _REG_BIT(0x0c, 16) , RST_TIM16 = _REG_BIT(0x0c, 17) , RST_TIM17 = _REG_BIT(0x0c, 18) , RST_TIM9 = _REG_BIT(0x0c, 19) , RST_TIM10 = _REG_BIT(0x0c, 20) , RST_TIM11 = _REG_BIT(0x0c, 21) , RST_TIM2 = _REG_BIT(0x10, 0) , RST_TIM3 = _REG_BIT(0x10, 1) , RST_TIM4 = _REG_BIT(0x10, 2) , RST_TIM5 = _REG_BIT(0x10, 3) , RST_TIM6 = _REG_BIT(0x10, 4) , RST_TIM7 = _REG_BIT(0x10, 5) , RST_TIM12 = _REG_BIT(0x10, 6) , RST_TIM13 = _REG_BIT(0x10, 7) , 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_USART3 = _REG_BIT(0x10, 18) , RST_UART4 = _REG_BIT(0x10, 19) , RST_UART5 = _REG_BIT(0x10, 20) , RST_I2C1 = _REG_BIT(0x10, 21) , RST_I2C2 = _REG_BIT(0x10, 22) , RST_USB = _REG_BIT(0x10, 23) , RST_CAN = _REG_BIT(0x10, 25) , RST_CAN1 = _REG_BIT(0x10, 25) , RST_CAN2 = _REG_BIT(0x10, 26) , RST_BKP = _REG_BIT(0x10, 27) , RST_PWR = _REG_BIT(0x10, 28) , RST_DAC = _REG_BIT(0x10, 29) , RST_CEC = _REG_BIT(0x10, 30) } |
enum | rcc_clock_hsi { RCC_CLOCK_HSI_24MHZ , RCC_CLOCK_HSI_48MHZ , RCC_CLOCK_HSI_64MHZ , RCC_CLOCK_HSI_END } |
enum | rcc_clock_hse { RCC_CLOCK_HSE12_72MHZ , RCC_CLOCK_HSE16_72MHZ , RCC_CLOCK_HSE25_72MHZ , RCC_CLOCK_HSE8_24MHZ , RCC_CLOCK_HSE8_72MHZ , RCC_CLOCK_HSE_END } |
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_pll2_multiplication_factor (uint32_t mul) |
RCC Set the PLL2 Multiplication Factor. More... | |
void | rcc_set_pll3_multiplication_factor (uint32_t mul) |
RCC Set the PLL3 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 ppre2) |
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_prediv1 (uint32_t prediv) |
void | rcc_set_prediv2 (uint32_t prediv) |
void | rcc_set_prediv1_source (uint32_t rccsrc) |
uint32_t | rcc_system_clock_source (void) |
RCC Get the System Clock Source. More... | |
void | rcc_clock_setup_in_hsi_out_64mhz (void) LIBOPENCM3_DEPRECATED("use rcc_clock_setup_pll( &rcc_hsi_configs[RCC_CLOCK_HSI_64MHZ])") |
void | rcc_clock_setup_in_hsi_out_48mhz (void) LIBOPENCM3_DEPRECATED("use rcc_clock_setup_pll( &rcc_hsi_configs[RCC_CLOCK_HSI_48MHZ])") |
void | rcc_clock_setup_in_hsi_out_24mhz (void) LIBOPENCM3_DEPRECATED("use rcc_clock_setup_pll( &rcc_hsi_configs[RCC_CLOCK_HSI_24MHZ])") |
void | rcc_clock_setup_in_hse_8mhz_out_24mhz (void) LIBOPENCM3_DEPRECATED("use rcc_clock_setup_pll( &rcc_hse_configs[RCC_CLOCK_HSE8_24MHZ])") |
void | rcc_clock_setup_in_hse_8mhz_out_72mhz (void) LIBOPENCM3_DEPRECATED("use rcc_clock_setup_pll( &rcc_hse_configs[RCC_CLOCK_HSE8_72MHZ])") |
void | rcc_clock_setup_in_hse_12mhz_out_72mhz (void) LIBOPENCM3_DEPRECATED("use rcc_clock_setup_pll( &rcc_hse_configs[RCC_CLOCK_HSE12_72MHZ])") |
void | rcc_clock_setup_in_hse_16mhz_out_72mhz (void) LIBOPENCM3_DEPRECATED("use rcc_clock_setup_pll( &rcc_hse_configs[RCC_CLOCK_HSE16_72MHZ])") |
void | rcc_clock_setup_in_hse_25mhz_out_72mhz (void) LIBOPENCM3_DEPRECATED("use rcc_clock_setup_pll( &rcc_hse_configs[RCC_CLOCK_HSE25_72MHZ])") |
void | rcc_clock_setup_pll (const struct rcc_clock_scale *clock) |
Switch sysclock to PLL with the given parameters. More... | |
void | rcc_backupdomain_reset (void) |
RCC Reset the Backup Domain. More... | |
uint32_t | rcc_get_usart_clk_freq (uint32_t usart) |
Get the peripheral clock speed for the USART at base specified. More... | |
uint32_t | rcc_get_timer_clk_freq (uint32_t timer) |
Get the peripheral clock speed for the Timer at base specified. More... | |
uint32_t | rcc_get_i2c_clk_freq (uint32_t i2c) |
Get the peripheral clock speed for the I2C device at base specified. More... | |
uint32_t | rcc_get_spi_clk_freq (uint32_t spi) |
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_hse_configs [RCC_CLOCK_HSE_END] |