Designing for Ultra-Low Power with MSP430

Similar documents
Designing for Ultra-Low Power with MSP430

XIO1100 NAND-Tree Test

Application Report. 1 Hardware Description. John Fahrenbruch... MSP430 Applications

Wolverine - based microcontrollers. Slashing all MCU power consumption in half

Application Report. 1 System Requirements. 2 Using the DM643x Pin Multiplexing Utility. Bernard Thompson...

System-on-Chip Battery Board User s Guide

DSP/BIOS Link. Platform Guide Published on 20 th JUNE Copyright 2009 Texas Instruments Incorporated.

AC Induction Motor (ACIM) Control Board

Hands-On: Implementing an RF link with MSP430 and CC1100

Bootstrap Loader (BSL) Scripter User s Guide

This document describes the features of the GUI program used to control Power Line Modem with E-Meter Platform.

DS25BR204 Evaluation Kit

The examples in this application report require the Flash API Modules (SPRC236) within the "Tools & Software" folder.

description VCC 1PRE 1OC 1D1 1C 1Q1 1Q2 1Q3 1Q4 2Q1 2Q2 2Q3 2Q4 2C 2PRE 1D2 1D3 1D4 2D1 2D2 2D3 2D4 2OC GND 1PRE 1OC 1Q1 1D1 1Q2 1Q3 1Q4 1D2 1D3 1D4

Table 1. Proper Termination of Unused (Port) Pins in a Single-Port PSE System

ez430-rf2480 Sensor Monitor SWRU Low-Power RF

TMS320C6414T/15T/16T Power Consumption Summary

TMS470R1x External Clock Prescale (ECP) Reference Guide

Application Note AN045

WL1271 ini File Description and Parameters User's Guide

Stacking the REF50xx for High-Voltage References

TPS62290EVM-279. User's Guide SLVU217 July 2007

TCI6616/C6670/TCI6608/C6678 Device Simulator EMAC Model I/O user-guide

PRODUCT DATASHEET. Features. IPNetCam Reference Design on DM365 Product Release 1.5.0, Nov 2009

Application Report. 1 Introduction. MSP430 Applications. Keith Quiring... ABSTRACT

Protecting the TPS25810 from High Voltage DFPs

TMS320C6000 DSP Interrupt Selector Reference Guide

DaVinci System Optimization

Using Endianess Conversion in the OMAP5910 Device

PCIxx12 Single Socket CardBus Controller with Integrated 1394a-2000 OHCI Two-Port PHY/Link-Layer Controller

Ethernet-Enabled Intelligent Display Modules (IDMs)

TMS320C64x DSP Peripheral Component Interconnect (PCI) Performance

Power Line Modem with E-Meter Platform Quick Start Guide

TMS470R1VF334E TMS470 Microcontrollers Silicon Errata

UCD3138 Responding to Multiple PMBus Slave Addresses

TMS320C6000 DSP 32-Bit Timer Reference Guide

PACKAGE OPTION ADDENDUM

Quad-Channel TEC Controller Getting Started Guide. Contents. Introduction. Contents of Evaluation Kit

Calibration Routines and Register Value Generation for the ADS1216, ADS1217 and ADS1218

HV Solar MPPT DC-DC GUI Overview. Getting Started Guide

SN5476, SN54LS76A SN7476, SN74LS76A DUAL J-K FLIP-FLOPS WITH PRESET AND CLEAR

External Programming of the TMS320C64x EDMA for Low Overhead Data Transfers

SN64BCT757 OCTAL BUFFER/DRIVER WITH OPEN-COLLECTOR OUTPUTS

TMS320C620x/C670x DSP Boot Modes and Configuration Reference Guide

MSP430F20xx Device Erratasheet

DRV8833 Evaluation Module. User's Guide

TMS320C6000 DSP General-Purpose Input/Output (GPIO) Reference Guide

2. With the Evaluation Kit DVD, click the Tools button and then click the Code Composer Studio logo to start the setup program.

USB Connectivity using MSP430 and TUSB3410

User s Guide for Sonic MDIO Software

Interfacing the ADS8320/ADS8325 to The TMS320C6711 DSP

18-Line SCSI Terminator (Reverse Disconnect) UCC5617 FEATURES DESCRIPTION BLOCK DIAGRAM

4-Level Strap Device Configuration

TMS320C672x DSP Software-Programmable Phase-Locked Loop (PLL) Controller. Reference Guide

Table 1. EVM Description

Application Report. Low-Power Wireless. Shreharsha Rao... ABSTRACT

