From efd34d53a19e5d1436774deffb3fd1733e670b53 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 2 Jul 2017 16:02:32 +0000 Subject: Fixed bug #854. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10298 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- doc/hal/rsync_web.sh | 2 +- os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.c | 7 ++++--- readme.txt | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/hal/rsync_web.sh b/doc/hal/rsync_web.sh index 48e7ec7a9..df0f6ae16 100644 --- a/doc/hal/rsync_web.sh +++ b/doc/hal/rsync_web.sh @@ -1,2 +1,2 @@ #!/bin/bash -rsync -avP -e ssh --delete --exclude=.* ./html/ gdisirio,chibios@web.sourceforge.net:/home/groups/c/ch/chibios/htdocs/docs3/hal \ No newline at end of file +rsync -avP -e ssh --delete --exclude=.* ./html/ gdisirio,chibios@web.sourceforge.net:/home/groups/c/ch/chibios/htdocs/docs3/hal 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 09844f680..5c42dbc3b 100644 --- a/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.c +++ b/os/hal/ports/STM32/LLD/RTCv2/hal_rtc_lld.c @@ -345,9 +345,10 @@ void rtc_lld_set_time(RTCDriver *rtcp, const RTCDateTime *timespec) { /* Writing the registers.*/ rtc_enter_init(); - rtcp->rtc->TR = tr; - rtcp->rtc->DR = dr; - rtcp->rtc->CR |= timespec->dstflag << RTC_CR_BKP_OFFSET; + rtcp->rtc->TR = tr; + rtcp->rtc->DR = dr; + rtcp->rtc->CR = (rtcp->rtc->CR & ~(1U << RTC_CR_BKP_OFFSET)) | + (timespec->dstflag << RTC_CR_BKP_OFFSET); rtc_exit_init(); /* Leaving a reentrant critical zone.*/ diff --git a/readme.txt b/readme.txt index e5402a141..50585daa5 100644 --- a/readme.txt +++ b/readme.txt @@ -89,6 +89,8 @@ ***************************************************************************** *** Next *** +- HAL: Fixed invalid handling of DST flag in STM32 RTCv2 (bug #854)(backported + to 17.6.1 and 16.1.9). - HAL: Fixed extra right parenthesis in STM32F4 registry (bug #853)(backported to 17.6.1). - EX: Fixed documentation-related issues (bug #852)(backported to 17.6.1). -- cgit v1.2.3