71 .flash_waitstates = 2,
72 .ahb_frequency = 72000000,
73 .apb1_frequency = 36000000,
74 .apb2_frequency = 72000000,
84 .flash_waitstates = 2,
86 .ahb_frequency = 72e6,
87 .apb1_frequency = 36e6,
88 .apb2_frequency = 72e6,
98 .flash_waitstates = 2,
104 .ahb_frequency = 72e6,
105 .apb1_frequency = 36e6,
106 .apb2_frequency = 72e6,
116 .flash_waitstates = 0,
118 .ahb_frequency = 24e6,
119 .apb1_frequency = 24e6,
120 .apb2_frequency = 24e6,
130 .flash_waitstates = 2,
132 .ahb_frequency = 72e6,
133 .apb1_frequency = 36e6,
134 .apb2_frequency = 72e6,
148 .flash_waitstates = 0,
149 .ahb_frequency = 24e6,
150 .apb1_frequency = 24e6,
151 .apb2_frequency = 24e6,
163 .flash_waitstates = 1,
164 .ahb_frequency = 48e6,
165 .apb1_frequency = 24e6,
166 .apb2_frequency = 48e6,
177 .flash_waitstates = 2,
178 .ahb_frequency = 64e6,
179 .apb1_frequency = 32e6,
180 .apb2_frequency = 64e6,
585 switch (clock_source) {
#define cm3_assert_not_reached()
Check if unreachable code is reached.
void flash_set_ws(uint32_t ws)
Set the Number of Wait States.
#define FLASH_ACR_LATENCY_0WS
#define FLASH_ACR_LATENCY_2WS
#define FLASH_ACR_LATENCY_1WS
#define RCC_CFGR_ADCPRE_DIV8
#define RCC_CFGR_ADCPRE_DIV6
#define RCC_CFGR_ADCPRE_DIV2
#define RCC_CFGR_HPRE_NODIV
#define RCC_CFGR_PPRE_DIV2
#define RCC_CFGR_PPRE_NODIV
#define RCC_CFGR_PPRE2_HCLK_NODIV
#define RCC_CFGR_PPRE1_HCLK_NODIV
#define RCC_CFGR_PLLXTPRE_HSE_CLK_DIV2
#define RCC_CFGR_PLLXTPRE_HSE_CLK
#define RCC_CFGR_PLLSRC_HSE_CLK
#define RCC_CFGR_PLLSRC_PREDIV1_CLK
#define RCC_CFGR_PLLSRC_HSI_CLK_DIV2
#define RCC_CFGR_PLLMUL_PLL_CLK_MUL16
#define RCC_CFGR_PLLMUL_PLL_CLK_MUL3
#define RCC_CFGR_PLLMUL_PLL_CLK_MUL6
#define RCC_CFGR_PLLMUL_PLL_CLK_MUL9
#define RCC_CFGR_PLLMUL_PLL_CLK_MUL12
#define RCC_CFGR_SW_SYSCLKSEL_HSICLK
#define RCC_CFGR_SW_SYSCLKSEL_PLLCLK
#define RCC_CFGR_SW_SYSCLKSEL_HSECLK
#define RCC_CFGR_USBPRE_PLL_CLK_NODIV
#define RCC_CFGR2_PREDIV1SRC_PLL2_CLK
#define RCC_CFGR2_PLL2MUL_PLL2_CLK_MUL8
#define RCC_CFGR_PPRE1_MASK
#define RCC_CFGR_PPRE2_SHIFT
#define RCC_CFGR2_PREDIV1_SHIFT
#define RCC_CFGR_PPRE2_MASK
#define RCC_CFGR2_PREDIV_DIV5
#define RCC_CIR_PLL2RDYIE
#define RCC_CFGR2_PLL3MUL_SHIFT
#define RCC_CFGR2_PREDIV_NODIV
#define RCC_CFGR2_PREDIV_DIV2
#define RCC_CIR_PLL3RDYIE
#define RCC_CFGR_USBPRE_PLL_VCO_CLK_DIV3
#define RCC_CFGR2_PREDIV1SRC
#define RCC_CFGR_SWS_SHIFT
#define RCC_CFGR_PLLMUL_SHIFT
#define RCC_CFGR2_PLL2MUL_SHIFT
#define RCC_CFGR_HPRE_SHIFT
#define RCC_CFGR2_PREDIV2_DIV5
#define RCC_CFGR_SW_SHIFT
#define RCC_CFGR2_PREDIV2_SHIFT
#define RCC_CFGR_ADCPRE_SHIFT
#define RCC_CFGR_PPRE1_SHIFT
int rcc_osc_ready_int_flag(enum rcc_osc osc)
RCC Read the Oscillator Ready Interrupt Flag.
int rcc_css_int_flag(void)
RCC Read the Clock Security System Interrupt Flag.
void rcc_set_adcpre(uint32_t adcpre)
ADC Setup the A/D Clock.
void rcc_set_rtc_clock_source(enum rcc_osc clock_source)
RCC Set the Source for the RTC clock.
void rcc_osc_ready_int_clear(enum rcc_osc osc)
RCC Clear the Oscillator Ready Interrupt Flag.
void rcc_wait_for_osc_ready(enum rcc_osc osc)
Wait for Oscillator Ready.
void rcc_css_disable(void)
RCC Disable the Clock Security System.
bool rcc_is_osc_ready(enum rcc_osc osc)
Is the given oscillator ready?
void rcc_clock_setup_in_hse_8mhz_out_24mhz(void)
RCC Set System Clock PLL at 24MHz from HSE at 8MHz.
void rcc_set_sysclk_source(uint32_t clk)
RCC Set the Source for the System Clock.
void rcc_set_prediv1_source(uint32_t rccsrc)
uint32_t rcc_apb2_frequency
void rcc_set_pll_source(uint32_t pllsrc)
RCC Set the PLL Clock Source.
void rcc_set_prediv1(uint32_t prediv)
uint32_t rcc_get_timer_clk_freq(uint32_t timer)
Get the peripheral clock speed for the Timer at base specified.
uint32_t rcc_system_clock_source(void)
RCC Get the System Clock Source.
void rcc_set_prediv2(uint32_t prediv)
uint32_t rcc_get_usart_clk_freq(uint32_t usart)
Get the peripheral clock speed for the USART at base specified.
void rcc_clock_setup_pll(const struct rcc_clock_scale *clock)
Switch sysclock to PLL with the given parameters.
const struct rcc_clock_scale rcc_hsi_configs[RCC_CLOCK_HSI_END]
void rcc_set_pll3_multiplication_factor(uint32_t mul)
RCC Set the PLL3 Multiplication Factor.
void rcc_clock_setup_in_hsi_out_24mhz(void)
RCC Set System Clock PLL at 24MHz from HSI.
void rcc_set_pll2_multiplication_factor(uint32_t mul)
RCC Set the PLL2 Multiplication Factor.
void rcc_osc_ready_int_enable(enum rcc_osc osc)
RCC Enable the Oscillator Ready Interrupt.
void rcc_clock_setup_in_hse_8mhz_out_72mhz(void)
RCC Set System Clock PLL at 72MHz from HSE at 8MHz.
void rcc_osc_ready_int_disable(enum rcc_osc osc)
RCC Disable the Oscillator Ready Interrupt.
void rcc_osc_on(enum rcc_osc osc)
RCC Turn on an Oscillator.
uint32_t rcc_ahb_frequency
void rcc_osc_off(enum rcc_osc osc)
RCC Turn off an Oscillator.
uint32_t rcc_get_i2c_clk_freq(uint32_t i2c)
Get the peripheral clock speed for the I2C device at base specified.
void rcc_set_pll_multiplication_factor(uint32_t mul)
RCC Set the PLL Multiplication Factor.
const struct rcc_clock_scale rcc_hse_configs[RCC_CLOCK_HSE_END]
void rcc_backupdomain_reset(void)
RCC Reset the Backup Domain.
uint32_t rcc_apb1_frequency
Set the default clock frequencies.
void rcc_set_ppre1(uint32_t ppre1)
RCC Set the APB1 Prescale Factor.
void rcc_css_int_clear(void)
RCC Clear the Clock Security System Interrupt Flag.
void rcc_enable_rtc_clock(void)
RCC Enable the RTC clock.
void rcc_set_ppre2(uint32_t ppre2)
RCC Set the APB2 Prescale Factor.
void rcc_set_usbpre(uint32_t usbpre)
RCC Set the USB Prescale Factor.
void rcc_clock_setup_in_hsi_out_48mhz(void)
RCC Set System Clock PLL at 48MHz from HSI.
void rcc_css_enable(void)
RCC Enable the Clock Security System.
void rcc_set_hpre(uint32_t hpre)
RCC Set the AHB Prescale Factor.
void rcc_set_pllxtpre(uint32_t pllxtpre)
RCC Set the HSE Frequency Divider used as PLL Clock Source.
void rcc_clock_setup_in_hse_12mhz_out_72mhz(void)
RCC Set System Clock PLL at 72MHz from HSE at 12MHz.
void rcc_clock_setup_in_hse_25mhz_out_72mhz(void)
RCC Set System Clock PLL at 72MHz from HSE at 25MHz.
void rcc_clock_setup_in_hsi_out_64mhz(void)
RCC Set System Clock PLL at 64MHz from HSI.
void rcc_clock_setup_in_hse_16mhz_out_72mhz(void)
RCC Set System Clock PLL at 72MHz from HSE at 16MHz.
uint32_t rcc_rtc_clock_enabled_flag(void)
RCC RTC Clock Enabled Flag.