drivers: clock: stm32 clock control with low power modes
This will export the stm32_clock_control_init function to restore the clocks after the low power modes. Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
f561c87023
commit
fc41846935
2 changed files with 19 additions and 1 deletions
|
@ -318,7 +318,20 @@ static inline void stm32_clock_control_mco_init(void)
|
|||
#endif /* CONFIG_CLOCK_STM32_MCO2_SRC_NOCLOCK */
|
||||
}
|
||||
|
||||
static int stm32_clock_control_init(const struct device *dev)
|
||||
|
||||
/**
|
||||
* @brief Initialize clocks for the stm32
|
||||
*
|
||||
* This routine is called to enable and configure the clocks and PLL
|
||||
* of the soc on the board. It depends on the board definition.
|
||||
* This function is called on the startup and also to restore the config
|
||||
* when exiting for low power mode.
|
||||
*
|
||||
* @param dev clock device struct
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
int stm32_clock_control_init(const struct device *dev)
|
||||
{
|
||||
LL_UTILS_ClkInitTypeDef s_ClkInitStruct;
|
||||
uint32_t hclk_prescaler;
|
||||
|
|
|
@ -30,10 +30,15 @@
|
|||
#define MCO2_SOURCE LL_RCC_MCO2SOURCE_PLLCLK
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL
|
||||
void config_pll_init(LL_UTILS_PLLInitTypeDef *pllinit);
|
||||
#endif /* CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL */
|
||||
void config_enable_default_clocks(void);
|
||||
|
||||
/* Section for functions not available in every Cube packages */
|
||||
void LL_RCC_MSI_Disable(void);
|
||||
|
||||
/* function exported to the soc power.c */
|
||||
int stm32_clock_control_init(const struct device *dev);
|
||||
|
||||
#endif /* ZEPHYR_DRIVERS_CLOCK_CONTROL_STM32_LL_CLOCK_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue