aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32F1xx/hal_lld_f103.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/STM32F1xx/hal_lld_f103.h')
-rw-r--r--os/hal/platforms/STM32F1xx/hal_lld_f103.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32F1xx/hal_lld_f103.h b/os/hal/platforms/STM32F1xx/hal_lld_f103.h
index 4421663a0..f14ab5dc4 100644
--- a/os/hal/platforms/STM32F1xx/hal_lld_f103.h
+++ b/os/hal/platforms/STM32F1xx/hal_lld_f103.h
@@ -90,6 +90,11 @@
#define STM32_MCO_HSE (6 << 24) /**< HSE clock on MCO pin. */
#define STM32_MCO_PLLDIV2 (7 << 24) /**< PLL/2 clock on MCO pin. */
+#define STM32_RTC_NOCLOCK (0 << 8) /**< No clock */
+#define STM32_RTC_LSE (1 << 8) /**< LSE used as RTC clock */
+#define STM32_RTC_LSI (2 << 8) /**< LSI used as RTC clock */
+#define STM32_RTC_HSE (3 << 8) /**< HSE divided by 128 used as RTC clock */
+
/*===========================================================================*/
/* Platform specific friendly IRQ names. */
/*===========================================================================*/
@@ -251,6 +256,12 @@
#define STM32_MCO STM32_MCO_NOCLOCK
#endif
+/**
+ * @brief Clock source selecting. LSI by default.
+ */
+#if !defined(STM32_RTC) || defined(__DOXYGEN__)
+#define STM32_RTC STM32_RTC_LSI
+#endif
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/