SlideShare a Scribd company logo
1 of 37
Power Management
     in Embedded
         Systems


                                                       Colin Walls
       colin_walls@mentor.com
                                                mentor.com/embedded


Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Agenda
Introduction
Hardware choice
Use cases
Operating system
BSP and drivers
Hibernate/suspend
Application development
Measurement and testing
Conclusions
Agenda
Introduction
Hardware choice
Use cases
Operating system
BSP and drivers
Hibernate/suspend
Application development
Measurement and testing
Conclusions
Introduction
Importance of power steadily growing
Mainly complex battery-powered devices
Demand for connectivity
Power optimization often done late
Needs to be considered from the outset
Introduction
Choose hardware with right capabilities
Allow software to manage power
Choose OS and drivers
Define power usage profiles
Choose measurable goals
Use goals throughout development process
Introduction
               •   Choose appropriate
                   hardware
               •   Consider usage
               •   Select operating
                   system
               •   Address driver/BSP
                   issues
               •   Application code
                   has least influence
                   on power
Agenda
Introduction
Hardware choice
Use cases
Operating system
BSP and drivers
Hibernate/suspend
Application development
Measurement and testing
Conclusions
Hardware choice
Biggest influence on power consumption
  – Defines the very best case power saving
CPU features
  – Turn off blocks; e.g. Peripherals
  – Dynamic Voltage and Frequency Scaling (DVFS)
     –   Defines operating points
  – Low power modes
Need to look at wider design to ensure compatibility
with above
Agenda
Introduction
Hardware choice
Use cases
Operating system
BSP and drivers
Hibernate/suspend
Application development
Measurement and testing
Conclusions
Use cases
Function that a device performs
  – With or without user interaction
Hypothetical example:
  – Medical device
  – Battery powered
  – LCD display
  – Monitors vital signs
  – Uploads data via Wi-Fi
Use cases for example




1. Device takes a complete measurement
2. Device uploads a set of measured data
3. User checks his/her own vitals using a built in display
4. Device is idle awaiting the next measurement
Use cases for example
How much functionality needed for each use case?
  – Hence which drivers [hardware blocks] need to be enabled
    per use case?
Estimated energy for each use case:
  – Estimated power consumption
  – Estimated time in use case
Applying use case expected frequency as scaling
factor leads to energy breakdown showing battery
charge usage over time period
Use cases for example

        Use Case         Average Current   Duration   Frequency per   Total time   ENERGY USED
                              (mA)           (s)           day         (s/day)      (mAh/day)
      Vitals
      Measurement              158            1           288            288           13
      Data Upload              250            3           288            864           60
      User Vitals
      Check                    320           30            15            450           40
      Idle (Hibernate)          1                                      84798           24
      TOTAL                                                                            136




     Determine early whether estimated
     battery life is achievable
Use cases for example
Data Upload is highest use of energy
Maybe measure and upload every 5 minutes is too
costly
Perhaps measure every 5 minutes, but upload every
30 minutes
  – Also upload if there is a major change in vitals
User Vitals Check is second biggest
  – Assumes 30 second display timeout
  – Maybe it could be shorter
  – Most other hardware shut down in this use case
Agenda
Introduction
Hardware choice
Use cases
Operating system
BSP and drivers
Hibernate/suspend
Application development
Measurement and testing
Conclusions
Operating system
Significant impact on power saving
Must support low power features
  – DVFS
  – Idle/sleep modes
Native power framework most efficient
  – BSP must be written to address power issues
  – Each driver has well defined power states
Power framework


 = Hardware power management

 = Application Software

 = RTOS Power Mgmt Framework
Agenda
Introduction
Hardware choice
Use cases
Operating system
BSP and drivers
Hibernate/suspend
Application development
Measurement and testing
Conclusions
BSP and drivers
Define power requirements for each driver. Specify:
  – Which power states is supports
     –   ON, STANDBY, SLEEP, OFF
  – What operating points will the driver be used at. For
    example:
     –   While ON it must work at 200MHz and 100MHz
     –   SLEEP may result in 1MHz clock
  – DVFS participation
  – DMA transfer notification