Passing CISPR25-Radiated Emissions Using TPS54160-Q1

The photograph below shows the PMP9730 Rev E prototype assembly. This circuit was built on a PMP9730 Rev D PCB.

TVP5146 PDC and VPS APPLICATION NOTE HPA Digital Audio Video

AN-2245 MSP430 Interface to DAC161P997 Code Library

SN74BCT756 OCTAL BUFFER/DRIVER WITH OPEN-COLLECTOR OUTPUTS

Data sheet acquired from Harris Semiconductor SCHS041D Revised October 2003

Application Report. 1 Overview. Marc Sousa... Power Supply ABSTRACT

TPS63020EVM-487. User's Guide. 1 Introduction. 1.1 Background. 1.2 Performance Specification

SN65DSI86 SW Examples

Stereo Dac Motherboard application information

SN54155, SN54156, SN54LS155A, SN54LS156, SN74155, SN74156, SN74LS155A, SN74LS156 DUAL 2-LINE TO 4-LINE DECODERS/DEMULTIPLEXERS

UART Bootloader for Hercules TMS570LS04x MCU

TMS320C55x DSP Peripherals Overview Reference Guide. Preliminary Draft

SN54LS169B, SN54S169 SN74LS169B, SN74S169 SYNCHRONOUS 4-BIT UP/DOWN BINARY COUNTERS

IndoTraq Development Kit 1: Command Reference

1 Photo. 7/15/2014 PMP10283 Rev A Test Results

27 - Line SCSI Terminator With Split Disconnect

Design Considerations for Avoiding Timing Errors during High-Speed ADC, High-Speed ADC, LVDS Data Interface with FPGA

TPL5000EVM User's Guide

AN-2062 LM3549 Evaluation Kit

OMAP5912 Multimedia Processor Direct Memory Access (DMA) Support Reference Guide

DAP Signal Conditioning Board. User s Guide. Data Acquistion Digital/Analog Converters SLAU105

TLK10081 EVM Quick Start Guide Texas Instruments Communications Interface Products

Lecture 2 MSP430 Architecture. Atul Lele Ramakrishna Reddy

Using the DSP in the Dual-Core DaVinci as a Graphics Render Engine

Real-Time Clock Module With NVRAM Control. Time of day in seconds, minutes, and hours

2002 Mixed Signal Products SLAU056B

TMS320VC5501/5502 DSP Host Port Interface (HPI) Reference Guide

AN-2254 MSP430 Interface to LMP91200 Code Library

Test Report PMP Test Data For PMP /20/2015

Application Note AN057

Bluetooth Low Energy CC2540 Mini Development Kit User s Guide

A DSP/BIOS AIC23 Codec Device Driver for the TMS320C5510 DSK

HSKT TM Technology Specifications

TIDA Test Report

Programming With the MSP430AFE2xx Family and the MSP430i20xx Family

The photographs below show the top and bottom view of the PMP11282Rev A board, which is built on PMP11064 Rev B PCB. Top Side

This section contains background information for the TPS61085EVM evaluation module.

Features. Applications

2006 Mixed Signal Products SLAU049F

TFP101, TFP201, TFP401, TFP401A 2Pix/Clk Output Mode

TMS Bit RISC ARM7TDMI -Based Microcontroller Platform

TPD3S014-Q1 Evaluation Module

Single Cell Battery Power Solution

Transcription:

Designing for Ultra-Low Power with MSP430 Christian Hernitscheck MSP430 FAE Europe Texas Instruments 2006 Texas Instruments Inc, Slide 1

Agenda Introduction to Ultra-Low Power Looking for Ultra-Low Power Parts MSP430 The Ultra-Low Power MCU Low-Power Efficient Coding Techniques Summary 2006 Texas Instruments Inc, Slide 2

Achieving Ultra-low Power Extended Ultra-low Power standby mode Minimum active duty cycle Performance on-demand Always-on On demand 2006 Texas Instruments Inc, Slide 3

Ultra-low Power Clock Control CPU Off Off DCO on on ACLK on on 35uA Active DCO on on ACLK on on 250uA <6us Off Off All All Clocks Off Off 0.1uA LPM0 LPM3 RTC function LCD driver RAM/SFR retained Stand-by DCO off off ACLK on on 0.8uA <6us LPM4 RAM/SFR retained 2006 Texas Instruments Inc, Slide 4

Agenda Introduction to Ultra-Low Power Looking for Ultra-Low Power Parts MSP430 The Ultra-Low Power MCU Low-Power Efficient Coding Techniques Summary 2006 Texas Instruments Inc, Slide 5

