summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-14 19:38:14 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-14 19:38:14 +0000
commit3bfb6d9fd94c9f871eecab92a0d550ab66e5042b (patch)
tree21200ca2d474d9959ca8d66dbaab0ab0e77460ed /nuttx
parente135573acc348649e767ca67a1ec189fe4e0fcda (diff)
downloadpx4-nuttx-3bfb6d9fd94c9f871eecab92a0d550ab66e5042b.tar.gz
px4-nuttx-3bfb6d9fd94c9f871eecab92a0d550ab66e5042b.tar.bz2
px4-nuttx-3bfb6d9fd94c9f871eecab92a0d550ab66e5042b.zip
PM update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4941 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/ChangeLog3
-rw-r--r--nuttx/configs/stm3210e-eval/pm/defconfig1
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_lcd.c23
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_pm.c2
4 files changed, 23 insertions, 6 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 0eb1ede42..dc8c6bcc5 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -2981,6 +2981,9 @@
* configs/lpc4330-xplorer/up_nsh.c: Add support for a basic SPIFI block
driver for use by NSH. Does not work! Crashes on first SPIFI write.
+ * configs/lpc4330-xplorer/*/defconfig: Calibrate delay loops (this is
+ based on the current "slow" 72MHz M4 clock and will need to be
+ re-calibrated when this is increased).
* configs/stm3220g-eval/include/board.h and configs/stm3240g-eval/include/board.h:
The SDIOCLK frequency in the F2 and F4 derives for PLL48CLK and not HCLK
so that the SDIOCLK input frequency should always be 48MHz.
diff --git a/nuttx/configs/stm3210e-eval/pm/defconfig b/nuttx/configs/stm3210e-eval/pm/defconfig
index 5c1d57c84..d4fb6e8b9 100644
--- a/nuttx/configs/stm3210e-eval/pm/defconfig
+++ b/nuttx/configs/stm3210e-eval/pm/defconfig
@@ -488,7 +488,6 @@ CONFIG_PM_BUTTONS_NAME4="DOWN"
CONFIG_PM_BUTTONS_NAME5="LEFT"
CONFIG_PM_BUTTONS_NAME6="RIGHT"
CONFIG_PM_BUTTONS_NAME7="UP"
-CONFIG_PM_BUTTONS=1
#
# Settings for NXFLAT
diff --git a/nuttx/configs/stm3210e-eval/src/up_lcd.c b/nuttx/configs/stm3210e-eval/src/up_lcd.c
index 784adaa06..42da4864a 100644
--- a/nuttx/configs/stm3210e-eval/src/up_lcd.c
+++ b/nuttx/configs/stm3210e-eval/src/up_lcd.c
@@ -1169,24 +1169,39 @@ static void stm3210e_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstat
{
duty--;
}
- putreg16((uint16_t)duty, STM32_TIM1_CCR1);
+
+ putreg16((uint16_t)duty, STM32_TIM1_CCR1);
#endif
}
break;
case(PM_IDLE):
{
- /* Entering IDLE mode - Turn display off */
+ /* Entering IDLE mode - Reduce LCD light */
#ifdef CONFIG_LCD_PWM
- putreg16(0, STM32_TIM1_CCR1);
+ frac = (g_lcddev.power << 16) / CONFIG_LCD_MAXPOWER;
+ duty = (g_lcddev.reload * frac) >> 16;
+ if (duty > 0)
+ {
+ duty--;
+ }
+
+ /* Reduce the LCD light to 50% of the MAXPOWER */
+
+ duty >>= 1;
+ putreg16((uint16_t)duty, STM32_TIM1_CCR1);
#endif
}
break;
case(PM_STANDBY):
{
- /* Entering STANDBY mode - Logic for PM_STANDBY goes here */
+ /* Entering STANDBY mode - Turn display off */
+
+#ifdef CONFIG_LCD_PWM
+ putreg16(0, STM32_TIM1_CCR1);
+#endif
}
break;
diff --git a/nuttx/configs/stm3210e-eval/src/up_pm.c b/nuttx/configs/stm3210e-eval/src/up_pm.c
index dd8a79b1c..3aa60bf5a 100644
--- a/nuttx/configs/stm3210e-eval/src/up_pm.c
+++ b/nuttx/configs/stm3210e-eval/src/up_pm.c
@@ -93,7 +93,7 @@ void up_pminitialize(void)
pm_initialize();
-#ifdef CONFIG_PM_BUTTONS
+#if defined(CONFIG_IDLE_CUSTOM) && defined(CONFIG_PM_BUTTONS)
/* Initialize the buttons to wake up the system from low power modes */
up_pmbuttons();