stm32/h7: Implemented support for the HSI48
This commit is contained in:
committed by
Piotr Esden-Tempski
parent
9f8ce70771
commit
2b6eb047e0
@@ -770,6 +770,13 @@ BEGIN_DECLS
|
||||
*/
|
||||
void rcc_clock_setup_pll(const struct rcc_pll_config *config);
|
||||
|
||||
/**
|
||||
* Setup and bring up the HSI48 for use by the USB controller.
|
||||
*
|
||||
* Note: Should be used with the CRS for stability
|
||||
*/
|
||||
void rcc_clock_setup_hsi48(void);
|
||||
|
||||
/**
|
||||
* Get the clock rate (in Hz) of the specified clock source. There are
|
||||
* numerous clock sources and configurations on the H7, so rates for each
|
||||
|
||||
@@ -226,6 +226,13 @@ void rcc_clock_setup_pll(const struct rcc_pll_config *config) {
|
||||
}
|
||||
}
|
||||
|
||||
void rcc_clock_setup_hsi48(void)
|
||||
{
|
||||
RCC_CR |= RCC_CR_HSI48ON;
|
||||
while (!(RCC_CR & RCC_CR_HSI48RDY))
|
||||
continue;
|
||||
}
|
||||
|
||||
uint32_t rcc_get_bus_clk_freq(enum rcc_clock_source source) {
|
||||
uint32_t clksel;
|
||||
switch (source) {
|
||||
|
||||
Reference in New Issue
Block a user