STM32: Logic to reset backup domain only applies if the RTC is enabled.
This commit is contained in:
parent
53ec3ca1a2
commit
865150f666
@ -67,10 +67,6 @@
|
|||||||
|
|
||||||
#define HSERDY_TIMEOUT (100 * CONFIG_BOARD_LOOPSPERMSEC)
|
#define HSERDY_TIMEOUT (100 * CONFIG_BOARD_LOOPSPERMSEC)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -106,7 +102,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: rcc_enablebkp
|
* Name: rcc_resetbkp
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* The RTC needs to reset the Backup Domain to change RTCSEL and resetting the
|
* The RTC needs to reset the Backup Domain to change RTCSEL and resetting the
|
||||||
@ -122,8 +118,8 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_STM32_PWR) && !defined(CONFIG_STM32_STM32F10XX)
|
#if defined(CONFIG_RTC) && defined(CONFIG_STM32_PWR) && !defined(CONFIG_STM32_STM32F10XX)
|
||||||
static inline rcc_enablebkp(void)
|
static inline rcc_resetbkp(void)
|
||||||
{
|
{
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
|
|
||||||
@ -145,7 +141,7 @@ static inline rcc_enablebkp(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define rcc_enablebkp()
|
# define rcc_resetbkp()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -181,9 +177,9 @@ void stm32_clockconfig(void)
|
|||||||
|
|
||||||
rcc_reset();
|
rcc_reset();
|
||||||
|
|
||||||
/* Reset backup domain */
|
/* Reset backup domain if appropriate */
|
||||||
|
|
||||||
rcc_enablebkp();
|
rcc_resetbkp();
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG)
|
#if defined(CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user