From fdf3721c1d496ca341b2ea6e41f31d1ecff287b4 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 26 Mar 2017 12:51:38 +0000 Subject: Fixed bug #821. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10134 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'os/hal/ports/STM32/LLD/RTCv2') diff --git a/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.c b/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.c index a6c776d3a..09844f680 100644 --- a/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.c +++ b/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.c @@ -509,6 +509,7 @@ void rtcSTM32SetPeriodicWakeup(RTCDriver *rtcp, const RTCWakeup *wakeupspec) { osalDbgCheck(wakeupspec->wutr != 0x30000); rtcp->rtc->CR &= ~RTC_CR_WUTE; + rtcp->rtc->CR &= ~RTC_CR_WUTIE; while (!(rtcp->rtc->ISR & RTC_ISR_WUTWF)) ; rtcp->rtc->WUTR = wakeupspec->wutr & 0xFFFF; @@ -518,8 +519,8 @@ void rtcSTM32SetPeriodicWakeup(RTCDriver *rtcp, const RTCWakeup *wakeupspec) { rtcp->rtc->CR |= RTC_CR_WUTE; } else { - rtcp->rtc->CR &= ~RTC_CR_WUTIE; rtcp->rtc->CR &= ~RTC_CR_WUTE; + rtcp->rtc->CR &= ~RTC_CR_WUTIE; } /* Leaving a reentrant critical zone.*/ -- cgit v1.2.3