aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-01-11 07:49:03 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-01-11 07:49:03 +0000
commit3bc44a8219e5991a2c0e5e8e70422a32a3e32000 (patch)
treef0a91bcb4e2353dfe4fb779266483bfd3adb2963 /os/hal
parenteb94f80aa35fc9b316ddcc722249ba826c1dc349 (diff)
downloadChibiOS-3bc44a8219e5991a2c0e5e8e70422a32a3e32000.tar.gz
ChibiOS-3bc44a8219e5991a2c0e5e8e70422a32a3e32000.tar.bz2
ChibiOS-3bc44a8219e5991a2c0e5e8e70422a32a3e32000.zip
Added RTC and WDG support to H7.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11261 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.h10
-rw-r--r--os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c4
-rw-r--r--os/hal/ports/STM32/STM32H7xx/platform.mk4
3 files changed, 14 insertions, 4 deletions
diff --git a/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.h b/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.h
index ad2807a0e..eb376b948 100644
--- a/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.h
+++ b/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.h
@@ -111,10 +111,12 @@
#error "RTC not present in the selected device"
#endif
-#if !(STM32_RTCSEL == STM32_RTCSEL_LSE) && \
- !(STM32_RTCSEL == STM32_RTCSEL_LSI) && \
- !(STM32_RTCSEL == STM32_RTCSEL_HSEDIV)
-#error "invalid source selected for RTC clock"
+#if defined(STM32_RTC_CK) && !defined(STM32_RTCCLK)
+#define STM32_RTCCLK STM32_RTC_CK
+#endif
+
+#if !defined(STM32_RTCCLK)
+#error "RTC clock not exported by HAL layer"
#endif
#if STM32_PCLK1 < (STM32_RTCCLK * 7)
diff --git a/os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c b/os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c
index dac05a706..45856cbe8 100644
--- a/os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c
+++ b/os/hal/ports/STM32/LLD/xWDGv1/hal_wdg_lld.c
@@ -35,6 +35,10 @@
#define KR_KEY_WRITE 0x5555U
#define KR_KEY_PROTECT 0x0000U
+#if !defined(IWDG) && defined(IWDG1)
+#define IWDG IWDG1
+#endif
+
/*===========================================================================*/
/* Driver exported variables. */
/*===========================================================================*/
diff --git a/os/hal/ports/STM32/STM32H7xx/platform.mk b/os/hal/ports/STM32/STM32H7xx/platform.mk
index a7d648793..95e0c81f3 100644
--- a/os/hal/ports/STM32/STM32H7xx/platform.mk
+++ b/os/hal/ports/STM32/STM32H7xx/platform.mk
@@ -22,12 +22,16 @@ endif
# Drivers compatible with the platform.
include $(CHIBIOS)/os/hal/ports/STM32/LLD/BDMAv1/driver.mk
+include $(CHIBIOS)/os/hal/ports/STM32/LLD/CRYPv1/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/DMAv3/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/GPIOv2/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/I2Cv3/driver.mk
+include $(CHIBIOS)/os/hal/ports/STM32/LLD/MACv1/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/SPIv3/driver.mk
+include $(CHIBIOS)/os/hal/ports/STM32/LLD/RTCv2/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/TIMv1/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/USARTv2/driver.mk
+include $(CHIBIOS)/os/hal/ports/STM32/LLD/xWDGv1/driver.mk
# Shared variables
ALLCSRC += $(PLATFORMSRC)