zephyr/samples/boards/nrf52/power_mgr
Anas Nashif 65600d4723 samples: power_mgr: add harnesss configuration
This test prints out to the console, when testing on real hardware,
parse output and compare to what we are expecting to avoid timeouts.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 22:55:20 -04:00
..
src samples: nrf52: power_mgr: Increase idleness for main thread 2017-11-18 11:21:13 -05:00
CMakeLists.txt Introduce cmake-based rewrite of KBuild 2017-11-08 20:00:22 -05:00
README.rst doc: fix duplicate sample doc titles 2018-02-12 21:59:54 -05:00
prj.conf samples: boards: nrf52: test demo for nrf52 power management 2017-11-06 09:29:10 -05:00
prj_tickless.conf tests: remove obsolete CONFIG_MDEF 2018-01-08 08:08:45 -05:00
sample.yaml samples: power_mgr: add harnesss configuration 2018-04-09 22:55:20 -04:00

README.rst

.. _nrf52-power-mgr-sample:

nRF52 Power management demo
###########################

Overview
********

This sample demonstrates a power manager app that uses the Zephyr
power management infrastructure to enter into Low Power state.

This app will cycle through the following power schemes each time idle thread
calls _sys_soc_suspend() hook function :

1. Low Power State: Low Power State is SOC specific and being in this state is
   transparent to devices. SOC and devices do not lose context in this Mode.
   SOC supports the following two Low Power states :

   A. CONSTANT LATENCY LOW POWER MODE : This Low Power State triggers CONSTLAT
      task on nrf52 SOC. In this Mode there is Low Exit latency and 16MHz Clock
      is kept ON.
   B. LOW POWER STATE : In this Power State CONSTLAT task is triggered on nrf52
      SOC. This is a deeper power state than CONSTANT LATENCY Mode. In this mode
      the 16MHz Clock is turned off and only 32KHz clock is used.

2. Deep Sleep: This Power State is mapped to SYSTEM OFF state. In this mode
   all devices on board get suspended. All devices and SOC lose context on
   wake up.

3. No-op: No operation, letting kernel idle.

Requirements
************

This application uses nrf52 DK board for the demo.

Building, Flashing and Running
******************************

.. zephyr-app-commands::
   :zephyr-app: samples/boards/nrf52/power_mgr
   :board: nrf52_pca10040
   :goals: build flash
   :compact:

Running:

1. Open UART terminal.
2. Power Cycle Device.
3. Device will enter into Low Power Mode.
4. Press Button 1 on device. This will wake device from Low Power Mode.
5. Repeat Step 4 for entering into other Low Power/Deep Sleep states.


Sample Output
=================
nrf52 core output
-----------------

.. code-block:: console

  ***Power Management Demo on arm****
  Demo Description
  Application creates Idleness, Due to which System Idle Thread is
  scheduled and it enters into various Low Power States.
  Press Button 1 on Board to wake device from Low Power State
  Application main thread
  ---->Low power state entry - CONSTANT LATENCY MODE----- Low power state exit!
  ---->Low power state entry - LOW POWER MODE ----- Low power state exit!
  ===> Entry Into Deep Sleep ==