From 87fbb3674dc8ff80960abe02419fd8eeee81f1c2 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 3 Oct 2011 12:21:20 +0000 Subject: [PATCH] Restore CLOCK_ACTIVETIME git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4009 42af7a65-404d-4744-a932-0658087f49c3 --- arch/arm/src/stm32/stm32_rtc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/src/stm32/stm32_rtc.c b/arch/arm/src/stm32/stm32_rtc.c index c9811171c9a..fc40a61b6b0 100644 --- a/arch/arm/src/stm32/stm32_rtc.c +++ b/arch/arm/src/stm32/stm32_rtc.c @@ -80,6 +80,18 @@ * Pre-processor Definitions ************************************************************************************/ /* Configuration ********************************************************************/ +/* In hi-res mode, the RTC operates at 16384Hz. Overflow interrupts are handled + * when the 32-bit RTC counter overflows every 3 days and 43 minutes. A BKP register + * is incremented on each overflow interrupt creating, effectively, a 48-bit RTC + * counter. + * + * In the lo-res mode, the RTC operates at 1Hz. Overflow interrupts are not handled + * (because the next overflow is not expected until the year 2106. + * + * WARNING: Overflow interrupts are lost whenever the STM32 is powered down. The + * overflow interrupt may be lost even if the STM32 is powered down only momentarily. + * Therefor hi-res solution is only useful in systems where the power is always on. + */ #ifdef CONFIG_RTC_HIRES # ifndef CONFIG_RTC_FREQUENCY