minor; changes to clocking config to specify the activation of LSE

This commit is contained in:
ziggurat29 2016-03-27 12:13:19 -05:00
parent 03dfb41bba
commit 0629b65e38
2 changed files with 6 additions and 2 deletions

View File

@ -134,6 +134,10 @@
#define STM32L4_USE_CLK48
#define STM32L4_CLK48_SEL RCC_CCIPR_CLK48SEL_PLLSAI1
/* enable the LSE oscillator, used automatically trim the MSI, and for RTC */
#define STM32L4_USE_LSE
/* AHB clock (HCLK) is SYSCLK (80MHz) */
#define STM32L4_RCC_CFGR_HPRE RCC_CFGR_HPRE_SYSCLK /* HCLK = SYSCLK / 1 */

View File

@ -210,14 +210,14 @@ void stm32l4_board_clockconfig(void)
stm32l4_rcc_enablelsi();
#endif
#if defined(CONFIG_RTC_LSECLOCK)
#if defined(STM32L4_USE_LSE)
/* Low speed external clock source LSE
*
* TODO: There is another case where the LSE needs to
* be enabled: if the MCO1 pin selects LSE as source.
*/
stm32l4_pwr_enableclk(true);
stm32l4_rcc_enablelse();
#endif