Ultra-Low Power Architecture Multiple operating modes 0.1uA power down 0.7uA standby mode 250uA / 1MIPS Zero-power BOR 50nA pin leakage Modern CPU Minimum cycles per task Instant-on stable high-speed clock Intelligent peripherals 2006 Texas Instruments Inc, Slide 6

Power Consumption in CMOS Designs CMOS Inverter: Vin Vcc t I t Power Consumption of a CMOS Inverter: P = P stat + P Q + P dyn P stat = Vcc * I LL P Q = β / 12 * (Vcc 2*U Tn ) 3 * τ / T P dyn = C L * f * Vcc 2 2006 Texas Instruments Inc, Slide 7

MCU s Digital Supply Current CH2 MSP430 Vcc + - AVcc AVss DVcc DVss CH1 Reset CPU Clock 2006 Texas Instruments Inc, Slide 8

MSP430 Active Mode Supply Current MSP430F2131 data sheet [slas439a]: 2006 Texas Instruments Inc, Slide 9

Device, Voltage, Temperature & Clock MSP430F16x LPM3 LFXT1 MSP430F20xx LPM3 VLO Die size and # pins Family architectures and clock system 2006 Texas Instruments Inc, Slide 10

Power Manage Internal Peripherals Comparator_A P1OUT P1OUT = = 0x02; 0x02; // // Power Power divider CACTL1 = CARSEL + CAREF_2 + CAON; CAON; // // Comp_A on on if if (CAOUT & CACTL2) P1OUT P1OUT = = 0x01; 0x01; // // Fault Fault else else P1OUT P1OUT &= &= ~0x01; P1OUT P1OUT &= &= ~0x02; // // de-power divider CACTL1 = 0; 0; // // Disable Comp_A 2006 Texas Instruments Inc, Slide 11

Integrated Analog Power Managing ADC10 DAC12 OA 2006 Texas Instruments Inc, Slide 12

Agenda Introduction to Ultra-Low Power Looking for Ultra-Low Power Parts MSP430 The Ultra-Low Power MCU Low-Power Efficient Coding Techniques Summary 2006 Texas Instruments Inc, Slide 13

MSP430x11x/12x Basic Clock R2/SR: Reserved V SCG1 SCG0 OSC OFF CPU OFF GIE N Z C 2006 Texas Instruments Inc, Slide 14

Performance on Demand Interrupt DCO Immediate-stable clock start for reaction to events 2006 Texas Instruments Inc, Slide 15

Low Power Mode Configuration R2/SR: Reserved V SCG1 SCG0 OSC OFF CPU OFF GIE N Z C Active Mode 0 0 0 0 ~ 250uA LPM0 0 0 0 1 ~ 35uA LPM3 1 1 0 1 ~ 0.8uA LPM4 1 1 1 1 ~ 0.1uA Assembler Code Example: bis.w bis.w C Code Example: #CPUOFF,SR ; LPM0 LPM0 _BIS_SR (CPUOFF); // // LPM0 LPM0 2006 Texas Instruments Inc, Slide 16

Interrupt Processing Item1 Item2 SP Prior to ISR Item1 Item2 PC SR SP ISR hardware - automatically PC pushed SR pushed Interrupt vector moved to PC SR is cleared IFG flag cleared on single source flags Item1 Item2 PC SR SP reti - automatically SR popped - original PC popped 2006 Texas Instruments Inc, Slide 17

Low Power Modes In Assembler Item1 Item2 Item1 Item2 PC SR=0018 Item1 Item2 PC SR=0008 Item1 Item2 PC SR SP SP SP ORG ORG 0F000h RESET RESET mov.w mov.w #300h,SP mov.w mov.w #WDT_MDLY_32,&WDTCTL bis.b bis.b #WDTIE,&IE1 bis.b bis.b #01h,&P1DIR Mainloop bis.w bis.w #CPUOFF+GIE,SR xor.b xor.b #01h,&P1OUT jmp jmp Mainloop WDT_ISR bic.w bic.w #CPUOFF,0(SP) reti reti ORG ORG 0FFFEh DW DW RESET RESET ORG ORG 0FFF4h DW DW WDT_ISR 2006 Texas Instruments Inc, Slide 18

Low Power Modes In C Item1 Item2 Item1 Item2 PC SR=0018 Item1 Item2 PC SR=0008 Item1 Item2 PC SR SP SP SP void void main(void) { WDTCTL = WDT_MDLY_32; IE1 IE1 = = WDTIE; P1DIR P1DIR = = 0x01; 0x01; for for (;;) (;;) { _BIS_SR(CPUOFF + GIE); GIE); P1OUT P1OUT ^= ^= 0x01; 0x01; } } #pragma vector=wdt_vector interrupt void void watchdog_timer(void) { _BIC_SR_IRQ(CPUOFF); } 2006 Texas Instruments Inc, Slide 19