Agenda
Introduction
Hardware choice
Use cases
Operating system
BSP and drivers
Hibernate/suspend
Application development
Measurement and testing
Conclusions
Hibernate/suspend
Some hardware facilitates very low power consumption
modes
  – Suspend: all hardware switched off, except for RAM, the
    contents of which are protected
  – Hibernate: RAM contents are stored in non-volatile
    memory and everything switched off
Hibernate/suspend
Cost to enter/exit these modes
  – Power
  – Time – device responsiveness
Depends on how much of the system is ON when
mode is entered
  – Need to save state and reinitialize
Hibernate also has cost of storing RAM, which varies
with the amount of RAM in use
  – Also potentially reduces system lifetime
Hibernate/suspend
Does power benefit offset costs?
For example device, depends on:
  – Measurement interval
  – How often wake up is required
Adjusting measurement interval might make suspend
or hibernate efficient or expensive
Agenda
Introduction
Hardware choice
Use cases
Operating system
BSP and drivers
Hibernate/suspend
Application development
Measurement and testing
Conclusions
Application development
Last layer of software
Badly written code can very adversely affect power
performance
An OS with built-in power features [a framework]
simplifies matters
  – Application code writer is then less concerned with details
Application development
Application consists of a number of independent
tasks/threads
Each task [or group of tasks] registers its power needs:
  – Which peripherals are used
  – Minimum operating point
OS takes care of power management along with
context switch
Agenda
Introduction
Hardware choice
Use cases
Operating system
BSP and drivers
Hibernate/suspend
Application development
Measurement and testing
Conclusions
Measurement and testing
Power should be measured from day #1
Possible by planning:
  – Setting power requirements for drivers
  – Defining use cases
  – Mapping use cases to applications
All software engineers should be equipped to measure
power
Measurement and testing
Meeting power requirements should be regarded as
part of code functionality
For example:
  – A Wi-Fi driver may work well with all wireless networks
  – Must be able to be turned off and reduce power to [near]
    zero
  – Must turn back on and be fully functional
  – Functionality must be repeatable [say, 100,000 times]
Measurement and testing
Drivers should have power functionality thoroughly
tested:
  – Properly enable/disable hardware
  – Participate in DVFS
  – Inform the OS of DMA requirements
Power Consumption at Various
OPs
Operating Point     Hibernate        0
   voltage
    (1.5V)            Standby            38

                  OP#0   1 MHz                        200

                  OP#1 63 MHz                             230

                  OP#2 297 MHz                                        370

                  OP#3 454 MHz                                              470


                                 0            100   200         300   400   500

                                          SOC Current Consumption
                                                        (mA)
                                                    i.MX28 Board
Impact on Battery Life …

             mAh      Percentage   mAh   Battery
            (Board)   Usage per           (hrs)
                          hr

OP #3        470        10%        47
OP #2        370         5%        19
OP #1        230        10%        23
OP #0        200        15%        30
Standby       38        20%         8

Hibernate     0         40%         0

Total                              126    19
                                                             mAh      Battery
                                                            (Board)    (hrs)
  Nucleus Power Management Framework
                                                   OP #3     470
                                                   Total                5

                                                     No Power Management
Final optimizations
The approach discussed should yield power
performance on spec.
There may be room for more optimization
Do final review of use cases
Possible changes:
  – Different operating parameters
  – New use cases
Agenda
Introduction
Hardware choice
Use cases
Operating system
BSP and drivers
Hibernate/suspend
Application development
Measurement and testing
Conclusions
Conclusions
Power will continue to be a challenge for embedded
developers
  – No longer a “hardware issue”
Support for new power saving hardware features is
essential
With complex software, it is not possible to ignore up-
front power planning
  – Power optimization at the end is impractical
