From 915abc09ad5aa6f4dabaae0876d3bead833edc3e Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 3 Aug 2012 15:15:28 +0000 Subject: STM32 PM update git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5003 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/stm3210e-eval/src/up_idle.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/nuttx/configs/stm3210e-eval/src/up_idle.c b/nuttx/configs/stm3210e-eval/src/up_idle.c index 13c88ee80..5b9f3c9fa 100644 --- a/nuttx/configs/stm3210e-eval/src/up_idle.c +++ b/nuttx/configs/stm3210e-eval/src/up_idle.c @@ -39,17 +39,19 @@ * Included Files ****************************************************************************/ -#include #include +#include + #include #include #include - -#include #include + #include +#include + #include "up_internal.h" #include "stm32_pm.h" #include "stm32_rcc.h" @@ -288,7 +290,18 @@ static void up_idlepm(void) if (oldstate == PM_STANDBY) { + /* Re-enable clocking */ + stm32_clockenable(); + + /* The system timer was disabled while in PM_STANDBY or + * PM_SLEEP modes. But the RTC has still be running: Reset + * the system time the current RTC time. + */ + +#ifdef CONFIG_RTC + clock_synchronize(); +#endif } } break; -- cgit v1.2.3