2xx Basic Clock Module+ with VLO Clock VLO provides crystal alternative Lower power < 500 nano-amp 2006 Texas Instruments Inc, Slide 20

Interrupts Control Program Flow 9600 baud UART RX TX // // Polling UART UART Receive for for (;;) (;;) { while while (!(IFG2&URXIFG0)); TXBUF0 = RXBUF0; } 100% CPU Load // // UART UART Receive Interrupt #pragma vector=uart_vector interrupt void void rx rx (void) { TXBUF0 = RXBUF0; } 0.1% CPU Load 2006 Texas Instruments Inc, Slide 21

Software Functions >> Peripherals MCU P1.2 // // Endless Loop Loop for for (;;) (;;) { P1OUT P1OUT = = 0x04; 0x04; // // Set Set delay1(); P1OUT P1OUT &= &= ~0x04; // // Reset Reset delay2(); } 100% CPU Load // // Setup Setup output unit unit CCTL1 CCTL1 = OUTMOD0_1; _BIS_SR(CPUOFF); Zero CPU Load 2006 Texas Instruments Inc, Slide 22

MSP430 ADC10 10-bit ADC 200ksps+ Autoscan Single Sequence Repeat-single Repeat-sequence Internal/external reference TA SOC triggers Direct transfer controller (DTC) 2006 Texas Instruments Inc, Slide 23

Is Timer-Triggered ADC Important? Timer Memory ADC // // Interrupt CPU CPU cycles ; MSP430 ISR ISR to to start start conversion 6 BIS BIS #ADC12SC,&ADC12CTL0 ; Start Start conversion 5 RETI RETI ; Return 5 ; 16 16 2006 Texas Instruments Inc, Slide 24

Why Is Autoscan + DTC Important? AUTO ADC DTC Data2 Data1 Data0 Data2 // // Software // // Autoscan + DTC DTC Res[pRes++] = ADC10MEM; _BIS_SR(CPUOFF); ADC10CTL0 &= &= ~ENC; ~ENC; if if (pres (pres < NR_CONV) { CurrINCH++; if if (CurrINCH == == 3) 3) CurrINCH = 0; 0; ADC10CTL1 &= &= ~INCH_3; ADC10CTL1 = = CurrINCH; ADC10CTL0 = = ENC+ADC10SC; } 70 cycles/sample Fully Automatic 2006 Texas Instruments Inc, Slide 25

Why Is DMA Important? Memory Data >> DAC DAC // // Interrupt CPU CPU cycles DMA DMA clocks ; MSP430 ISR ISR for for one one output waveform 6 0 MOV MOV @R5+,&DAC12_0DAT ; Update DAC0 DAC0 5 2 AND AND #1F,R5 ; Modulo pointer 2 0 RETI RETI ; Return 5 0 ; 18 18 2 ; MSP430 ISR ISR for for two two output waveforms 6 0 MOV MOV @R5+,&DAC12_0DAT ; Update DAC0 DAC0 5 2 MOV MOV @R5+,&DAC12_1DAT ; Update DAC1 DAC1 5 2 AND AND #3F,R5 ; Modulo pointer 2 0 RETI RETI ; Return 5 0 ; 23 23 4 2006 Texas Instruments Inc, Slide 26

Low-Power Peripheral Features ADC10 reference buffer automatically controlled ADC10, ADC12, SD16 cores automatically controlled Auto-scan ADC modes Timer-triggered data conversion I2C and USCI modules automatically enable clock DAC and OA have speed vs. power settings What can I do without the CPU? 2006 Texas Instruments Inc, Slide 27

Power Manage External Devices 0.01uA = Shutdown 20uA = Active --------------------------- 0.06uA = Average 1uA = Quiescent 1uA = Active ----------------------- 1uA = Average OPA with shutdown can be 20x lower total power 2006 Texas Instruments Inc, Slide 28

How To Terminate Unused Pins? Floating inputs cause additional current consumption! 3.0V I MSP430 Vcc Vss P1.0 Icc [ua] 40 30 20 10 0 0.0 V 0.5 V 1.0 V 1.5 V 2.0 V 2.5 V 3.0 V Vin at P1.0 [V] Please see last page of chapter 2 in User s Guide 2006 Texas Instruments Inc, Slide 29

