diff options
author | Vic Yang <victoryang@chromium.org> | 2014-10-29 11:36:05 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-30 00:05:33 +0000 |
commit | cfbb9e51b2abfd562af865c0b11362d48d799cfd (patch) | |
tree | bc012cac932b2068a63633636b2dc43f8b3dcd18 /chip | |
parent | e254b0a06f6c5387a77d5a391bf4f7c8016f84b6 (diff) | |
download | chrome-ec-cfbb9e51b2abfd562af865c0b11362d48d799cfd.tar.gz |
ryu: Enable low power idle for P2 boards
Now that the problem with UART in STOP mode is fixed, let's enable low
power idle for Ryu P2 boards.
BRANCH=None
BUG=chrome-os-partner:33219
TEST=Shut down the AP and unplug AC power. Check the EC goes into
deep-sleep by 'idlestat'.
TEST=Power up the AP and check the EC stays awake.
Change-Id: Ib8ad3763407315ec0f95551fa0fdd258a060e113
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/226312
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/stm32/clock-stm32f0.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chip/stm32/clock-stm32f0.c b/chip/stm32/clock-stm32f0.c index 4272349971..81cea8c884 100644 --- a/chip/stm32/clock-stm32f0.c +++ b/chip/stm32/clock-stm32f0.c @@ -41,8 +41,12 @@ static int dsleep_recovery_margin_us = 1000000; * power mode is 5 us + PLL locking time is 200us. * SET_RTC_MATCH_DELAY: max time to set RTC match alarm. if we set the alarm * in the past, it will never wake up and cause a watchdog. + * For STM32F3, we are using HSE, which requires additional time to start up. + * Therefore, the latency for STM32F3 is set longer. */ -#if (CPU_CLOCK == PLL_CLOCK) +#ifdef CHIP_VARIANT_STM32F373 +#define STOP_MODE_LATENCY 500 /* us */ +#elif (CPU_CLOCK == PLL_CLOCK) #define STOP_MODE_LATENCY 300 /* us */ #else #define STOP_MODE_LATENCY 50 /* us */ @@ -214,7 +218,6 @@ static void config_hispeed_clock(void) * ADCCLK = PCLK / 6 = 4MHz * USB uses SYSCLK = 48MHz */ - /*STM32_RCC_CFGR = 0x0041a400;*/ STM32_RCC_CFGR = 0x0041a400; /* Enable the PLL */ |