diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-06-30 00:53:54 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-06-30 00:53:54 +0000 |
commit | 2960a326777e96dff3a52c1e6cd872595e9b85c4 (patch) | |
tree | ec125eb4b4cd519fe4f49a4c90e41082462e010b /nuttx/arch/arm/src/stm32 | |
parent | 1d5540d8356898b2c633051da86aa668aa6e52c6 (diff) |
PM Update; add configs//ekk-lm3s9b96
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4888 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/arch/arm/src/stm32')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_pmstop.c | 12 | ||||
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_serial.c | 28 |
2 files changed, 30 insertions, 10 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_pmstop.c b/nuttx/arch/arm/src/stm32/stm32_pmstop.c index c688856111..9bd4af73a9 100644 --- a/nuttx/arch/arm/src/stm32/stm32_pmstop.c +++ b/nuttx/arch/arm/src/stm32/stm32_pmstop.c @@ -107,8 +107,16 @@ int stm32_pmstop(bool lpds) regval |= NVIC_SYSCON_SLEEPDEEP; putreg32(regval, NVIC_SYSCON); - /* Sleep until the wakeup interrupt occurs (us WFE to wait for an event) */ + /* Sleep until the wakeup interrupt or event occurs */ - asm("WFI"); +#ifdef CONFIG_PM_WFE + /* Mode: SLEEP + Entry with WFE */ + + __asm("wfe"); +#else + /* Mode: SLEEP + Entry with WFI */ + + __asm("wfi"); +#endif return OK; } diff --git a/nuttx/arch/arm/src/stm32/stm32_serial.c b/nuttx/arch/arm/src/stm32/stm32_serial.c index ab456eeb53..a5864acb63 100644 --- a/nuttx/arch/arm/src/stm32/stm32_serial.c +++ b/nuttx/arch/arm/src/stm32/stm32_serial.c @@ -132,8 +132,8 @@ /* Power management definitions */ -#if defined(CONFIG_PM) && !defined(CONFG_PM_SERIAL_ACTIVITY) -# define CONFG_PM_SERIAL_ACTIVITY 10 +#if defined(CONFIG_PM) && !defined(CONFIG_PM_SERIAL_ACTIVITY) +# define CONFIG_PM_SERIAL_ACTIVITY 10 #endif #ifdef USE_SERIALDRIVER @@ -1089,8 +1089,8 @@ static int up_interrupt_common(struct up_dev_s *priv) /* Report serial activity to the power management logic */ -#if defined(CONFIG_PM) && CONFG_PM_SERIAL_ACTIVITY > 0 - pm_activity(CONFG_PM_SERIAL_ACTIVITY); +#if defined(CONFIG_PM) && CONFIG_PM_SERIAL_ACTIVITY > 0 + pm_activity(CONFIG_PM_SERIAL_ACTIVITY); #endif /* Loop until there are no characters to be transferred or, @@ -1589,19 +1589,31 @@ static void up_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate) switch (pmstate) { case(PM_NORMAL): - /* Logic for PM_NORMAL goes here */ + { + /* Logic for PM_NORMAL goes here */ + + } break; case(PM_IDLE): - /* Logic for PM_IDLE goes here */ + { + /* Logic for PM_IDLE goes here */ + + } break; case(PM_STANDBY): - /* Logic for PM_STANDBY goes here */ + { + /* Logic for PM_STANDBY goes here */ + + } break; case(PM_SLEEP): - /* Logic for PM_SLEEP goes here */ + { + /* Logic for PM_SLEEP goes here */ + + } break; default: |