Agenda Introduction to Ultra-Low Power Looking for Ultra-Low Power Parts MSP430 The Ultra-Low Power MCU Low-Power Efficient Coding Techniques Summary 2006 Texas Instruments Inc, Slide 30

Bytes, Words & CPU Registers ; 16-bit addition Code/Cycles 5405 5405 add.w add.w R4,R5 R4,R5 ; 1/1 1/1 529202000202 add.w add.w &0200,&0202 ; 3/6 3/6 ; 8-bit 8-bit addition 5445 5445 add.b add.b R4,R5 R4,R5 ; 1/1 1/1 52D202000202 add.b add.b &0200,&0202 ; 3/6 3/6 Use CPU registers for calculations and dedicated variables Same code size for word or byte Use word operations when possible 2006 Texas Instruments Inc, Slide 31

Effect Of The Constant Generator D3E20021 bis.b bis.b D0F200100021 bis.b bis.b #002h,&P1OUT ; With With CG CG #010h,&P1OUT ; Without CG CG Immediate values 0xFFFF, 0, 1, 2, 4, 8 generated in hardware Reduces code size and cycles Completely Automatic! 2006 Texas Instruments Inc, Slide 32

Interrupt Vector Generator 15 0 0 0 0 0 0 0 0 0 0 0 0 0 Interrupt vector 0 TAIV TAIV is used to efficiently decode the TIMER_A1 interrupt vector for all other interrupt sources Contents is either 0, 2, 4, or 10 Reading TAIV returns and clears the highest-priority pending interrupt Add TAIV to the PC and use a jump-table for TAIV demux Using TAIV instead of IFG polling greatly reduces interrupt overhead 2006 Texas Instruments Inc, Slide 33

C Coding Tips Use local variable as much as possible. Local variables use CPU registers whereas global variables use RAM. Use bit mask instead of bitfields for unsigned int and unsigned char. Use unsigned data types where possible Use pointers to access structures and unions Use static const class to avoid run-time copying of structures, unions, and arrays. Avoid modulo Count down for loops Get to know your C code and its disassembly! 2006 Texas Instruments Inc, Slide 34

Agenda Introduction to Ultra-Low Power Looking for Ultra-Low Power Parts MSP430 The Ultra-Low Power MCU Low-Power Efficient Coding Techniques Summary 2006 Texas Instruments Inc, Slide 35

Principles For ULP Applications Maximize the time in standby (LPM3) Use interrupts to control program flow Replace software functions with peripheral hardware Power manage internal peripherals Power manage external devices Device choice can make a difference Effective code is a must. Every unnecessary instruction executed is a portion of the battery wasted that will never return. 2006 Texas Instruments Inc, Slide 36

IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI s terms and conditions of sale supplied at the time of order acknowledgment. TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed. TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards. TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI. Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation. Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. TI products are not authorized for use in safety-critical applications (such as life support) where a failure of the TI product would reasonably be expected to cause severe personal injury or death, unless officers of the parties have executed an agreement specifically governing such use. Buyers represent that they have all necessary expertise in the safety and regulatory ramifications of their applications, and acknowledge and agree that they are solely responsible for all legal, regulatory and safety-related requirements concerning their products and any use of TI products in such safety-critical applications, notwithstanding any applications-related information or support that may be provided by TI. Further, Buyers must fully indemnify TI and its representatives against any damages arising out of the use of TI products in such safety-critical applications. TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are specifically designated by TI as military-grade or "enhanced plastic." Only products designated by TI as military-grade meet military specifications. Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is solely at the Buyer's risk, and that they are solely responsible for compliance with all legal and regulatory requirements in connection with such use. TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products are designated by TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they use any non-designated products in automotive applications, TI will not be responsible for any failure to meet such requirements. Following are URLs where you can obtain information on other Texas Instruments products and application solutions: Products Applications Amplifiers amplifier.ti.com Audio www.ti.com/audio Data Converters dataconverter.ti.com Automotive www.ti.com/automotive DSP dsp.ti.com Broadband www.ti.com/broadband Interface interface.ti.com Digital Control www.ti.com/digitalcontrol Logic logic.ti.com Military www.ti.com/military Power Mgmt power.ti.com Optical Networking www.ti.com/opticalnetwork Microcontrollers microcontroller.ti.com Security www.ti.com/security RFID www.ti-rfid.com Telephony www.ti.com/telephony Low Power www.ti.com/lpw Video & Imaging www.ti.com/video Wireless Wireless www.ti.com/wireless Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265 Copyright 2007, Texas Instruments Incorporated