Introduction, Name, Including power management – Comtrol eCos User Manual

Page 657: Power modes

Advertising
background image

Introduction

Name

Introduction

— eCos support for Power Management

Introduction

The eCos Power Management package provides a framework for incorporating power management facilities in an
embedded application. However its functionality is deliberately limited.

1. The package does not contain any support for controlling the current power mode of any given processor,

device or board. Instead it is the responsibility of the appropriate HAL or device driver package to imple-
ment such support, by implementing power controllers. The power management package groups these power
controllers together and provides an interface for manipulating them.

2. The package does not contain any power management policy support. Specifically, including this package in an

application does not by itself ever cause the system to go into low-power mode. Instead it is the responsibility
of a separate policy module, provided by higher-level application code or by some other package, to decide
when it would be appropriate to switch from one power mode to another. The power management package
then provides the mechanisms for making it happen.

Including Power Management

The power management package is never included automatically in an eCos configuration: it is not part of any target
specification or of any template. Instead it must be added explicitly to a configuration if the intended application
requires power management functionality. When using the command-line ecosconfig tool this can be achieved
using a command such as:

$ ecosconfig add power

The generic eCos user documentation should be consulted for more information on how to use the various tools.
The functionality provided by the power management package is defined in the header file

cyg/power/power.h

.

This header file can be used by both C and C++ code.

Power Modes

There are four defined modes of operation:

active

The system is fully operational, and power consumption is expected to be high.

idle

There has been little or no activity for a short period of time. It is up to the policy module to determine what
constitutes a short period of time, but typically it will be some tenths of a second or some small number of

553

Advertising