1.18k likes | 1.19k Views
Taking the Lead in Low Power QE Family—The Low-end, ultra-low power S08QE8. Feb. 2008. Day’s Agenda. 8:00 – 8:30 Registration 8:30 – 9:00 The Controller Continuum 9:00 to 10:00 Low Power applications Inside look at the QE8 QE8 Board Overview 10:00 to 10:15 Break 10:15 to 12:00
E N D
Taking the Lead in Low Power QE Family—The Low-end, ultra-low power S08QE8 Feb. 2008
Day’s Agenda 8:00 – 8:30 Registration 8:30 – 9:00 • The Controller Continuum 9:00 to 10:00 • Low Power applications • Inside look at the QE8 • QE8 Board Overview 10:00 to 10:15 Break 10:15 to 12:00 • Hands-on Labs • Initialization Utility • Low Power Lab • Touch Sensing lab 12:00 to 12:15 • Closing remarks
The Industry is Changing • Embedded developers are increasingly tasked to design for aportfolio of products ranging in performance • The challenge is that they have to use very different MCUs that are typically not pin-compatible. • 8-bit users are driven to reach performance ceilings with increased demands for performance and functionality • The challenge is learning and using completely different tool sets. This leads to more complicated processes that increase time to market. • Economies of scale and process technology improvements push costs down on 32-bit MCUs making them more affordable • Migrating across continuum of performance and price options isn’t easy or quick when different bit architectures require re-coding and different tools Freescale is breaking bit boundaries to provide a simple and seamless path to performance between 8-bit and 32-bit MCUs
Industry’s Only Controller Continuum The Freescale Controller Continuum is our roadmap for 8-bit and 32-bit compatibility ColdFire V4 ColdFire V3 ColdFire V2 32-bit ColdFire V1 FlexisTM The Controller Continuum “Connection Point” HCS08 core(QG, QD family) RS08 core(KA family) The “connection point” of the Continuum features QE products – the industry’s first 8-bit and 32-bit compatible MCUs 8-bit
QE8 Key Messages The MC9S08QE8 microcontroller extends the ultra-low-power QE family offering high integration with an ideal pin and memory combination to help our customers design energy-efficient and high-performing applications. Low Power High Integration Small Footprint • The QE8 offers industry-leading low-power benefits through new and robust low-power features. • Small 8-bit footprint is ideal for portable applications. • Offering a rich peripheral set, the QE8 offers high performance and makes the development process flexible by allowing you to choose what you need from a wide range of features. 5
Freescale 3V VLP MCU Continuum 51QE128 51QE128 Production - Available NOW S08QE128 S08QE128 S08QE128 S08QE128 Execution - Specification Frozen, High Confidence Schedule Planning - Specification Subject to Change, Tentative Schedule Proposal - Project Subject to Change, Open to Market Feedback S08QE 96 S08QE 96 S08QE 96 S08QE 96 CIO Only! - For Internal CIO Discussion ONLY, Not for Customers RS08 CFV1 S08 9S08QE 60 S08QE 60 S08QE 60 S08QE 60 S08QE32 S08QE32 S08QE32 S08QE32 S08QE16 S08QE16 S08QE16 S08QE16 S08QE8 S08QE8 S08QE8 S08QE8 S08QE4 S08QE4 S08QE4 S08QE4 S08QG8 S08QG8 S08QB8 S08QG4 S08QG4 S08QB4 S08QA4 9S08QB4 S08QA2 9S08QB2 RS08KA2 RS08KA2 RS08KA8 RS08KA8 RS08KA1 RS08KA4 RS08KA4 RS08KA2 6 pin 8 pin 16 pin 20 pin 28 pin 32 pin 44 pin 48 pin 64 pin 80 pin
SCI SPI IIC ICE + BDM KBI LVI COP 2xACMP 10-ch 12-bit ADC ULP Regulator 2-ch 16-bit Timer 2-ch 16-bit Timer ICS w/ ULP OSC 8/4K Flash 512/256B RAM S08 Core MC9S08QE8/4 • Special Features / Benefits • Internal 32KHz clock source (Factory Trimmed to 0.5% typ.) • Fast start-up time from STOP3 mode (~6uS) • Ultra- Low power 1KHz oscillator (standby current <500 nA) • Optimized clock tree and clock gating techniques • Supply Voltage / Performance • 1.8 – 3.3 Voperation • -40 to 85°C operation • Core and I/O • 20 MHz HCS08 core • 10 MHz bus frequency max • Up to 26 GPIO (8 KBI/slew rate control/pull ups) • Memory • 8K/4K Flash, (16 pages of 512 bytes, 100K cycles) • 512B/256B RAM • Communications • SCI (with LIN support) • SPI (full duplex/single wire/master/slave) • IIC (with broadcast mode)
2xSCI SPI IIC ICE + BDM KBI LVI COP 2xACMP 10-ch 12-bit ADC ULP Regulator 2-ch 16-bit Timer 2-ch 16-bit Timer ICS w/ ULP OSC 8/4K Flash 512/256B RAM S08 Core MC9S08QE8/4 • ADC • 10 channel, 12 bit resolution • 2.5uS conversion time • Automatic compare function • Temperature sensor • Internal bandgap reference • Operation in STOP3 • Analog Comparator • Dual comparator • Selectable interrupt on either edge • Compare option to internal bandgap reference • Can feed a timer input • Timers • Dual 16 bit Timer Counter Module • Selectable input capture/ out compare/ buffered PWM • Packages • 16 TSSOP, 16 PDIP, 20 SOIC, 28 SOIC, 32 LQFP • QE8 Pricing • $1.15* MSRP at 10K units *Varies by package
Enabling Low-Power Products Personal Medical Devices Home Appliances Low Power Wireless Security Systems Cell Phone Accessories
Low power run and wait modes CPU and peripherals run with voltage regulator in low power mode Allows full functionality at reduced frequency for lower power operation Clock gating Turns clocks off to unused peripherals Reduces overall run and wait mode current Internal regulator and oscillator Fast start up from stop modes, typically 6-7 µs New low power crystal oscillator consumes less than 1µA Internal clock source and oscillator Eliminates need for external clock source Supports low frequency operations which lowers power in system Ultra-low-power real-time counter Use in run, wait and stop modes Use with low power oscillator, internal or external clock sources Ultra-low-power Features
Changes for Ultra-low Power Reduce Run IDD • Implement new cell library and improved clock tree and gating techniques • Achieved through new design tools • Re-architecture for module enabling/disabling during Run mode (explicit clock gating) • Every peripheral has clock enable bit • Reset to clock enabled for compatibility with existing MCUs • Disabling clocks to unused modules reduces run and wait currents
Changes for Ultra-low Power Voltage Regulator (VREG) • VREG is always on when MCU is in Run or Wait modes • Also on when in stop3 with LVI or ADC enabled • Runs internal logic at lower voltage, therefore lower power • Modify stand-by VREG to allow execution in low power modes • New LPRun and LPWait modes allow peripherals to run while VREG is in stand-by • When in FLL Bypass Low Power Modes (reduced operating frequency) place VREG in un-regulated mode. • Create new VREG with faster start-up • Allows more applications to use Stop modes VDD 2.42V IDD
Changes for Ultra-low Power Reduce Stop3 IDD with oscillator enabled • RTC’s internal clock is not accurate over processing, voltage and temperature variations • +/-35% frequency variation • Customers often require more accuracy • Current 32 kHz consumes ~5 uA in Stop3 mode • New 32 kHz loop-controlled crystal oscillator • Reduces typical Stop3 current from 5 uA to <1 uA • Allows for time-keeping accuracy at very low power
Multiple Power-saving Modes Run Wait Low-power run (LPRun) Low-power wait (LPWait) Stop3 Stop2 Highest Functionality New modes for S08 and ColdFire Lowest Power
Low-power Modes—Run Run Mode Standard user mode – default out of any reset Default frequency is ~8 MHz Clocks are enabled to CPU and all peripherals Typical IDD as low as 4.6 mA at 10 MHz CPU speed and 3V with all modules on The voltage regulatoris in active mode Advantages All peripherals can be used without limitations Interrupts can be serviced without changing modes Flash can be reprogrammed across all VDDs and temperature Limitations Consumes more current than other modes POWER LIMIT 4.6 mA
Low-power Modes—Wait Wait Mode The bus clock source remains active Clocks are disabled to CPU but peripherals can be clocked Typical IDD as low as 1.5 mA at 10 MHz CPU and 3V Advantages Reduces power consumption versus run mode No stop recovery time; the interrupt is serviced immediately Reduces noise while taking A-to-D readings Limitations The voltage regulator remains active, consuming more current than stop or LP modes POWER LIMIT 1.5 mA WAIT
Low-power Modes—LPRun Low-power Run (LPRun) Mode The bus clock source is limited to FBELP Typical IDD as low as 20 uA at 16 kHz CPU and 3V when executing from Flash (Lower if running from RAM) The voltage regulator is in low-power mode Advantages All peripherals can be used Reduces power consumption versus Run mode when high performance is not required Interrupts can be serviced without changing modes Limitations Flash cannot be programmed or erased POWER LIMIT 20 μA NEW
Low-power Modes—LPWait Low-power Wait (LPWait) Mode The bus clock source is limited to FBELP Clocks are disabled to CPU but peripherals can be clocked Typical IDD as low as 3.3 µA at 16 kHz CPU and 3V The voltage regulator is in low-power mode Advantages Reduces power consumption versus LPRun mode No stop recovery time; the interrupt stacking begins immediately Reduces noise while taking A-to-D readings Limitations Consumes more current than stop modes Maximum frequency is limited (see reference manual) Due to slower frequencies, may take longer to react to wake-up trigger than stop2 or stop3 modes POWER LIMIT 3.3 μA NEW LPWAIT
Low-power Modes—Stop3 Stop3 Mode The equivalent to HC08’s Stop mode with typical IDD as low as 300-400 nA at 3V Exit with any active interrupt: ADC, ACMP, IRQ, KBI, LVD, RTC, SCI or reset Advantages Still has very low-current consumption RAM and register retain their values Does not require reinitializing peripherals Latency from interrupt event to code execution is only 5 us + 38 ICSOUT cycles (~6 us at 10 MHz) Limitations Not quite as low current as stop2 POWER LIMIT 400 nA STOP3
Low-power Modes—Stop2 Stop2 Mode Partial power down mode with typical IDD as low as 200-300 nA at 3V (no clocks to peripherals) Exit with wake-up pin (IRQ/RESET pin) or RTC Stop2 recovery is always through a system reset Advantages Lowest-power consumption mode for these devices RAM contents are maintained with I/O states latched Limitations Register values are reset, but values can be saved to and restored from RAM Wake up latency from reset to code execution is ~5 us + 162 ICSOUT cycles. Since ICSOUT resets to ~ 8 MHz, the wake up time is ~29 usecs. POWER LIMIT 300 nA STOP2
Enhancement from Real-Time Interrupt Module 1 kHz internal low-power oscillator (LPO) 300 nA typical power consumption No crystal required Independent of internal bus clock source External clock option for greater accuracy 550 nA typical power consumption with 32 kHz low power oscillator Programmable wake-up intervals 8-bit counter 15 selectable input clock prescalers 8-bit user programmable modulo value Can be enabled in any mode Ultra-low Power Real-time Counter (RTC) TIP The internal LPO oscillator can be measured against the bus clock. User software can adjust RTC timeout to compensate for inaccurate LPO clock.
Extending Battery Life—Clock Management Clock management Run fast when CPU performance is the critical path Run slow when waiting on peripherals Use bus divider to reduce frequency without losing FLL lock Instead of continuously reading a flag, use Wait mode and interrupts Use external clock option (FBELP) for lowest power Turns the FLL off
System Clock Gating Registers 1 - (default after reset) module is clocked 0 – module is not clocked Peripherals are disabled on reset, but are clocked. Users can save on power by gating clocking to unused peripherals
uA saved through Clock Gating @ 10MHz bus in FEE mode on MC9S08QE8 Using the System Clock Gating Registers RUN IDD can be reduced by up to ~30% CPU,SIM ICS,PMC.LVD Flash,RAM Total Run IDD = 4.620mA
Low Power Design Tips • Always have a pull-up or pull down on an input • Powering peripherals through I/O • uA level Icc for some analog functions • PFET transistor for higher momentary current • Leakage • Capacitors (specially Aluminum electrolytics) • I/Os • Dynamic clock switching • If the application is waiting for an I/O or peripheral, use the wait instruction or reduce the clock of the MCU • Battery technology • Peak current
Easy-to-Use Development Tools and Training • 9S08QE8BADGE • $199 Value, free to qualified customers • Low power demonstration kit including the QE8 card as well as a built-in USB-BDM (with cable) for debugging and programming. The tool includes a hardware lab that demonstrates the ultra-low-power benefits and displays the results in real time on a LCD. • CodeWarrior Development Studio for Microcontrollers v6.1 • FREE Special Edition with compiler sizes of 32K • Single tool suite that supports software development for future migration opportunities for both 8-bit or 32-bit and includes rapid application development tool, Processor Expert • $4,995 Professional Edition • $2,495 Standard Edition • $995 C Compiler Upgrade • Other online training, webcast, technical documentation and application notes available at freescale.com/lowpower
Integrated Development Environment/Project Manager • Project • Wizard • Device • Language • DefaultConnection • Add Files • RAD • C/C++ Options Device Knowledge Database Editor Revision Control and Configuration Management • Data Visualization • Debugger Compiler • Multi-Target Interface • I/O Stimulation Device Initialization Assembler • RTOSAwareness • API Processor Expert • Simulator • Multilink • USB (e.g. inDart) Linker H/W-Specific Code Generation Application-Specific Code Development Test/Debug and Validation H/W–S/W Integration Product Life Support/Update Project Creation What is CodeWarrior Development Studio 6? • CodeWarrior offers all the components needed throughout the various stages of a project Important Choices are Made Shortened Learning Curve User-Friendly Performance Multi-H/W Capable Enhanced BDM Flash Programming Revision Control Quality Control
1 3 2 4 What's New in Release V6.0 • A project can be re-targeted in as few as 4 mouse clicks
MCU Change Wizard • In the background CodeWarrior reconfigures your project with… • Correct Build Tools • Assembler • Compiler • Linker • Correct Supporting Files • Startup Code • Libraries • C header files • Porting Support file • Updated derivative.h file • New _Stop and _Wait macros • Updated map file • Updated hidef.h file • New EnableInterrupts and DisableInterrupts macros
What's New in Release V6.0 • Device Initialization Tool • Generates assembly code for RS08 derivatives • Generates C or assembly code for HC08 and HCS08 derivatives • Generates C code for ColdFire V1 derivatives • Choice of adding code to project or creating a text file
What's New in Release V6.0 • Processor Expert • What is it? • Hardware Abstraction Layer (HAL) • Low-level drivers with a known application programming interface (API) • Eases migration between Freescale devices • Built-in knowledgebase immediately flags resource conflicts and incorrect settings • What is new? • ColdFire V1 Support • Improved timing interface • New Bean Selector Assistant
Typical Low Power Application Event occurs Interrupt Service Routine main() or task() main() or task() Power Consumption RUN Mode STOP3 STOP3 RUN/IRQ STOP Mode Waiting for RTI, IRQ, or KBI Waiting for RTI, IRQ, or KBI Time
Approach 1: Average Current Keep MCU running at low frequency with RTC providing 1 second intervals to take ADC reading: Average current = MCU run current at 16 kHz bus ADC off x % time + MCU run current at 16 kHz bus ADC on x % time S08 = 22 uA x (5 sec – 5 x ADCLP conv time)/5 sec + 224 uA x (5 x ADCLP conv time)/5 sec = 22.1 uA (one ADCLP conversion time = 329 usec with 16 kHz bus)
Approach 2: Average Current Use crystal on MCU to provide accurate clock during Stop3. Use RTC to wake every second for ADC measurement. Every 5th measurement ramp frequency and process data: Average current = MCU Stop3 current w RTC and xtal × %time + MCU Run current while ADC on × %time + MCU Run current while communicating × %time S08 = 920 nA × (5 sec - 5 x ADCHS conv time – processing time)/5 sec + 5.1 mA × (5 x ADCHS conv time)/5 sec + 12 mA × (processing time)/5 sec = 0.92 uA + .018 uA + 0.192 uA = 1.13 uA Notes: One ADCHS conversion time = 3.5 usec with 8 MHz bus. Assuming processing time of 2000 cycles for S08, 500 cycles for V1
Approach 3: Average Current Use LPO on MCU to provide clock during Stop2. Use RTC to wake every second for ADC measurement. Every 5th measurement ramp frequency and process data: Average current = MCU Stop2 current w RTC and LPO× %time + MCU Run current while ADC on × %time + MCU Run current while communicating × %time S08 = 0.67 uA × (5 sec - 5 x ADCHS conv time – processing time)/5 sec + 5.1 mA × (5 x ADCHS conv time)/5 sec + 4.5 mA × (processing time)/5 sec = 0.67 uA + .018 uA + 0.192 uA = 0.88 uA Notes: One ADCHS conversion time = 3.5 usec with 8 MHz bus. Assuming processing time of 2000 cycles for S08
Battery Life vs. Average Current AA AAA CR2450 CR2430 Battery Life vs. Average Current 22 Approach 2 1.13 uA 20 18 16 Approach 1 22.1 uA 14 Years 12 10 Approach 3 0.88 uA 8 6 4 2 0 0.1 1.0 10.0 100.0 1000.0 Average Current (uA)
Typical Low Power Mode Usage Run Mode High speed servicing is required: Increase core speed up to 10 Mhz with internal clock generator Complete task, then back to Stop mode Run Mode External event triggers RUN mode Fast startup self clock mode Stop 2 Device times out, enter standby power down PowerConsumption Stop 2 Standby power down Time Run Mode AWT triggers Run Mode Check if high speed service necessary, If not go back to Stop 3 with AWT enabled Stop 3 w/ AWT Enabled Internal 1Khz wakeup osc on
Average current Long term energy average over user defined time period PowerConsumption Time PRESS START PRESS START Average Current Computation • The longer the integration time, the greater the accuracy
Future QE8 Eval Board Diagram LCD Control MPU USB Debug Interface Power Control QE8 MPU Power Measurement Select Matrix SMD Proto Area Battery Power In Low Power Peripherals Power Measurement Circuit (Integrating)
Regulator #1 2.0V to 3.3V 5V QE8 MPU D.U.T. USB Power Source Select Measurement Select SMD Proto Area Power In Manual adjust Regulator #2 Low Power Peripherals Boost circuit Current Measurement Circuit Battery Power Routing Selects if each zone has its power measured or not measured
The LCD Display • To display time, current and voltage information • 1 Second refresh rate • Max integration time 9999 seconds • Precision: • 0.1uA to 100mA+ • +/- 25mV on Voltage • Time +/- <1% • The LCD interface is not available to the Application processor
Peripherals and Debug • Voltage adjust (2V – 3.3V) • Debug Interface • IN/OUT BDM capable • Power Source Select • Measurement Select • CPU • Proto Area • Peripherals • Independently measured or not • Peripherals (w/ Power Enable) • LED • Button • Optical Sensor • 8Mb Serial Flash and RAM • Serial Port • Touch Sensor
Peripheral Power Distribution • Each peripherals can be individually powered via DIP switch S2 • Serial Port (user installed) • SPI RAM • Temperature Sensor • Optical Sensor • Variable resistor (10K) • SPI Flash (user installed) • Touch interface pull up
CPU and Proto Area • Application CPU (Device Under test) • All I/Os are free to use • Surface Mount Prototype Area • Used for user defined circuits • Local measured supply • 2.0-3.3V • Additional 5V