diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2019-03-24 07:34:26 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2019-03-24 07:34:26 +0000 |
commit | da74095247b5ef56b6cbbb7df658ed23436a3fc3 (patch) | |
tree | cf2683772a3203004dbfc1aede1cd6ebe558decc | |
parent | 71a12f97d5c6ec2d926c67c9bc100f3b2fa3950d (diff) | |
download | ChibiOS-da74095247b5ef56b6cbbb7df658ed23436a3fc3.tar.gz ChibiOS-da74095247b5ef56b6cbbb7df658ed23436a3fc3.tar.bz2 ChibiOS-da74095247b5ef56b6cbbb7df658ed23436a3fc3.zip |
Fixed bug #1023.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_19.1.x@12711 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
-rw-r--r-- | os/hal/ports/STM32/STM32L1xx/stm32_registry.h | 28 | ||||
-rw-r--r-- | readme.txt | 1 |
2 files changed, 28 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/STM32L1xx/stm32_registry.h b/os/hal/ports/STM32/STM32L1xx/stm32_registry.h index b71c88223..d227aa1e3 100644 --- a/os/hal/ports/STM32/STM32L1xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32L1xx/stm32_registry.h @@ -53,6 +53,12 @@ #error "STM32L1xx device not specified"
#endif
+#if defined(STM32L100xB) || defined(STM32L100xBA) || defined(STM32L100xC)
+#define STM32L1XX_VALUE_LINE TRUE
+#else
+#define STM32L1XX_VALUE_LINE FALSE
+#endif
+
/*===========================================================================*/
/* Platform capabilities. */
/*===========================================================================*/
@@ -197,7 +203,27 @@ #endif
#define STM32_RTC_HAS_PERIODIC_WAKEUPS TRUE
#define STM32_RTC_NUM_ALARMS 2
-#define STM32_RTC_HAS_INTERRUPTS FALSE
+#if STM32L1XX_VALUE_LINE || defined(__DOXYGEN__)
+#define STM32_RTC_STORAGE_SIZE 20
+#elif (STM32L1XX_PROD_CAT == 1) || (STM32L1XX_PROD_CAT == 2)
+#define STM32_RTC_STORAGE_SIZE 80
+#else
+#define STM32_RTC_STORAGE_SIZE 128
+#endif
+#define STM32_RTC_TAMP_STAMP_HANDLER Vector48
+#define STM32_RTC_WKUP_HANDLER Vector4C
+#define STM32_RTC_ALARM_HANDLER VectorE4
+#define STM32_RTC_TAMP_STAMP_NUMBER 3
+#define STM32_RTC_WKUP_NUMBER 1
+#define STM32_RTC_ALARM_NUMBER 2
+#define STM32_RTC_ALARM_EXTI 17
+#define STM32_RTC_TAMP_STAMP_EXTI 19
+#define STM32_RTC_WKUP_EXTI 20
+#define STM32_RTC_IRQ_ENABLE() do { \
+ nvicEnableVector(STM32_RTC_TAMP_STAMP_NUMBER, STM32_IRQ_EXTI19_PRIORITY); \
+ nvicEnableVector(STM32_RTC_WKUP_NUMBER, STM32_IRQ_EXTI20_PRIORITY); \
+ nvicEnableVector(STM32_RTC_ALARM_NUMBER, STM32_IRQ_EXTI18_PRIORITY); \
+} while (false)
/* SDIO attributes.*/
#define STM32_HAS_SDIO TRUE
diff --git a/readme.txt b/readme.txt index 4223b90bd..9d705ae62 100644 --- a/readme.txt +++ b/readme.txt @@ -75,6 +75,7 @@ *** 19.1.2 ***
- HAL: Added H753 to all H7 mcuconf.h files.
+- FIX: Fixed missing RTC definitions in STM32L1xx registry (bug #1023).
- FIX: Fixed missing EXTI driver integration on some platforms (bug #1022).
*** 19.1.1 ***
|