Thank you

                                                               Colin Walls
                     colin_walls@mentor.com
http://blogs.mentor.com/colinwalls

                                                  mentor.com/embedded


  Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions.
  Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.

More Related Content

What's hot

What's hot (20)

RT linux
RT linuxRT linux
RT linux
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos concepts
 
Simultaneously Leveraging Linux and Android in a GENIVI compliant IVI System
Simultaneously Leveraging Linux and Android in a GENIVI compliant IVI System Simultaneously Leveraging Linux and Android in a GENIVI compliant IVI System
Simultaneously Leveraging Linux and Android in a GENIVI compliant IVI System
 
Embedded Systems - Training ppt
Embedded Systems - Training pptEmbedded Systems - Training ppt
Embedded Systems - Training ppt
 
introduction to Embedded System
introduction to Embedded Systemintroduction to Embedded System
introduction to Embedded System
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Introduction to Embedded Architecture
Introduction to Embedded Architecture Introduction to Embedded Architecture
Introduction to Embedded Architecture
 
LCA13: Power State Coordination Interface
LCA13: Power State Coordination InterfaceLCA13: Power State Coordination Interface
LCA13: Power State Coordination Interface
 
Embedded Systems
Embedded SystemsEmbedded Systems
Embedded Systems
 
RTOS - Real Time Operating Systems
RTOS - Real Time Operating SystemsRTOS - Real Time Operating Systems
RTOS - Real Time Operating Systems
 
Ppt on six month training on embedded system & IOT
Ppt on six month training on embedded system & IOTPpt on six month training on embedded system & IOT
Ppt on six month training on embedded system & IOT
 
Introduction To Linux Kernel Modules
Introduction To Linux Kernel ModulesIntroduction To Linux Kernel Modules
Introduction To Linux Kernel Modules
 
Characteristics of Embedded Systems
Characteristics of Embedded SystemsCharacteristics of Embedded Systems
Characteristics of Embedded Systems
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and Properties
 
Arm Processor Based Speed Control Of BLDC Motor
Arm Processor Based Speed Control Of BLDC MotorArm Processor Based Speed Control Of BLDC Motor
Arm Processor Based Speed Control Of BLDC Motor
 
Presentation on embedded system by abhishek sharma
Presentation on embedded system by abhishek sharmaPresentation on embedded system by abhishek sharma
Presentation on embedded system by abhishek sharma
 
Artificial Intelligence in Small Embedded System
Artificial Intelligence in Small Embedded SystemArtificial Intelligence in Small Embedded System
Artificial Intelligence in Small Embedded System
 
LCD Theory and Working Principles
LCD Theory and Working PrinciplesLCD Theory and Working Principles
LCD Theory and Working Principles
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
The Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxThe Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on Linux
 

Similar to Power Management in Embedded Systems

참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의
DzH QWuynh
 
2012 ICONE20 Power Conference Developing Nuclear Power Plant TPMS Specificati...
2012 ICONE20 Power Conference Developing Nuclear Power Plant TPMS Specificati...2012 ICONE20 Power Conference Developing Nuclear Power Plant TPMS Specificati...
2012 ICONE20 Power Conference Developing Nuclear Power Plant TPMS Specificati...
Komandur Sunder Raj, P.E.
 

Similar to Power Management in Embedded Systems (20)

ps_guidelines.pdf
ps_guidelines.pdfps_guidelines.pdf
ps_guidelines.pdf
 
Power optimization for Android apps
Power optimization for Android appsPower optimization for Android apps
Power optimization for Android apps
 
How to achieve 95%+ Accurate power measurement during architecture exploration?
How to achieve 95%+ Accurate power measurement during architecture exploration? How to achieve 95%+ Accurate power measurement during architecture exploration?
How to achieve 95%+ Accurate power measurement during architecture exploration?
 
참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의
 
