arch/arm/src/: Problem: stm32f30xx hangs waiting for LSE to initialize. Reason for hang is that operation of setting LSE_ON does not take effect because there is no clock on PWR peripheral. this is initialized later in the code
This commit is contained in:
parent
7ae14be1de
commit
da6dcb06b7
@ -7365,6 +7365,7 @@ choice
|
|||||||
|
|
||||||
config RTC_LSECLOCK
|
config RTC_LSECLOCK
|
||||||
bool "LSE clock"
|
bool "LSE clock"
|
||||||
|
select STM32_PWR
|
||||||
---help---
|
---help---
|
||||||
Drive the RTC with the LSE clock
|
Drive the RTC with the LSE clock
|
||||||
|
|
||||||
|
@ -660,6 +660,15 @@ static void stm32_stdclockconfig(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_RTC_LSECLOCK)
|
#if defined(CONFIG_RTC_LSECLOCK)
|
||||||
|
/* Normally peripheral clocks are enabled later in bootup, but we need
|
||||||
|
* clock on PWR *now* as without this setting registers that enable LSE
|
||||||
|
* won't work
|
||||||
|
*/
|
||||||
|
|
||||||
|
regval = getreg32(STM32_RCC_APB1ENR);
|
||||||
|
regval |= RCC_APB1ENR_PWREN;
|
||||||
|
putreg32(regval, STM32_RCC_APB1ENR);
|
||||||
|
|
||||||
/* Low speed external clock source LSE
|
/* Low speed external clock source LSE
|
||||||
*
|
*
|
||||||
* TODO: There is another case where the LSE needs to
|
* TODO: There is another case where the LSE needs to
|
||||||
|
Loading…
Reference in New Issue
Block a user