Recent changes to stm32_rtcc.c do not compile with STM32L15XX configurations. From Jussi Kivilinna.
This commit is contained in:
parent
c74aaafc72
commit
4146fdbe8f
@ -3251,11 +3251,13 @@ config RTC_LSECLOCK
|
|||||||
|
|
||||||
config RTC_LSICLOCK
|
config RTC_LSICLOCK
|
||||||
bool "LSI clock"
|
bool "LSI clock"
|
||||||
|
depends on !STM32_STM32L15XX
|
||||||
---help---
|
---help---
|
||||||
Drive the RTC with the LSI clock
|
Drive the RTC with the LSI clock
|
||||||
|
|
||||||
config RTC_HSECLOCK
|
config RTC_HSECLOCK
|
||||||
bool "HSE clock"
|
bool "HSE clock"
|
||||||
|
depends on !STM32_STM32L15XX
|
||||||
---help---
|
---help---
|
||||||
Drive the RTC with the HSE clock, divided down to 1MHz.
|
Drive the RTC with the HSE clock, divided down to 1MHz.
|
||||||
|
|
||||||
|
@ -51,6 +51,8 @@
|
|||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
|
|
||||||
|
#include "stm32_rcc.h"
|
||||||
|
#include "stm32_pwr.h"
|
||||||
#include "stm32_rtc.h"
|
#include "stm32_rtc.h"
|
||||||
|
|
||||||
#ifdef CONFIG_RTC
|
#ifdef CONFIG_RTC
|
||||||
@ -77,6 +79,14 @@
|
|||||||
# undef CONFIG_DEBUG_RTC
|
# undef CONFIG_DEBUG_RTC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_STM32L15XX
|
||||||
|
# if defined(CONFIG_RTC_HSECLOCK)
|
||||||
|
# error "RTC with HSE clock not yet implemented for STM32L15XXX"
|
||||||
|
# elif defined(CONFIG_RTC_LSICLOCK)
|
||||||
|
# error "RTC with LSI clock not yet implemented for STM32L15XXX"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Constants ************************************************************************/
|
/* Constants ************************************************************************/
|
||||||
|
|
||||||
#define SYNCHRO_TIMEOUT (0x00020000)
|
#define SYNCHRO_TIMEOUT (0x00020000)
|
||||||
@ -435,6 +445,7 @@ static int rtc_setup(void)
|
|||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
#ifndef CONFIG_STM32_STM32L15XX
|
||||||
/* We might be changing RTCSEL - to ensure such changes work, we must reset the
|
/* We might be changing RTCSEL - to ensure such changes work, we must reset the
|
||||||
* backup domain
|
* backup domain
|
||||||
*/
|
*/
|
||||||
@ -475,6 +486,12 @@ static int rtc_setup(void)
|
|||||||
stm32_rcc_enablelse();
|
stm32_rcc_enablelse();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
/* Enable the LSE clock */
|
||||||
|
|
||||||
|
stm32_rcc_enablelse();
|
||||||
|
|
||||||
|
#endif /* CONFIG_STM32_STM32L15XX */
|
||||||
|
|
||||||
/* Wait for the RTC Time and Date registers to be synchronized with RTC APB
|
/* Wait for the RTC Time and Date registers to be synchronized with RTC APB
|
||||||
* clock.
|
* clock.
|
||||||
|
Loading…
Reference in New Issue
Block a user