aboutsummaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-08-03 15:15:28 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-08-03 15:15:28 +0000
commitfe26494ea8673246adda770689a8dea11176a47d (patch)
tree247e0f2de43212f3a490c5b9921e22b2bc270a62 /nuttx
parent7cf644f6a64c9fb7d0f4fe236a4e8082d2596f86 (diff)
downloadpx4-firmware-fe26494ea8673246adda770689a8dea11176a47d.tar.gz
px4-firmware-fe26494ea8673246adda770689a8dea11176a47d.tar.bz2
px4-firmware-fe26494ea8673246adda770689a8dea11176a47d.zip
STM32 PM update
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5003 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_idle.c19
1 files 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 <arch/board/board.h>
#include <nuttx/config.h>
+#include <debug.h>
+
#include <nuttx/arch.h>
#include <nuttx/clock.h>
#include <nuttx/power/pm.h>
-
-#include <debug.h>
#include <nuttx/rtc.h>
+
#include <arch/irq.h>
+#include <arch/board/board.h>
+
#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;