NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Startup shutdown and power management

From Texas Instruments Wiki
Jump to: navigation, search

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.

Startup time[edit]

General optimization[edit]

DaVinci DSP turn on example[edit]

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

DaVinci ARM Linux power management[edit]

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

Power management patch[edit]

Kernel options[edit]

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[edit]

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[edit]

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[edit]

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[edit]

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

  • You can use ethernet as wake up source, so nothing else uses it (e.g. no NFS) while standby is entered.
  • If sound driver is enabled (configured and compiled into kernel) make sure you apply above audio patch to be able to wake from standby.

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[edit]

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:

  • Power saving: In standby, we can save more power using PSC and switch off/on all unneeded peripherals
  • Power saving: In standby, we can save more power gating input clocks of memory controller. See SPRUE22C, section 2.15
  • Robustness: Before going to standby, check for still running DMAs
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Startup shutdown and power management here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Startup shutdown and power management here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Startup shutdown and power management here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Startup shutdown and power management here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Startup shutdown and power management here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Startup shutdown and power management here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Startup shutdown and power management here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Startup shutdown and power management here. 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

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity