From 172680aea3057dcea62fc4a053510d2dd03bb911 Mon Sep 17 00:00:00 2001 From: barthess Date: Fri, 16 Dec 2011 13:18:55 +0000 Subject: RTC. Nop. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3617 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/RTCv2/rtc_lld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os/hal/platforms') diff --git a/os/hal/platforms/STM32/RTCv2/rtc_lld.c b/os/hal/platforms/STM32/RTCv2/rtc_lld.c index ca15dc1b9..171105a75 100644 --- a/os/hal/platforms/STM32/RTCv2/rtc_lld.c +++ b/os/hal/platforms/STM32/RTCv2/rtc_lld.c @@ -186,7 +186,7 @@ void rtc_lld_get_time(RTCDriver *rtcp, RTCTime *timespec) { ; #if STM32_RTC_HAS_SUBSECONDS - timespec->tv_msec = (1000 * (RTCD1.id_rtc->PRER & 0x7FFF) - RTCD1.id_rtc->SSR) / + timespec->tv_msec = (1000 * ((RTCD1.id_rtc->PRER & 0x7FFF) - RTCD1.id_rtc->SSR)) / ((RTCD1.id_rtc->PRER & 0x7FFF) + 1); #endif /* STM32_RTC_HAS_SUBSECONDS */ timespec->tv_time = RTCD1.id_rtc->TR; -- cgit v1.2.3