Embedded System Design Techniques™:

Slides:



Advertisements
Similar presentations
Augusto Panecatl Technical Information and Customer Support
Advertisements

1 ELE271 Mon. April 7, Review LPM -Morse Code Lab -.ref and.def -Multiplication, shift.
STM32F10x Changes v1.5 to 1.4 HD added Changes v1.4 to 1.3
Lizard Labs Peripheral Reflex System
Chung-Ta King National Tsing Hua University
Oscilloscope Watch Teardown. Agenda History and General overview Hardware design: – Block diagram and general overview – Choice of the microcontroller.
Getting Started with a Cortex-M3 Board
NS Training Hardware. System Controller Module.
3-1 System peripherals & Bus Structure Memory map of the LPC2300 device is one contiguous 32-bit address range. However, the device itself is made up of.
Hardware Overview Net+ARM – Well Suited for Embedded Ethernet
Introduction to the Orbit Edu Board Ahmad Rahmati Teaching Assistant, ELEC424 Rice Efficient Computing Group Sep 12, 2007.
NetBurner MOD 5282 Network Development Kit MCF 5282 Integrated ColdFire 32 bit Microcontoller 2 DB-9 connectors for serial I/O supports: RS-232, RS-485,
Renesas Electronics Europe GmbH A © 2010 Renesas Electronics Corporation. All rights reserved. RL78 Clock Generator.
V 0.91 Polled IO versus Interrupt Driven IO Polled Input/Output (IO) – processor continually checks IO device to see if it is ready for data transfer –Inefficient,
System Clocks.
LPC2148 Programming Using BLUEBOARD
Typical Microcontroller Purposes
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
Page 1 D&C EBV Seminar June 2003 Motor Demo C868 Chevillot/Jansen June 2003 N e v e r s t o p t h i n k i n g. Infineon C868 Hands On Training CAPCOM6.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Power Management of iPAQ Sukjae Cho
ECS642U Embedded Systems Cyclic Execution and Polling William Marsh.
Low Power Modes MTT48 V LOW POWER OPERATION.
ARM Cortex-M0 August 23, 2012 Paul Nickelsberg Orchid Technologies Engineering and Consulting, Inc. CORTEX-M0 Structure Discussion.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Embedded Network Interface (ENI). What is ENI? Embedded Network Interface Originally called DPO (Digital Product Option) card Printer without network.
1 ARM University Program Copyright © ARM Ltd 2013 Using Direct Memory Access to Improve Performance.
DSP C5000 Chapter 10 Understanding and Programming the Host Port Interface (EHPI) Copyright © 2003 Texas Instruments. All rights reserved.
Lecture 4 General-Purpose Input/Output NCHUEE 720A Lab Prof. Jichiang Tsai.
Presented by: © 2015 Jacob Beningo All Rights Reserved Writing Portable and Robust Firmware in C September 2, 2015 Jacob Beningo, CSDP Class 3: Uart Driver.
Presented by: © 2015 Jacob Beningo All Rights Reserved Writing Portable and Robust Firmware in C September 4, 2015 Jacob Beningo, CSDP Class 5: Robust.
1 The LPC1768 Architecture (with focus on Cortex-M3)
Case Study #1 Microcontroller System. What is a microcontroller? A microcontroller can be considered a self-contained system with a processor, memory.
Application Case Study Christmas Lights Controller
Lizard Labs Peripheral Reflex System
-Low Power and System Control Features
Introduction to the ARM mbed Platform– A Hands-on Course
AT91 Power Management This training module describes the Power Management options provided by the AT91 family of microcontrollers. These options address.
Embedded System Design Techniques™:
Embedded Software Development with Python and the Raspberry Pi
Microcontrollers & GPIO
Embedded Software Development with Python and the Raspberry Pi
Refer to Chapter 5 in the reference book
NS Training Hardware.
Introduction to the Orbit Edu Board
An Introduction to Embedded Software Architecture and Design
Baremetal C Programming for Embedded Systems
SPI Protocol and DAC Interfacing
Class 1: An Introduction to Low Power Systems
Embedded Software Development with Python and the Raspberry Pi
An Introduction to Embedded Software Architecture and Design
Journey: Introduction to Embedded Systems
Getting the Most Out of Low Power MCUs
Controlling Sensors Efficiently with MCUs
Writing Portable and Robust Firmware in C
Writing Portable and Robust Firmware in C
February 26, 2015 Jacob Beningo, CSDP
Baremetal C Programming for Embedded Systems
CPE 323 Introduction to Embedded Computer Systems: DMA Controller
Designing with ARM Cortex-M4 (and a Real Dev Board)
NetSilicon & Digi Confidential
Baremetal C Programming for Embedded Systems
嵌入式微控制器编程 Embedded Microcontroller Programming
An Introduction to Embedded Software Architecture and Design
An Introduction to Embedded Software Architecture and Design
Wireless Embedded Systems
An Introduction to Embedded Software Architecture and Design
February 24, 2015 Jacob Beningo, CSDP
NS Training Hardware.
Presentation transcript:

