From a41f12ad8a925c8baaaeb826e63589721f942f4a Mon Sep 17 00:00:00 2001 From: barthess Date: Sat, 14 Jan 2012 12:23:42 +0000 Subject: 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 --- os/hal/platforms/STM32/RTCv1/rtc_lld.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'os/hal/platforms/STM32') 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); -- cgit v1.2.3