aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-01-14 12:23:42 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-01-14 12:23:42 +0000
commita41f12ad8a925c8baaaeb826e63589721f942f4a (patch)
tree7e0fbfe52976723e152aeb106fd88f8c873e517a /os/hal/platforms/STM32
parent685286c5c8a6ad0d9370e62ea51eb6492e359d2a (diff)
downloadChibiOS-a41f12ad8a925c8baaaeb826e63589721f942f4a.tar.gz
ChibiOS-a41f12ad8a925c8baaaeb826e63589721f942f4a.tar.bz2
ChibiOS-a41f12ad8a925c8baaaeb826e63589721f942f4a.zip
RTC. Added possibility of changing RTC clock source.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3809 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32')
-rw-r--r--os/hal/platforms/STM32/RTCv1/rtc_lld.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/RTCv1/rtc_lld.c b/os/hal/platforms/STM32/RTCv1/rtc_lld.c
index 811920e06..4344f17bb 100644
--- a/os/hal/platforms/STM32/RTCv1/rtc_lld.c
+++ b/os/hal/platforms/STM32/RTCv1/rtc_lld.c
@@ -101,6 +101,10 @@ CH_IRQ_HANDLER(RTC_IRQHandler) {
CH_IRQ_PROLOGUE();
+ /* This wait works only when AHB1 bus was previously powered off by any
+ reason (standby, reset, etc). In other cases it does nothing.*/
+ rtc_lld_apb1_sync();
+
/* Mask of all enabled and pending sources.*/
flags = RTC->CRH & RTC->CRL;
RTC->CRL &= ~(RTC_CRL_SECF | RTC_CRL_ALRF | RTC_CRL_OWF);