Embedded System Design Techniques™: Mastering the ARM© Cortex-M© Processor Class 5: Low Power Design Techniques May 22, 2015 Jacob Beningo, CSDP

Course Overview Overview of STM32 ARM Cortex-M0+ Project Setup and Compilation ARM Cortex-M Architecture Writing Embedded Software with CMSIS Low Power Design Techniques

Session Overview Energy Profiling Wait for Interrupt Sleep-on-exit Low Power Modes Low Power Example

Introduction So what is the problem? Consumer Level Demand for longer battery lives Devices are used more often for longer periods of time Engineering Level Short design cycles Management Decisions Lack of low power experience Use of Proper tools

Energy Profiling 3.7 V Energy Profile Key Points Power profile can be calculated from A x V Energy Profile can be approximated by current only! Integrating the energy profile will provide mAh used Can be used to identify heavy energy usage periods Can be used to estimate battery discharge time

Energy Profile – STM32CubeMx

Low Power Modes – STM32Lx

Low Power Mode Summary

Power Mode Registers

WFI vs WFE if(WakeupType == POWER_WAKE_WFI) { /* Wait For Interrupt */ __WFI(); } else /* Wait For Event */ __SEV(); __WFE();

Sleep on Exit

Wakeup Considerations

STM32 Sleep Mode Example DEBUGGER WARNING! void Power_ModeStop(PowerWake_t WakeupType) { uint32_t temp = 0; temp = PWR->CR; temp &= (uint32_t)~(PWR_CR_PDDS | PWR_CR_LPSDSR); PWR->CR = temp; SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; if(WakeupType == POWER_WAKE_WFI) __WFI(); } WARNING! DEBUGGER Sleep

STM32 Sleep Mode Example // Enable the SYSCFG block RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN; // Setup Interrupts on GPIO C13 SYSCFG->EXTICR[3] |= SYSCFG_EXTICR4_EXTI13_PC; // set pin to use // Configure GPIO C13 as an external interrupt for falling edge EXTI->IMR |= EXTI_IMR_IM13; // unmask interrupt EXTI->EMR |= EXTI_EMR_EM13; // unmask event EXTI->RTSR &= ~EXTI_RTSR_TR13; // set rising edge EXTI->FTSR |= EXTI_FTSR_TR13; // set falling edge // Interrupt to enable for button NVIC_EnableIRQ(EXTI4_15_IRQn);

STM32 Sleep Mode Example void EXTI4_15_IRQHandler(void) { if (EXTI->PR & (1<<13)) // clear pending interrupt EXTI->PR |= (1<<13); } void Tsk_1000ms(void) Power_ModeStop(POWER_WAKE_WFI);

Tips for Energy Conservation Tip #1 – Turn Off Unused Module and Clocks If it is not being used then don’t let it consume energy! Clock gating stops the peripheral from causing logic to switch which uses energy P = C * F * Vcc2 + IL * Vcc

Tips for Energy Conservation Tip #2 – Use a LPT or RTC Lower Energy Usage due to slower OSC Used to interrupt system and wake up from extremely low power state

Tips for Energy Conservation Tip #3 – Beware Communication Channels Can be power hungry peripherals May require periodic waking Use DMA to lighten the Load Can keep the CPU asleep Transfer data from peripheral to memory Uart Serial Wake-Up Peripheral Sleeps until data is received Wakes up and then performs functions

Tips for Energy Conservation Tip #4 – Use Energy Profiling Tools

Tips for Energy Conservation Tip #5 - Think Outside the Box USB Device USB Host D+ D- USB Device USB Host Tx Rx

Additional Resources Download Course Material for Updated C Doxygen Templates (May 2015) Example source code Templates Microcontroller API Standard EDN Embedded Basics Articles Embedded Bytes Newsletter From www.beningo.com under - Blog and Articles > Software Techniques > CEC Mastering ARM Cortex-M

Jacob Beningo Newsletters P.O. Box 400 Embedded Bytes Linden, Michigan 48451 www.beningo.com Newsletters Embedded Bytes http://bit.ly/1BAHYXm Training MicroPython Bootloaders Low Power Design Real-time Software C/C++ Embedded : jacob@beningo.com : 810-844-1522 : Jacob_Beningo : Beningo Engineering : JacobBeningo : Embedded Basics Jacob Beningo Principal Consultant 22