PM Update; add configs//ekk-lm3s9b96

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4888 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-06-30 00:53:54 +00:00
parent 71d1d2664f
commit 84efa50bed
3 changed files with 33 additions and 11 deletions

View File

@ -284,6 +284,8 @@
# define GPIO_I2C1_SDA (GPIO_FUNC_PFODIO | GPIO_PORTA | 7) /* PA7: I2C1 data (I2C1SDA) */
# define GPIO_PWM1_2 (GPIO_FUNC_PFOUTPUT | GPIO_PORTB | 0) /* PB0: PWM Generator 1, PWM2 */
# define GPIO_PWM1_3 (GPIO_FUNC_PFOUTPUT | GPIO_PORTB | 1) /* PB1: PWM Generator 1, PWM3 */
# define GPIO_USB0ID (GPIO_FUNC_PFINPUT | GPIO_PORTB | 0) /* PB0: USBID signal from the USB-On-the-Go */
# define GPIO_USB0VBUS (GPIO_FUNC_PFODIO | GPIO_PORTB | 1) /* PB1: USB VBUS input signal from USB-OTG */
# define GPIO_I2C0_SCL (GPIO_FUNC_PFOUTPUT | GPIO_PORTB | 2) /* PB2: I2C0 clock (I2C0SCL) */
# define GPIO_I2C0_SDA (GPIO_FUNC_PFODIO | GPIO_PORTB | 3) /* PB3: I2C0 data (I2C0SDA) */
# define GPIO_CMP0_NIN (GPIO_FUNC_PFINPUT | GPIO_PORTB | 4) /* PB4: Analog comparator 0 negative input (C0-) */
@ -292,7 +294,7 @@
# define GPIO_JTAG_TRST (GPIO_FUNC_PFINPUT | GPIO_PORTB | 7) /* PB7: JTAG ~TRST */
# define GPIO_JTAG_TCK (GPIO_FUNC_PFINPUT | GPIO_PORTC | 0) /* PC0: JTAG/SWD CLK */
# define GPIO_JTAG_SWCLK (GPIO_FUNC_PFINPUT | GPIO_PORTC | 0) /* PC0: JTAG/SWD CLK */
# define GPIO_JTAG_TMS (GPIO_FUNC_PFIO | GPIO_PORTC | 1) /* PC1: JTAG TMS */
# define GPIO_JTAG_TMS (GPIO_FUNC_PFINPUT | GPIO_PORTC | 1) /* PC1: JTAG TMS */
# define GPIO_JTAG_SWDIO (GPIO_FUNC_PFIO | GPIO_PORTC | 1) /* PC1: JTAG SWDIO */
# define GPIO_JTAG_TDI (GPIO_FUNC_PFINPUT | GPIO_PORTC | 2) /* PC2: JTAG TDI */
# define GPIO_JTAG_TDO (GPIO_FUNC_PFOUTPUT | GPIO_PORTC | 3) /* PC3: JTAG TDO */

View File

@ -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;
}

View File

@ -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: