Startup shutdown and power management

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

For an embedded system like a DaVinci based system, proper and fast system startup and shutdown is more important than for an standard desktop PC based system. Same for power management. For most of these standard Linux mechanisms or at least special embedded techniques can be used. Most of them are not DaVinci specific. So this article will mainly list general resources regarding system startup, shutdown and power management usable on DaVinci based systems as well.

Contents

Startup time

General optimization

DaVinci DSP turn on example

CCS gel file example how to turn on DSP posted to mailing list.

DaVinci ARM Linux power management

For DaVinci ARM git kernel power management support is currently not part of the kernel, but a patch is available.

Power management patch

Kernel options

Once applied above patches, enable power management in kernel:

CONFIG_PM=y
# CONFIG_PM_LEGACY is not set
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND_UP_POSSIBLE=y
CONFIG_SUSPEND=y

At kernel startup you then should get

...
Power Management for DaVinci initializing
...

in boot message output.

Features

It support two modes: Normal ARM idle (WaitForInterrupt, WFI) waking at every (timer etc.) interrupt and deeper sleep (suspend/standby) with SDRAM switched to self refresh waking only on selected (wake) interrupts. The "normal" ARM idle ("mpu idle") is on by default. The sleep mode (standby) is entered only on request. You need a proper wake up source configured. For testing, the patch assumes used on a system without any network traffic (e.g. no NFS), so it can use network (EMAC) as wake source.

Usage

The two DaVinci power management modes can be controlled and observed by the /sys/power interface. You can get the supported power management states by reading /sys/power/state:

# cat /sys/power/state
standby
# 

ARM idle

ARM idle mode is on by default, you don't have to configure anything. How often it is entered you can observe by reading /sys/power/count_idle:

# cat /sys/power/count_idle
18788
#

Standby

Standby mode is only entered on request. If using above power management patch, make sure

You can observe standby count by reading /sys/power/count_standby and entering standby by writing string standby to /sys/power/state:

# cat /sys/power/count_standby
0
# echo standby > /sys/power/state
Stopping tasks ...done.
Suspending console(s)

System is at standby now, you are not able to enter anything. All interrupts except EMAC are switched off! On host PC do something with network, e.g. ping target. Then system wakes up:

aic23 powering down
aic23 powering up
aic23_init_power() done
Restarting tasks ... done.
# cat /sys/power/count_standby
1
#

Note: Regarding /sys/power interface of Linux kernel see kernel documentation.

ToDo

The power management functionality (patch) described here provides the basic power management functionality for DaVinci. Regarding save as much power as possible it isn't perfect. Additional features/code can be added to save even more power and make it more robust. This is:

E2e.jpg For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Startup shutdown and power management here.
Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment

Comments

Comments on Startup shutdown and power management


Weijiang said ...

This page is out of date.

--Weijiang 06:31, 28 October 2010 (CDT)

Avivi said ...

Can this be used on DM365?

--Avivi 19:56, 17 November 2010 (CST)

Htbegin said ...

the version 3 of the power manager patch has been merged into mainline linux (http://kerneltrap.org/mailarchive/git-commits-head/2010/3/1/25596)

--Htbegin 02:41, 25 November 2010 (CST)

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox