2016-02-17 09:53:22 +08:00
|
|
|
Title: Power management demo
|
|
|
|
|
|
|
|
Description:
|
|
|
|
|
|
|
|
A sample implementation of a power manager app that uses the zephyr
|
|
|
|
power management infrastructure.
|
|
|
|
|
|
|
|
This app will cycle through the various power schemes at every call
|
|
|
|
to _sys_soc_suspend() hook function.
|
2016-11-03 15:02:57 +08:00
|
|
|
It will cycle through following states
|
|
|
|
1. CPU Low Power State
|
|
|
|
2. Deep Sleep - demonstrates invoking suspend/resume handlers of devices to
|
2016-07-01 10:26:45 +08:00
|
|
|
save device states and switching to deep sleep state.
|
2016-11-14 15:51:58 +08:00
|
|
|
3. No-op - no operation and letting kernel do its idle
|
2016-02-17 09:53:22 +08:00
|
|
|
|
2016-11-03 15:02:57 +08:00
|
|
|
This application uses Intel Quark SE Microcontroller C1000 board for
|
2016-11-14 15:51:58 +08:00
|
|
|
the demo. It demonstrates power operations on the x86 and ARC cores in
|
|
|
|
the board.
|
2016-02-17 09:53:22 +08:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Building and Running Project:
|
|
|
|
|
2016-11-03 15:02:57 +08:00
|
|
|
make BOARD=<board>
|
2016-02-17 09:53:22 +08:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Troubleshooting:
|
|
|
|
|
|
|
|
Problems caused by out-dated project information can be addressed by
|
|
|
|
issuing one of the following commands then rebuilding the project:
|
|
|
|
|
|
|
|
make clean # discard results of previous builds
|
|
|
|
# but keep existing configuration info
|
|
|
|
or
|
|
|
|
make pristine # discard results of previous builds
|
|
|
|
# and restore pre-defined configuration info
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
2016-11-14 15:51:58 +08:00
|
|
|
***Sample output on x86 core***
|
2016-02-17 09:53:22 +08:00
|
|
|
|
2016-11-14 15:51:58 +08:00
|
|
|
Power Management Demo on x86
|
2016-07-01 10:26:45 +08:00
|
|
|
|
2016-11-14 15:51:58 +08:00
|
|
|
Application main thread
|
2016-02-17 09:53:22 +08:00
|
|
|
|
2016-11-03 15:02:57 +08:00
|
|
|
Low power state entry!
|
2016-02-17 09:53:22 +08:00
|
|
|
|
2016-11-03 15:02:57 +08:00
|
|
|
Low power state exit!
|
2016-11-14 15:51:58 +08:00
|
|
|
Total Elapsed From Suspend To Resume = 131073 RTC Cycles
|
|
|
|
Wake up event handler
|
|
|
|
|
|
|
|
Application main thread
|
2016-07-01 10:26:45 +08:00
|
|
|
|
2016-11-03 15:02:57 +08:00
|
|
|
Deep sleep entry!
|
2016-07-01 10:26:45 +08:00
|
|
|
Wake from Deep Sleep!
|
|
|
|
|
2016-11-03 15:02:57 +08:00
|
|
|
Deep sleep exit!
|
2016-11-14 15:51:58 +08:00
|
|
|
Total Elapsed From Suspend To Resume = 291542 RTC Cycles
|
|
|
|
Wake up event handler
|
|
|
|
|
|
|
|
Application main thread
|
|
|
|
|
|
|
|
No PM operations done
|
|
|
|
|
|
|
|
Application main thread
|
|
|
|
|
|
|
|
Low power state entry!
|
|
|
|
|
|
|
|
Low power state exit!
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
***Sample output on ARC core***
|
|
|
|
|
|
|
|
Power Management Demo on arc
|
|
|
|
|
|
|
|
Application main thread
|
|
|
|
|
|
|
|
Low power state entry!
|
|
|
|
|
|
|
|
Low power state exit!
|
|
|
|
Total Elapsed From Suspend To Resume = 131073 RTC Cycles
|
|
|
|
Wake up event handler
|
|
|
|
|
|
|
|
Application main thread
|
|
|
|
|
|
|
|
No PM operations done
|
|
|
|
|
|
|
|
Application main thread
|
|
|
|
|
|
|
|
Low power state entry!
|
|
|
|
|
|
|
|
Low power state exit!
|
2016-02-17 09:53:22 +08:00
|
|
|
|
2016-03-19 07:43:40 +08:00
|
|
|
...
|