aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-09-20 20:32:01 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-09-20 20:32:01 +0000
commit341b76700595911cdec3891a2e1d86cc6c41eb9b (patch)
treedfc3181cd6e24a7f0cb5f963825278c761425cde
parentbd58700cd5cefa8ec2d5e66a5a7937f774e617f2 (diff)
downloadChibiOS-341b76700595911cdec3891a2e1d86cc6c41eb9b.tar.gz
ChibiOS-341b76700595911cdec3891a2e1d86cc6c41eb9b.tar.bz2
ChibiOS-341b76700595911cdec3891a2e1d86cc6c41eb9b.zip
RTCv2. Fixed wrong seconds handling in fat time stamp.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4704 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/platforms/STM32/RTCv2/rtc_lld.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32/RTCv2/rtc_lld.c b/os/hal/platforms/STM32/RTCv2/rtc_lld.c
index 48a81dd96..34406e1a3 100644
--- a/os/hal/platforms/STM32/RTCv2/rtc_lld.c
+++ b/os/hal/platforms/STM32/RTCv2/rtc_lld.c
@@ -290,7 +290,7 @@ uint32_t rtc_lld_get_time_fat(RTCDriver *rtcp) {
v = (tv_time & RTC_TR_SU) >> RTC_TR_SU_OFFSET;
v += ((tv_time & RTC_TR_ST) >> RTC_TR_ST_OFFSET) * 10;
- fattime = v << 1;
+ fattime = v >> 1;
v = (tv_time & RTC_TR_MNU) >> RTC_TR_MNU_OFFSET;
v += ((tv_time & RTC_TR_MNT) >> RTC_TR_MNT_OFFSET) * 10;