arch/arm/src/stm32,stm32l4,stm32f7: Fix duplicated configuration options. All should be unique.
This commit is contained in:
parent
529ac8dd9b
commit
691470c1cd
@ -7680,7 +7680,7 @@ config STM32_HAVE_RTC_SUBSECONDS
|
||||
menu "RTC Configuration"
|
||||
depends on RTC
|
||||
|
||||
config RTC_MAGIC_REG
|
||||
config STM32_RTC_MAGIC_REG
|
||||
int "BKP register"
|
||||
default 0
|
||||
range 0 19
|
||||
@ -7689,16 +7689,16 @@ config RTC_MAGIC_REG
|
||||
The BKP register used to store/check the Magic value to determine if
|
||||
RTC is already setup
|
||||
|
||||
config RTC_MAGIC
|
||||
config STM32_RTC_MAGIC
|
||||
hex "RTC Magic 1"
|
||||
default 0xfacefeee
|
||||
default 0xfacefeed
|
||||
depends on !STM32_HAVE_RTC_COUNTER
|
||||
---help---
|
||||
Value used as Magic to determine if the RTC is already setup
|
||||
|
||||
config RTC_MAGIC_TIME_SET
|
||||
config STM32_RTC_MAGIC_TIME_SET
|
||||
hex "RTC Magic 2"
|
||||
default 0xfacefeef
|
||||
default 0xf00dface
|
||||
depends on !STM32_HAVE_RTC_COUNTER
|
||||
---help---
|
||||
Value used as Magic to determine if the RTC has been setup and has
|
||||
|
@ -2,7 +2,7 @@
|
||||
* arch/arm/src/stm32/stm32_rtc.h
|
||||
*
|
||||
* Copyright (C) 2011 Uros Platise. All rights reserved.
|
||||
* Copyright (C) 2011-2013, 2015-2017 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011-2013, 2015-2018 Gregory Nutt. All rights reserved.
|
||||
* Author: Uros Platise <uros.platise@isotel.eu> (Original for the F1)
|
||||
* Gregory Nutt <gnutt@nuttx.org> (On-going support and development)
|
||||
*
|
||||
@ -78,41 +78,45 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define STM32_RTC_PRESCALER_SECOND 32767 /* Default prescaler to get a
|
||||
* second base */
|
||||
#define STM32_RTC_PRESCALER_MIN 1 /* Maximum speed of 16384 Hz */
|
||||
#define STM32_RTC_PRESCALER_SECOND 32767 /* Default prescaler to get a
|
||||
* second base */
|
||||
#define STM32_RTC_PRESCALER_MIN 1 /* Maximum speed of 16384 Hz */
|
||||
|
||||
#if defined(CONFIG_STM32_STM32F10XX)
|
||||
/* RTC is only a counter, store RTC data in backup domain register DR1 (if
|
||||
* CONFIG_RTC_HIRES) and DR2 (state).
|
||||
*/
|
||||
|
||||
#if !defined(CONFIG_RTC_MAGIC)
|
||||
# define CONFIG_RTC_MAGIC (0xface) /* only 16 bit */
|
||||
#if !defined(CONFIG_STM32_RTC_MAGIC)
|
||||
# define CONFIG_STM32_RTC_MAGIC (0xface) /* only 16 bit */
|
||||
#endif
|
||||
|
||||
#define RTC_MAGIC_REG STM32_BKP_DR2
|
||||
#if !defined(CONFIG_STM32_RTC_MAGIC_TIME_SET)
|
||||
# define CONFIG_STM32_RTC_MAGIC_TIME_SET (0xf00d)
|
||||
#endif
|
||||
|
||||
#define RTC_MAGIC_REG STM32_BKP_DR2
|
||||
|
||||
#else /* !CONFIG_STM32_STM32F10XX */
|
||||
|
||||
#if !defined(CONFIG_RTC_MAGIC)
|
||||
# define CONFIG_RTC_MAGIC (0xfacefeed)
|
||||
#if !defined(CONFIG_STM32_RTC_MAGIC)
|
||||
# define CONFIG_STM32_RTC_MAGIC (0xfacefeed)
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_RTC_MAGIC_REG)
|
||||
# define CONFIG_RTC_MAGIC_REG (0)
|
||||
#if !defined(CONFIG_STM32_RTC_MAGIC_TIME_SET)
|
||||
# define CONFIG_STM32_RTC_MAGIC_TIME_SET (0xf00dface)
|
||||
#endif
|
||||
|
||||
#define RTC_MAGIC_REG STM32_RTC_BKR(CONFIG_RTC_MAGIC_REG)
|
||||
#if !defined(CONFIG_STM32_RTC_MAGIC_REG)
|
||||
# define CONFIG_STM32_RTC_MAGIC_REG (0)
|
||||
#endif
|
||||
|
||||
#define RTC_MAGIC_REG STM32_RTC_BKR(CONFIG_STM32_RTC_MAGIC_REG)
|
||||
|
||||
#endif /* CONFIG_STM32_STM32F10XX */
|
||||
|
||||
#define RTC_MAGIC CONFIG_RTC_MAGIC
|
||||
#define RTC_MAGIC_TIME_SET CONFIG_RTC_MAGIC_TIME_SET
|
||||
|
||||
#if !defined(CONFIG_RTC_MAGIC_TIME_SET)
|
||||
# define CONFIG_RTC_MAGIC_TIME_SET (CONFIG_RTC_MAGIC + 1)
|
||||
#endif
|
||||
#define RTC_MAGIC CONFIG_STM32_RTC_MAGIC
|
||||
#define RTC_MAGIC_TIME_SET CONFIG_STM32_RTC_MAGIC_TIME_SET
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/src/stm32/stm32l15xxx_rtcc.c
|
||||
*
|
||||
* Copyright (C) 2012-2017 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2012-2018 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* Juha Niskanen <juha.niskanen@haltian.com>
|
||||
*
|
||||
@ -89,28 +89,28 @@
|
||||
# warning "RTC with LSI clock not yet tested on STM32L15XXX"
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_RTC_MAGIC)
|
||||
# define CONFIG_RTC_MAGIC (0xfacefeee)
|
||||
#if !defined(CONFIG_STM32_RTC_MAGIC)
|
||||
# define CONFIG_STM32_RTC_MAGIC (0xfacefeed)
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_RTC_MAGIC_TIME_SET)
|
||||
# define CONFIG_RTC_MAGIC_TIME_SET (CONFIG_RTC_MAGIC + 1)
|
||||
#if !defined(CONFIG_STM32_RTC_MAGIC_TIME_SET)
|
||||
# define CONFIG_STM32_RTC_MAGIC_TIME_SET (0xfoodface)
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_RTC_MAGIC_REG)
|
||||
# define CONFIG_RTC_MAGIC_REG (0)
|
||||
#if !defined(CONFIG_STM32_RTC_MAGIC_REG)
|
||||
# define CONFIG_STM32_RTC_MAGIC_REG (0)
|
||||
#endif
|
||||
|
||||
#define RTC_MAGIC CONFIG_RTC_MAGIC
|
||||
#define RTC_MAGIC_TIME_SET CONFIG_RTC_MAGIC_TIME_SET
|
||||
#define RTC_MAGIC_REG STM32_RTC_BKR(CONFIG_RTC_MAGIC_REG)
|
||||
#define RTC_MAGIC CONFIG_STM32_RTC_MAGIC
|
||||
#define RTC_MAGIC_TIME_SET CONFIG_STM32_RTC_MAGIC_TIME_SET
|
||||
#define RTC_MAGIC_REG STM32_RTC_BKR(CONFIG_STM32_RTC_MAGIC_REG)
|
||||
|
||||
/* Constants ****************************************************************/
|
||||
|
||||
#define SYNCHRO_TIMEOUT (0x00020000)
|
||||
#define INITMODE_TIMEOUT (0x00010000)
|
||||
#define SYNCHRO_TIMEOUT (0x00020000)
|
||||
#define INITMODE_TIMEOUT (0x00010000)
|
||||
|
||||
#define RTC_ALRMR_ENABLE 0
|
||||
#define RTC_ALRMR_ENABLE 0
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
|
@ -2052,7 +2052,7 @@ config STM32F7_HAVE_RTC_SUBSECONDS
|
||||
menu "RTC Configuration"
|
||||
depends on RTC
|
||||
|
||||
config RTC_MAGIC_REG
|
||||
config STM32F7_RTC_MAGIC_REG
|
||||
int "BKP register"
|
||||
default 0
|
||||
range 0 31
|
||||
@ -2060,15 +2060,15 @@ config RTC_MAGIC_REG
|
||||
The BKP register used to store/check the Magic value to determine if
|
||||
RTC is already setup
|
||||
|
||||
config RTC_MAGIC
|
||||
config STM32F7_RTC_MAGIC
|
||||
hex "RTC Magic 1"
|
||||
default 0xfacefeee
|
||||
default 0xfacefeed
|
||||
---help---
|
||||
Value used as Magic to determine if the RTC is already setup
|
||||
|
||||
config RTC_MAGIC_TIME_SET
|
||||
config STM32F7_RTC_MAGIC_TIME_SET
|
||||
hex "RTC Magic 2"
|
||||
default 0xfacefeef
|
||||
default 0xf00dface
|
||||
---help---
|
||||
Value used as Magic to determine if the RTC has been setup and has
|
||||
time set
|
||||
|
@ -2,7 +2,7 @@
|
||||
* arch/arm/src/stm32f7/stm32_rtc.h
|
||||
*
|
||||
* Copyright (C) 2011 Uros Platise. All rights reserved.
|
||||
* Copyright (C) 2011-2013, 2015-2016 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011-2013, 2015-2018 Gregory Nutt. All rights reserved.
|
||||
* Authors: Uros Platise <uros.platise@isotel.eu> (Original for the F1)
|
||||
* Gregory Nutt <gnutt@nuttx.org> (On-going support and development)
|
||||
* David Sidrane <david_s5@nscdg.com>
|
||||
@ -59,24 +59,24 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define STM32_RTC_PRESCALER_SECOND 32767 /* Default prescaler to get a second base */
|
||||
#define STM32_RTC_PRESCALER_MIN 1 /* Maximum speed of 16384 Hz */
|
||||
#define STM32_RTC_PRESCALER_SECOND 32767 /* Default prescaler to get a second base */
|
||||
#define STM32_RTC_PRESCALER_MIN 1 /* Maximum speed of 16384 Hz */
|
||||
|
||||
#if !defined(CONFIG_RTC_MAGIC)
|
||||
# define CONFIG_RTC_MAGIC (0xfacefeee)
|
||||
#if !defined(CONFIG_STM32F7_RTC_MAGIC)
|
||||
# define CONFIG_STM32F7_RTC_MAGIC (0xfacefeed)
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_RTC_MAGIC_TIME_SET)
|
||||
# define CONFIG_RTC_MAGIC_TIME_SET (CONFIG_RTC_MAGIC + 1)
|
||||
#if !defined(CONFIG_STM32F7_RTC_MAGIC_TIME_SET)
|
||||
# define CONFIG_STM32F7_RTC_MAGIC_TIME_SET (0xf00dface)
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_RTC_MAGIC_REG)
|
||||
# define CONFIG_RTC_MAGIC_REG (0)
|
||||
#if !defined(CONFIG_STM32F7_RTC_MAGIC_REG)
|
||||
# define CONFIG_STM32F7_RTC_MAGIC_REG (0)
|
||||
#endif
|
||||
|
||||
#define RTC_MAGIC CONFIG_RTC_MAGIC
|
||||
#define RTC_MAGIC_TIME_SET CONFIG_RTC_MAGIC_TIME_SET
|
||||
#define RTC_MAGIC_REG STM32_RTC_BKR(CONFIG_RTC_MAGIC_REG)
|
||||
#define RTC_MAGIC CONFIG_STM32F7_RTC_MAGIC
|
||||
#define RTC_MAGIC_TIME_SET CONFIG_STM32F7_RTC_MAGIC_TIME_SET
|
||||
#define RTC_MAGIC_REG STM32_RTC_BKR(CONFIG_STM32F7_RTC_MAGIC_REG)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
|
@ -1426,6 +1426,27 @@ config STM32L4_HAVE_RTC_SUBSECONDS
|
||||
select ARCH_HAVE_RTC_SUBSECONDS
|
||||
default y
|
||||
|
||||
config STM32F4_RTC_MAGIC_REG
|
||||
int "BKP register"
|
||||
default 0
|
||||
range 0 31
|
||||
---help---
|
||||
The BKP register used to store/check the Magic value to determine if
|
||||
RTC is already setup
|
||||
|
||||
config STM32F4_RTC_MAGIC
|
||||
hex "RTC Magic 1"
|
||||
default 0xfacefeed
|
||||
---help---
|
||||
Value used as Magic to determine if the RTC is already setup
|
||||
|
||||
config STM32F4_RTC_MAGIC_TIME_SET
|
||||
hex "RTC Magic 2"
|
||||
default 0xf00dface
|
||||
---help---
|
||||
Value used as Magic to determine if the RTC has been setup and has
|
||||
time set
|
||||
|
||||
choice
|
||||
prompt "RTC clock source"
|
||||
default STM32L4_RTC_LSECLOCK
|
||||
|
@ -54,24 +54,24 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define STM32L4_RTC_PRESCALER_SECOND 32767 /* Default prescaler to get a second base */
|
||||
#define STM32L4_RTC_PRESCALER_MIN 1 /* Maximum speed of 16384 Hz */
|
||||
#define STM32L4_RTC_PRESCALER_SECOND 32767 /* Default prescaler to get a second base */
|
||||
#define STM32L4_RTC_PRESCALER_MIN 1 /* Maximum speed of 16384 Hz */
|
||||
|
||||
#if !defined(CONFIG_RTC_MAGIC)
|
||||
# define CONFIG_RTC_MAGIC (0xfacefeee)
|
||||
#if !defined(CONFIG_STM32L4_RTC_MAGIC)
|
||||
# define CONFIG_STM32L4_RTC_MAGIC (0xfacefeee)
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_RTC_MAGIC_TIME_SET)
|
||||
# define CONFIG_RTC_MAGIC_TIME_SET (CONFIG_RTC_MAGIC + 1)
|
||||
#if !defined(CONFIG_STM32L4_RTC_MAGIC_TIME_SET)
|
||||
# define CONFIG_STM32L4_RTC_MAGIC_TIME_SET (0xf00dface)
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_RTC_MAGIC_REG)
|
||||
# define CONFIG_RTC_MAGIC_REG (0)
|
||||
#if !defined(CONFIG_STM32L4_RTC_MAGIC_REG)
|
||||
# define CONFIG_STM32L4_RTC_MAGIC_REG (0)
|
||||
#endif
|
||||
|
||||
#define RTC_MAGIC CONFIG_RTC_MAGIC
|
||||
#define RTC_MAGIC_TIME_SET CONFIG_RTC_MAGIC_TIME_SET
|
||||
#define RTC_MAGIC_REG STM32L4_RTC_BKR(CONFIG_RTC_MAGIC_REG)
|
||||
#define RTC_MAGIC CONFIG_STM32L4_RTC_MAGIC
|
||||
#define RTC_MAGIC_TIME_SET CONFIG_STM32L4_RTC_MAGIC_TIME_SET
|
||||
#define RTC_MAGIC_REG STM32L4_RTC_BKR(CONFIG_STM32L4_RTC_MAGIC_REG)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
|
Loading…
Reference in New Issue
Block a user