stm32/h7: Implemented support for the LSI clock source
This commit is contained in:
committed by
Piotr Esden-Tempski
parent
683c35de54
commit
26cb7f0ded
@@ -778,6 +778,11 @@ void rcc_clock_setup_pll(const struct rcc_pll_config *config);
|
|||||||
*/
|
*/
|
||||||
void rcc_clock_setup_hsi48(void);
|
void rcc_clock_setup_hsi48(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup and bring up the LSI.
|
||||||
|
*/
|
||||||
|
void rcc_clock_setup_lsi(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the clock rate (in Hz) of the specified clock source. There are
|
* 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
|
* numerous clock sources and configurations on the H7, so rates for each
|
||||||
|
|||||||
@@ -230,6 +230,13 @@ void rcc_clock_setup_hsi48(void)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void rcc_clock_setup_lsi(void)
|
||||||
|
{
|
||||||
|
RCC_CSR |= RCC_CSR_LSION;
|
||||||
|
while (!(RCC_CSR & RCC_CSR_LSIRDY))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t rcc_get_bus_clk_freq(enum rcc_clock_source source) {
|
uint32_t rcc_get_bus_clk_freq(enum rcc_clock_source source) {
|
||||||
uint32_t clksel;
|
uint32_t clksel;
|
||||||
switch (source) {
|
switch (source) {
|
||||||
|
|||||||
Reference in New Issue
Block a user