arc-flash-analysis-done-right.pdf
arc-flash-analysis-done-right.pdfarc-flash-analysis-done-right.pdf
arc-flash-analysis-done-right.pdf
 
ETAP - Arc flash analysis etap
ETAP - Arc flash analysis etapETAP - Arc flash analysis etap
ETAP - Arc flash analysis etap
 
ETAP - Arc flash analysis done Right
ETAP - Arc flash analysis done RightETAP - Arc flash analysis done Right
ETAP - Arc flash analysis done Right
 
Altera trcak g
Altera  trcak gAltera  trcak g
Altera trcak g
 
Relay Setting Calculation For REF615/ REJ601
Relay Setting Calculation For REF615/ REJ601Relay Setting Calculation For REF615/ REJ601
Relay Setting Calculation For REF615/ REJ601
 
E3 s binghamton
E3 s binghamtonE3 s binghamton
E3 s binghamton
 
BHAVESH AGRAWAL.pptx
BHAVESH AGRAWAL.pptxBHAVESH AGRAWAL.pptx
BHAVESH AGRAWAL.pptx
 
2012 ICONE20 Power Conference Developing Nuclear Power Plant TPMS Specificati...
2012 ICONE20 Power Conference Developing Nuclear Power Plant TPMS Specificati...2012 ICONE20 Power Conference Developing Nuclear Power Plant TPMS Specificati...
2012 ICONE20 Power Conference Developing Nuclear Power Plant TPMS Specificati...
 
Intel speed-select-technology-base-frequency-enhancing-performance
Intel speed-select-technology-base-frequency-enhancing-performanceIntel speed-select-technology-base-frequency-enhancing-performance
Intel speed-select-technology-base-frequency-enhancing-performance
 
embedded system introduction to microcontrollers
embedded system introduction to microcontrollersembedded system introduction to microcontrollers
embedded system introduction to microcontrollers
 
Arm7 architecture
Arm7 architectureArm7 architecture
Arm7 architecture
 
CPU Subsystem Total Power Consumption: Understanding the Factors and Selectin...
CPU Subsystem Total Power Consumption: Understanding the Factors and Selectin...CPU Subsystem Total Power Consumption: Understanding the Factors and Selectin...
CPU Subsystem Total Power Consumption: Understanding the Factors and Selectin...
 
Exitation System By Aqeel
Exitation System By AqeelExitation System By Aqeel
Exitation System By Aqeel
 
All (that i know) about exadata external
All (that i know) about exadata externalAll (that i know) about exadata external
All (that i know) about exadata external
 
Soc.pptx
Soc.pptxSoc.pptx
Soc.pptx
 
Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013
Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013
Your Linux AMI: Optimization and Performance (CPN302) | AWS re:Invent 2013
 

More from mentoresd

More from mentoresd (8)

Getting Your Medical Device FDA Approved
Getting Your Medical Device FDA ApprovedGetting Your Medical Device FDA Approved
Getting Your Medical Device FDA Approved
 
Security for io t apr 29th mentor embedded hangout
Security for io t apr 29th mentor embedded hangoutSecurity for io t apr 29th mentor embedded hangout
Security for io t apr 29th mentor embedded hangout
 
Internet of Things Connectivity for Embedded Devices
Internet of Things Connectivity for Embedded DevicesInternet of Things Connectivity for Embedded Devices
Internet of Things Connectivity for Embedded Devices
 
Technology, Business and Regulation of the Connected Car
Technology, Business and Regulation of the Connected CarTechnology, Business and Regulation of the Connected Car
Technology, Business and Regulation of the Connected Car
 
Meeting SEP 2.0 Compliance: Developing Power Aware Embedded Systems for the M...
Meeting SEP 2.0 Compliance: Developing Power Aware Embedded Systems for the M...Meeting SEP 2.0 Compliance: Developing Power Aware Embedded Systems for the M...
Meeting SEP 2.0 Compliance: Developing Power Aware Embedded Systems for the M...
 
