drivers/clock_control: stm32: Fixes around LSE clock
Fix macro used in g4 file to enable LSE clock. Then, to avoid no-op configurations, generate an error when MSI Hardware auto calibration is selected but LSE clock is not enabled. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
84c5a469ab
commit
7650d917a2
2 changed files with 5 additions and 1 deletions
|
@ -462,6 +462,10 @@ int stm32_clock_control_init(const struct device *dev)
|
|||
LL_RCC_MSI_SetCalibTrimming(0);
|
||||
|
||||
#if STM32_MSI_PLL_MODE
|
||||
|
||||
#ifndef STM32_LSE_CLOCK
|
||||
#error "MSI Hardware auto calibration requires LSE clock activation"
|
||||
#endif
|
||||
/* Enable MSI hardware auto calibration */
|
||||
LL_RCC_MSI_EnablePLLMode();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue