From d95648897cff5623a0f6e9e31b9e74a2d7556745 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 28 Dec 2014 12:15:02 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7601 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/STM32/LLD/RTCv2/rtc_lld.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'os/hal/ports/STM32') diff --git a/os/hal/ports/STM32/LLD/RTCv2/rtc_lld.c b/os/hal/ports/STM32/LLD/RTCv2/rtc_lld.c index d862dfff5..1145268d0 100644 --- a/os/hal/ports/STM32/LLD/RTCv2/rtc_lld.c +++ b/os/hal/ports/STM32/LLD/RTCv2/rtc_lld.c @@ -309,10 +309,14 @@ void rtc_lld_init(void) { initial setup.*/ if (!(RTCD1.rtc->ISR & RTC_ISR_INITS)) { + rtc_enter_init(); + RTCD1.rtc->CR = 0; RTCD1.rtc->ISR = 0; RTCD1.rtc->PRER = STM32_RTC_PRER_BITS; RTCD1.rtc->PRER = STM32_RTC_PRER_BITS; + + rtc_exit_init(); } else RTCD1.rtc->ISR &= ~RTC_ISR_RSF; -- cgit v1.2.3