494 uint32_t reg32 =
RCC_CCIPR & ~(mask << shift);
#define cm3_assert_not_reached()
Check if unreachable code is reached.
void flash_prefetch_enable(void)
This buffer is used for instruction fetches and may or may not be enabled by default,...
void flash_set_ws(uint32_t ws)
Set the Number of Wait States.
void pwr_set_vos_scale(enum pwr_vos_scale scale)
#define RCC_CCIPR_I2C1SEL_SHIFT
#define RCC_CCIPR_I2C3SEL_SHIFT
#define RCC_CCIPR_USART1SEL_SHIFT
#define RCC_CCIPR_LPUART1SEL_SHIFT
#define RCC_CCIPR_USART2SEL_SHIFT
#define RCC_CCIPR_USARTxSEL_PCLK
#define RCC_CCIPR_USARTxSEL_SYSCLK
#define RCC_CCIPR_USARTxSEL_HSI
#define RCC_CFGR_PPRE2_NODIV
#define RCC_CFGR_PPRE1_NODIV
#define RCC_ICSCR_MSIRANGE_SHIFT
#define RCC_CFGR_PPRE1_MASK
#define RCC_CFGR_PPRE2_SHIFT
#define RCC_CFGR_PLLSRC_HSE_CLK
#define RCC_CRRCR_HSI48ON
#define RCC_CICR_HSI16RDYC
#define RCC_CIFR_HSI48RDYF
#define RCC_CFGR_PPRE2_MASK
#define RCC_CFGR_PLLDIV_MASK
#define RCC_CFGR_HPRE_MASK
#define RCC_CCIPR_I2CxSEL_MASK
#define RCC_CIER_HSI16RDYIE
#define RCC_CCIPR_HSI48SEL
#define RCC_CIER_HSI48RDYIE
#define RCC_CICR_HSI48RDYC
#define RCC_CIER_LSERDYIE
#define RCC_CCIPR_LPTIM1SEL_MASK
#define RCC_CFGR_PLLDIV_SHIFT
#define RCC_CCIPR_USARTxSEL_MASK
#define RCC_CCIPR_LPTIM1SEL_SHIFT
void rcc_periph_clock_enable(enum rcc_periph_clken clken)
Enable Peripheral Clock in running mode.
#define RCC_CCIPR_LPUARTxSEL_MASK
#define RCC_CIER_MSIRDYIE
#define RCC_CFGR_SW_HSI16
#define RCC_CFGR_PLLMUL_SHIFT
#define RCC_CRRCR_HSI48RDY
#define RCC_CFGR_HPRE_SHIFT
#define RCC_CFGR_PLLMUL_MASK
#define RCC_CIER_LSIRDYIE
#define RCC_CIFR_HSI16RDYF
#define RCC_CIER_PLLRDYIE
#define RCC_CIER_HSERDYIE
#define RCC_ICSCR_MSIRANGE_MASK
#define RCC_CFGR_PPRE1_SHIFT
uint16_t rcc_get_div_from_hpre(uint8_t div_val)
This will return the divisor 1/2/4/8/16/64/128/256/512 which is set as a 4-bit value,...
void rcc_set_pll_divider(uint32_t factor)
RCC Set the PLL Division Factor.
int rcc_osc_ready_int_flag(enum rcc_osc osc)
RCC Read the Oscillator Ready Interrupt Flag.
void rcc_set_msi_range(uint32_t msi_range)
Set the range of the MSI oscillator.
void rcc_set_lpuart1_sel(uint32_t lpuart1_sel)
Set the LPUART1 clock source.
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.
static uint32_t rcc_uart_i2c_clksel_freq_hz(uint32_t apb_clk, uint8_t shift)
bool rcc_is_osc_ready(enum rcc_osc osc)
Is the given oscillator ready?
uint32_t rcc_get_spi_clk_freq(uint32_t spi)
Get the peripheral clock speed for the SPI device at base specified.
uint32_t rcc_apb2_frequency
void rcc_set_pll_source(uint32_t pllsrc)
Set the pll source.
uint32_t rcc_get_timer_clk_freq(uint32_t timer)
Get the peripheral clock speed for the Timer at base specified.
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)
RCC Setup PLL and use it as Sysclk source.
void rcc_osc_ready_int_enable(enum rcc_osc osc)
RCC Enable the Oscillator Ready Interrupt.
void rcc_set_usart1_sel(uint32_t usart1_sel)
Set the USART1 clock source.
void rcc_set_usart2_sel(uint32_t usart2_sel)
Set the USART2 clock source.
void rcc_set_hsi48_source_pll(void)
RCC Set HSI48 clock source to the PLL.
void rcc_set_peripheral_clk_sel(uint32_t periph, uint32_t sel)
Set the peripheral clock source.
void rcc_osc_ready_int_disable(enum rcc_osc osc)
RCC Disable the Oscillator Ready Interrupt.
void rcc_osc_on(enum rcc_osc osc)
uint32_t rcc_ahb_frequency
void rcc_osc_off(enum rcc_osc osc)
uint32_t rcc_get_i2c_clk_freq(uint32_t i2c)
Get the peripheral clock speed for the I2C device at base specified.
uint32_t rcc_apb1_frequency
void rcc_set_lptim1_sel(uint32_t lptim1_sel)
Set the LPTIM1 clock source.
void rcc_set_ppre2(uint32_t ppre)
RCC Set the APB2 Prescale Factor.
void rcc_set_hsi48_source_rc48(void)
RCC Set HSI48 clock source to the RC48 (CRS)
void rcc_set_hpre(uint32_t hpre)
RCC Set the AHB Prescale Factor.
void rcc_set_ppre1(uint32_t ppre)
RCC Set the APB1 Prescale Factor.
void rcc_set_pll_multiplier(uint32_t factor)
RCC Set the PLL Multiplication Factor.
void rcc_set_sysclk_source(enum rcc_osc osc)
RCC Set the Source for the System Clock.
enum pwr_vos_scale voltage_scale