From ee3a27ccf98d6fee03a64d4e70f57746fdb5a2f7 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 1 Sep 2014 09:32:56 +0000 Subject: Fixed RTC on STM32F0xx. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7228 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/STM32/STM32F0xx/hal_lld.h | 6 ++++++ os/hal/ports/STM32/STM32F0xx/platform.mk | 2 ++ os/hal/ports/STM32/STM32F0xx/stm32_registry.h | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'os/hal/ports/STM32/STM32F0xx') diff --git a/os/hal/ports/STM32/STM32F0xx/hal_lld.h b/os/hal/ports/STM32/STM32F0xx/hal_lld.h index 71def5017..2bb9b3fcc 100644 --- a/os/hal/ports/STM32/STM32F0xx/hal_lld.h +++ b/os/hal/ports/STM32/STM32F0xx/hal_lld.h @@ -763,6 +763,12 @@ #define STM32_FLASHBITS 0x00000011 #endif +/* + * For compatibility with driver assuming a specific PPRE clock. + */ +#define STM32_PCLK1 STM32_PCLK +#define STM32_PCLK2 STM32_PCLK + /*===========================================================================*/ /* Driver data structures and types. */ /*===========================================================================*/ diff --git a/os/hal/ports/STM32/STM32F0xx/platform.mk b/os/hal/ports/STM32/STM32F0xx/platform.mk index 3c4d9baf5..bb42d637e 100644 --- a/os/hal/ports/STM32/STM32F0xx/platform.mk +++ b/os/hal/ports/STM32/STM32F0xx/platform.mk @@ -7,6 +7,7 @@ PLATFORMSRC = ${CHIBIOS}/os/hal/ports/common/ARMCMx/nvic.c \ ${CHIBIOS}/os/hal/ports/STM32/LLD/ext_lld.c \ ${CHIBIOS}/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.c \ ${CHIBIOS}/os/hal/ports/STM32/LLD/I2Cv2/i2c_lld.c \ + ${CHIBIOS}/os/hal/ports/STM32/LLD/RTCv2/rtc_lld.c \ ${CHIBIOS}/os/hal/ports/STM32/LLD/SPIv2/spi_lld.c \ ${CHIBIOS}/os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c \ ${CHIBIOS}/os/hal/ports/STM32/LLD/TIMv1/icu_lld.c \ @@ -22,6 +23,7 @@ PLATFORMINC = ${CHIBIOS}/os/hal/ports/common/ARMCMx \ ${CHIBIOS}/os/hal/ports/STM32/LLD \ ${CHIBIOS}/os/hal/ports/STM32/LLD/GPIOv2 \ ${CHIBIOS}/os/hal/ports/STM32/LLD/I2Cv2 \ + ${CHIBIOS}/os/hal/ports/STM32/LLD/RTCv2 \ ${CHIBIOS}/os/hal/ports/STM32/LLD/SPIv2 \ ${CHIBIOS}/os/hal/ports/STM32/LLD/TIMv1 \ ${CHIBIOS}/os/hal/ports/STM32/LLD/USARTv2 \ diff --git a/os/hal/ports/STM32/STM32F0xx/stm32_registry.h b/os/hal/ports/STM32/STM32F0xx/stm32_registry.h index a00ff3960..8efe059cf 100644 --- a/os/hal/ports/STM32/STM32F0xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F0xx/stm32_registry.h @@ -84,7 +84,7 @@ /* RTC attributes.*/ #define STM32_HAS_RTC TRUE #define STM32_RTC_HAS_SUBSECONDS TRUE -#define STM32_RTC_HAS_PERIODIC_WAKEUPS TRUE +#define STM32_RTC_HAS_PERIODIC_WAKEUPS FALSE #define STM32_RTC_NUM_ALARMS 1 #define STM32_RTC_HAS_INTERRUPTS FALSE -- cgit v1.2.3