diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2012-06-15 19:37:54 +0000 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-08-09 11:55:03 -0700 |
commit | b081af1284c2e63747451bc8984d27e8430a9bb4 (patch) | |
tree | 733988cac0c88af67832712b6ddeeb8d02cacfce /core | |
parent | 3a6a369d39512d8cc394936ec2ccea81c651816b (diff) | |
download | chrome-ec-b081af1284c2e63747451bc8984d27e8430a9bb4.tar.gz |
stm32f100: implement low power mode
When the AP is not running and we have enough time go to STOP mode
instead of simple idle.
The EC consumption should drop from 12mW to a few mW.
This is currently not activated by default, you need to type "sleepmask
0" in the EC console to activate it.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:8866
TEST=on Snow, check the software is still working properly when STOP
mode is activated and measure power consumption on 3v_alw rail.
Change-Id: I231d76fe6494c07b198c41694755b82d87c00e75
Reviewed-on: https://gerrit.chromium.org/gerrit/29315
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/task.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c index 154994bccf..a45e8e0e32 100644 --- a/core/cortex-m/task.c +++ b/core/cortex-m/task.c @@ -36,7 +36,7 @@ typedef union { /* declare task routine prototypes */ #define TASK(n, r, d) int r(void *); #include TASK_LIST -static void __idle(void); +void __idle(void); CONFIG_TASK_LIST #undef TASK @@ -63,6 +63,7 @@ static uint32_t irq_dist[CONFIG_IRQ_COUNT]; /* Distribution of IRQ calls */ extern void __switchto(task_ *from, task_ *to); extern int __task_start(int *task_stack_ready); +#ifndef CONFIG_LOW_POWER_IDLE /* Idle task. Executed when no tasks are ready to be scheduled. */ void __idle(void) { @@ -77,6 +78,7 @@ void __idle(void) asm("wfi"); } } +#endif /* !CONFIG_LOW_POWER_IDLE */ static void task_exit_trap(void) |