LMS3 and PM update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4902 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
6d0cf19a02
commit
8fd5c299c4
@ -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_FAT=y
|
||||
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
|
||||
@ -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
|
||||
|
@ -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
|
||||
|
||||
@ -423,6 +423,14 @@ CONFIG_FS_FAT=n
|
||||
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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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_pmbuttons();
|
||||
up_unregisterbuttons();
|
||||
|
||||
/* Call the STM32 stop mode */
|
||||
/* Configure all the buttons as wakeup EXTI */
|
||||
|
||||
stm32_pmstop(true);
|
||||
up_pmbuttons();
|
||||
|
||||
/* 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
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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) */
|
||||
|
Loading…
Reference in New Issue
Block a user