aboutsummaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-07-04 00:06:25 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-07-04 00:06:25 +0000
commit8b886b98d9cfb72c16fb3ec73db636525d91f4b7 (patch)
tree8c699ad162a547dfee28274d0d13439390938c4b /nuttx
parent05b3e348f4872bd78dcc3a97a5d86082e119fc40 (diff)
downloadpx4-firmware-8b886b98d9cfb72c16fb3ec73db636525d91f4b7.tar.gz
px4-firmware-8b886b98d9cfb72c16fb3ec73db636525d91f4b7.tar.bz2
px4-firmware-8b886b98d9cfb72c16fb3ec73db636525d91f4b7.zip
LMS3 and PM update
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4902 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/configs/ekk-lm3s9b96/nsh/defconfig18
-rw-r--r--nuttx/configs/ekk-lm3s9b96/ostest/defconfig16
-rwxr-xr-xnuttx/configs/lm3s6965-ek/README.txt4
-rwxr-xr-xnuttx/configs/lm3s6965-ek/nsh/defconfig2
-rw-r--r--nuttx/configs/stm3210e-eval/src/stm3210e-internal.h12
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_idle.c36
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_lcd.c2
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_pmbuttons.c36
8 files changed, 99 insertions, 27 deletions
diff --git a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig
index 8803bec0b..e7eacb2f9 100644
--- a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig
+++ b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig
@@ -73,9 +73,9 @@ CONFIG_ARCH_CORTEXM3=y
CONFIG_ARCH_CHIP=lm3s
CONFIG_ARCH_CHIP_LM3S9B96=y
CONFIG_ARCH_BOARD=ekk-lm3s9b96
-CONFIG_ARCH_BOARD_EKK_LM3S9B96=y
+CONFIG_ARCH_BOARD_EKKLM3S9B96=y
CONFIG_BOARD_LOOPSPERMSEC=4531
-CONFIG_DRAM_SIZE=0x00010000
+CONFIG_DRAM_SIZE=0x00018000
CONFIG_DRAM_START=0x20000000
CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE)
CONFIG_ARCH_IRQPRIO=y
@@ -161,8 +161,8 @@ CONFIG_UART2_2STOP=0
# value is large, then larger values of this setting may cause
# Rx FIFO overrun errors. Default: half of the Tx FIFO size (4).
#
-CONFIG_SSI0_DISABLE=n
-CONFIG_SSI1_DISABLE=n
+CONFIG_SSI0_DISABLE=y
+CONFIG_SSI1_DISABLE=y
CONFIG_SSI_POLLWAIT=y
#CONFIG_SSI_TXLIMIT=4
@@ -425,6 +425,14 @@ CONFIG_FS_ROMFS=n
CONFIG_NFS=y
#
+# SPI-based MMC/SD driver
+#
+# CONFIG_MMCSD_NSLOTS
+# Number of MMC/SD slots supported by the driver
+#
+CONFIG_MMCSD_NSLOTS=0
+
+#
# TCP/IP and UDP support via uIP
# CONFIG_NET - Enable or disable all network features
# CONFIG_NET_IPv6 - Build in support for IPv6
@@ -452,7 +460,7 @@ CONFIG_NFS=y
#
CONFIG_NET=y
CONFIG_NET_IPv6=n
-CONFIG_NSOCKET_DESCRIPTORS=8
+CONFIG_NSOCKET_DESCRIPTORS=40
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFSIZE=562
CONFIG_NET_TCP=y
diff --git a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig
index f3db6bb24..bb7d02647 100644
--- a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig
+++ b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig
@@ -73,9 +73,9 @@ CONFIG_ARCH_CORTEXM3=y
CONFIG_ARCH_CHIP=lm3s
CONFIG_ARCH_CHIP_LM3S9B96=y
CONFIG_ARCH_BOARD=ekk-lm3s9b96
-CONFIG_ARCH_BOARD_EKK_LM3S9B96=y
+CONFIG_ARCH_BOARD_EKKLM3S9B96=y
CONFIG_BOARD_LOOPSPERMSEC=4531
-CONFIG_DRAM_SIZE=0x00010000
+CONFIG_DRAM_SIZE=0x00018000
CONFIG_DRAM_START=0x20000000
CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE)
CONFIG_ARCH_IRQPRIO=y
@@ -161,8 +161,8 @@ CONFIG_UART2_2STOP=0
# value is large, then larger values of this setting may cause
# Rx FIFO overrun errors. Default: half of the Tx FIFO size (4).
#
-CONFIG_SSI0_DISABLE=n
-CONFIG_SSI1_DISABLE=n
+CONFIG_SSI0_DISABLE=y
+CONFIG_SSI1_DISABLE=y
CONFIG_SSI_POLLWAIT=y
#CONFIG_SSI_TXLIMIT=4
@@ -424,6 +424,14 @@ CONFIG_FS_ROMFS=n
CONFIG_NFS=n
#
+# SPI-based MMC/SD driver
+#
+# CONFIG_MMCSD_NSLOTS
+# Number of MMC/SD slots supported by the driver
+#
+CONFIG_MMCSD_NSLOTS=0
+
+#
# TCP/IP and UDP support via uIP
# CONFIG_NET - Enable or disable all network features
# CONFIG_NET_IPv6 - Build in support for IPv6
diff --git a/nuttx/configs/lm3s6965-ek/README.txt b/nuttx/configs/lm3s6965-ek/README.txt
index 122ef816a..5f122d03a 100755
--- a/nuttx/configs/lm3s6965-ek/README.txt
+++ b/nuttx/configs/lm3s6965-ek/README.txt
@@ -436,6 +436,10 @@ Where <subdir> is one of the following:
driver is waiting for the network to come up. That is probably
a bug in the Ethernet driver behavior!
+ Network File System (NFS) support can be added by setting the
+ following in your configuration file:
+
+ CONFIG_NFS=y
nx:
And example using the NuttX graphics system (NX). This example
uses the P14201 OLED driver.
diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig
index 264ad2860..2621c8147 100755
--- a/nuttx/configs/lm3s6965-ek/nsh/defconfig
+++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig
@@ -418,8 +418,10 @@ CONFIG_PREALLOC_TIMERS=4
# CONFIG_FS_FAT - Enable FAT filesystem support
# CONFIG_FAT_SECTORSIZE - Max supported sector size
# CONFIG_FS_ROMFS - Enable ROMFS filesystem support
+# CONFIG_NFS - Enable NFS filesystem support
CONFIG_FS_FAT=y
CONFIG_FS_ROMFS=n
+CONFIG_NFS=n
#
# SPI-based MMC/SD driver
diff --git a/nuttx/configs/stm3210e-eval/src/stm3210e-internal.h b/nuttx/configs/stm3210e-eval/src/stm3210e-internal.h
index 12021eee0..e6bf825a9 100644
--- a/nuttx/configs/stm3210e-eval/src/stm3210e-internal.h
+++ b/nuttx/configs/stm3210e-eval/src/stm3210e-internal.h
@@ -304,6 +304,18 @@ void stm32_deselectlcd(void);
#endif /* CONFIG_STM32_FSMC */
+/************************************************************************************
+ * Name: up_unregisterbuttons
+ *
+ * Description:
+ * Un-register button handlers
+ *
+ ************************************************************************************/
+
+#if defined(CONFIG_PM) && defined(CONFIG_IDLE_CUSTOM)
+void up_unregisterbuttons(void);
+#endif
+
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_STM3210E_EVAL_SRC_STM3210E_INTERNAL_H */
diff --git a/nuttx/configs/stm3210e-eval/src/up_idle.c b/nuttx/configs/stm3210e-eval/src/up_idle.c
index 9b6432da8..27784056b 100644
--- a/nuttx/configs/stm3210e-eval/src/up_idle.c
+++ b/nuttx/configs/stm3210e-eval/src/up_idle.c
@@ -123,23 +123,43 @@ static void up_idlepm(void)
switch (newstate)
{
case PM_NORMAL:
+
break;
case PM_IDLE:
+ {
+ /* Check if the buttons have already been registered */
+
+ up_unregisterbuttons();
+
+ /* Initialize the buttoms to wake up the system from the idle
+ * mode
+ */
+
+ up_pmbuttons();
+ }
break;
case PM_STANDBY:
- /* Configure all the buttons as wakeup EXTI */
+ {
+ /* Check if the buttons have already been registered */
+
+ up_unregisterbuttons();
- up_pmbuttons();
+ /* Configure all the buttons as wakeup EXTI */
- /* Call the STM32 stop mode */
+ up_pmbuttons();
- stm32_pmstop(true);
+ /* Call the STM32 stop mode */
+
+ stm32_pmstop(true);
+ }
break;
case PM_SLEEP:
- (void)stm32_pmstandby();
+ {
+ (void)stm32_pmstandby();
+ }
break;
default:
@@ -182,12 +202,8 @@ void up_idle(void)
/* Perform IDLE mode power management */
- up_idlepm();
-
- /* Sleep until an interrupt occurs to save power */
-
BEGIN_IDLE();
- __asm("wfi");
+ up_idlepm();
END_IDLE();
#endif
}
diff --git a/nuttx/configs/stm3210e-eval/src/up_lcd.c b/nuttx/configs/stm3210e-eval/src/up_lcd.c
index e44699db6..784adaa06 100644
--- a/nuttx/configs/stm3210e-eval/src/up_lcd.c
+++ b/nuttx/configs/stm3210e-eval/src/up_lcd.c
@@ -1740,7 +1740,7 @@ int up_lcdinitialize(void)
#ifdef CONFIG_PM
ret = pm_register(&g_lcdcb);
- if (ret =! OK)
+ if (ret != OK)
{
lcddbg("ERROR: pm_register failed: %d\n", ret);
}
diff --git a/nuttx/configs/stm3210e-eval/src/up_pmbuttons.c b/nuttx/configs/stm3210e-eval/src/up_pmbuttons.c
index c90cf1c53..527f46163 100644
--- a/nuttx/configs/stm3210e-eval/src/up_pmbuttons.c
+++ b/nuttx/configs/stm3210e-eval/src/up_pmbuttons.c
@@ -186,7 +186,7 @@ static int button7_handler(int irq, FAR void *context);
* Private Data
****************************************************************************/
- /* Button Names */
+/* Button Names */
static const struct button_info_s g_buttoninfo[NUM_PMBUTTONS] =
{
@@ -260,11 +260,17 @@ static const struct button_info_s g_buttoninfo[NUM_PMBUTTONS] =
* Private Functions
****************************************************************************/
+/****************************************************************************
+ * Name: button_handler
+ *
+ * Description:
+ * Handle a button wake-up interrupt
+ *
+ ****************************************************************************/
+
#ifdef CONFIG_ARCH_IRQBUTTONS
static void button_handler(int id, int irq)
{
- int i;
-
/* At this point the MCU should have already awakened. Just report some
* activity in order to drive the rest of the system to the PM_NORMAL state
*/
@@ -273,10 +279,7 @@ static void button_handler(int id, int irq)
/* Un-register button handlers */
- for (i = CONFIG_PM_IRQBUTTONS_MIN; i <= CONFIG_PM_IRQBUTTONS_MAX; i++)
- {
- (void)up_irqbutton(i, NULL);
- }
+ up_unregisterbuttons();
}
#if MIN_BUTTON < 1
@@ -379,4 +382,23 @@ void up_pmbuttons(void)
#endif
}
+/****************************************************************************
+ * Name: up_unregisterbuttons
+ *
+ * Description:
+ * Un-register button handlers
+ *
+ ****************************************************************************/
+
+void up_unregisterbuttons(void)
+{
+#ifdef CONFIG_ARCH_IRQBUTTONS
+int i;
+ for (i = CONFIG_PM_IRQBUTTONS_MIN; i <= CONFIG_PM_IRQBUTTONS_MAX; i++)
+ {
+ (void)up_irqbutton(i, NULL);
+ }
+#endif
+}
+
#endif /* defined(CONFIG_PM) && defined(CONFIG_IDLE_CUSTOM) */