How to Measure RTOS Performance
How to Measure RTOS Performance How to Measure RTOS Performance
How to Measure RTOS Performance
 
Profiling Multicore Systems to Maximize Core Utilization
Profiling Multicore Systems to Maximize Core Utilization Profiling Multicore Systems to Maximize Core Utilization
Profiling Multicore Systems to Maximize Core Utilization
 
Developing the Next Generation Embedded HMIs
Developing the Next Generation Embedded HMIs Developing the Next Generation Embedded HMIs
Developing the Next Generation Embedded HMIs
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Power Management in Embedded Systems

  • 1. Power Management in Embedded Systems Colin Walls colin_walls@mentor.com mentor.com/embedded Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
  • 2. Agenda Introduction Hardware choice Use cases Operating system BSP and drivers Hibernate/suspend Application development Measurement and testing Conclusions
  • 3. Agenda Introduction Hardware choice Use cases Operating system BSP and drivers Hibernate/suspend Application development Measurement and testing Conclusions
  • 4.
  • 5. Introduction Importance of power steadily growing Mainly complex battery-powered devices Demand for connectivity Power optimization often done late Needs to be considered from the outset
  • 6. Introduction Choose hardware with right capabilities Allow software to manage power Choose OS and drivers Define power usage profiles Choose measurable goals Use goals throughout development process
  • 7. Introduction • Choose appropriate hardware • Consider usage • Select operating system • Address driver/BSP issues • Application code has least influence on power
  • 8. Agenda Introduction Hardware choice Use cases Operating system BSP and drivers Hibernate/suspend Application development Measurement and testing Conclusions
  • 9. Hardware choice Biggest influence on power consumption – Defines the very best case power saving CPU features – Turn off blocks; e.g. Peripherals – Dynamic Voltage and Frequency Scaling (DVFS) – Defines operating points – Low power modes Need to look at wider design to ensure compatibility with above
  • 10. Agenda Introduction Hardware choice Use cases Operating system BSP and drivers Hibernate/suspend Application development Measurement and testing Conclusions
  • 11. Use cases Function that a device performs – With or without user interaction Hypothetical example: – Medical device – Battery powered – LCD display – Monitors vital signs – Uploads data via Wi-Fi
  • 12. Use cases for example 1. Device takes a complete measurement 2. Device uploads a set of measured data 3. User checks his/her own vitals using a built in display 4. Device is idle awaiting the next measurement
  • 13. Use cases for example How much functionality needed for each use case? – Hence which drivers [hardware blocks] need to be enabled per use case? Estimated energy for each use case: – Estimated power consumption – Estimated time in use case Applying use case expected frequency as scaling factor leads to energy breakdown showing battery charge usage over time period
  • 14. Use cases for example Use Case Average Current Duration Frequency per Total time ENERGY USED (mA) (s) day (s/day) (mAh/day) Vitals Measurement 158 1 288 288 13 Data Upload 250 3 288 864 60 User Vitals Check 320 30 15 450 40 Idle (Hibernate) 1 84798 24 TOTAL 136 Determine early whether estimated battery life is achievable
  • 15. Use cases for example Data Upload is highest use of energy Maybe measure and upload every 5 minutes is too costly Perhaps measure every 5 minutes, but upload every 30 minutes – Also upload if there is a major change in vitals User Vitals Check is second biggest – Assumes 30 second display timeout – Maybe it could be shorter – Most other hardware shut down in this use case
  • 16. Agenda Introduction Hardware choice Use cases Operating system BSP and drivers Hibernate/suspend Application development Measurement and testing Conclusions
  • 17. Operating system Significant impact on power saving Must support low power features – DVFS – Idle/sleep modes Native power framework most efficient – BSP must be written to address power issues – Each driver has well defined power states
  • 18. Power framework = Hardware power management = Application Software = RTOS Power Mgmt Framework
  • 19. Agenda Introduction Hardware choice Use cases Operating system BSP and drivers Hibernate/suspend Application development Measurement and testing Conclusions
  • 20. BSP and drivers Define power requirements for each driver. Specify: – Which power states is supports – ON, STANDBY, SLEEP, OFF – What operating points will the driver be used at. For example: – While ON it must work at 200MHz and 100MHz – SLEEP may result in 1MHz clock – DVFS participation – DMA transfer notification
  • 21. Agenda Introduction Hardware choice Use cases Operating system BSP and drivers Hibernate/suspend Application development Measurement and testing Conclusions
  • 22. Hibernate/suspend Some hardware facilitates very low power consumption modes – Suspend: all hardware switched off, except for RAM, the contents of which are protected – Hibernate: RAM contents are stored in non-volatile memory and everything switched off
  • 23. Hibernate/suspend Cost to enter/exit these modes – Power – Time – device responsiveness Depends on how much of the system is ON when mode is entered – Need to save state and reinitialize Hibernate also has cost of storing RAM, which varies with the amount of RAM in use – Also potentially reduces system lifetime
  • 24. Hibernate/suspend Does power benefit offset costs? For example device, depends on: – Measurement interval – How often wake up is required Adjusting measurement interval might make suspend or hibernate efficient or expensive
  • 25. Agenda Introduction Hardware choice Use cases Operating system BSP and drivers Hibernate/suspend Application development Measurement and testing Conclusions
  • 26. Application development Last layer of software Badly written code can very adversely affect power performance An OS with built-in power features [a framework] simplifies matters – Application code writer is then less concerned with details
  • 27. Application development Application consists of a number of independent tasks/threads Each task [or group of tasks] registers its power needs: – Which peripherals are used – Minimum operating point OS takes care of power management along with context switch
  • 28. Agenda Introduction Hardware choice Use cases Operating system BSP and drivers Hibernate/suspend Application development Measurement and testing Conclusions
  • 29. Measurement and testing Power should be measured from day #1 Possible by planning: – Setting power requirements for drivers – Defining use cases – Mapping use cases to applications All software engineers should be equipped to measure power
  • 30. Measurement and testing Meeting power requirements should be regarded as part of code functionality For example: – A Wi-Fi driver may work well with all wireless networks – Must be able to be turned off and reduce power to [near] zero – Must turn back on and be fully functional – Functionality must be repeatable [say, 100,000 times]
  • 31. Measurement and testing Drivers should have power functionality thoroughly tested: – Properly enable/disable hardware – Participate in DVFS – Inform the OS of DMA requirements
  • 32. Power Consumption at Various OPs Operating Point Hibernate 0 voltage (1.5V) Standby 38 OP#0 1 MHz 200 OP#1 63 MHz 230 OP#2 297 MHz 370 OP#3 454 MHz 470 0 100 200 300 400 500 SOC Current Consumption (mA) i.MX28 Board
  • 33. Impact on Battery Life … mAh Percentage mAh Battery (Board) Usage per (hrs) hr OP #3 470 10% 47 OP #2 370 5% 19 OP #1 230 10% 23 OP #0 200 15% 30 Standby 38 20% 8 Hibernate 0 40% 0 Total 126 19 mAh Battery (Board) (hrs) Nucleus Power Management Framework OP #3 470 Total 5 No Power Management
  • 34. Final optimizations The approach discussed should yield power performance on spec. There may be room for more optimization Do final review of use cases Possible changes: – Different operating parameters – New use cases
  • 35. Agenda Introduction Hardware choice Use cases Operating system BSP and drivers Hibernate/suspend Application development Measurement and testing Conclusions
  • 36. Conclusions Power will continue to be a challenge for embedded developers – No longer a “hardware issue” Support for new power saving hardware features is essential With complex software, it is not possible to ignore up- front power planning – Power optimization at the end is impractical
  • 37. Thank you Colin Walls colin_walls@mentor.com http://blogs.mentor.com/colinwalls mentor.com/embedded Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.