Create Low-Power Applications with MQX™ and MQX™ Lite RTOS FTF-SDS-F0040
Total Page:16
File Type:pdf, Size:1020Kb
Hands-On Workshop: Create Low-Power Applications with MQX™ and MQX™ Lite RTOS FTF-SDS-F0040 Maclain Lobdell | Freescale Software Product Manager Vincent Leynaert | Freescale FAE APR.2014 TM External Use Hands-On Workshop: Create Low-Power Applications with MQX™ and MQX™ Lite RTOS FTF-SDS-F0040 4 Hour Class Learn how to take advantage of the power management capabilities of MQX and MQX Lite RTOS. See how to create feature-rich applications without killing battery life. Attendees will get hands-on experience with system power mode transitions, driver state transitions and slowing or stopping the system tick timer for power savings. TM External Use 1 Session Introduction • Power efficiency is an increasingly important part of embedded product design. Power consumption budgets are tightening even though performance expectations are ever increasing. • You can create power efficient applications while using an RTOS for sophisticated designs. TM External Use 2 Session Objectives • After completing this session you will be able to: − Understand how power management capabilities can be used in RTOS- based applications − Understand how to perform system power mode transitions, frequency scaling, driver state transitions, and slow or stop the RTOS system tick timer for power savings TM External Use 3 Agenda • Quick Review of MQX Software Solutions • Tools for Analyzing MCU Power • Kinetis MCU Low Power Features • MQX RTOS Power Management Features − Hands On • Optimizing Applications for Low Power − Optimizing/Disabling the System Tick Timer − Architecting State Transitions − Hands On • MQX Lite RTOS Power Management Features − Hands On TM External Use 4 Implementing the techniques discussed in this class, we were able to reduce energy consumption by 98% 18 98% 14 Reduction in Energy Consumption (In our example applications 10 in a 5-min window) 6 2 0.3 No Optimization Sleep while Idle Stop Mode Tick Disabled Units in joules (watt*second) TM External Use 5 Download at: www.freescale.com/mqx Freescale MQX™ Software Solutions Commercial-grade MCU Product Features software platform at no cost • MQX™ Real Time Operating System with optional support packages Kernel − Deterministic multi-tasking preemptive scheduler Enabling the development of − Extensive inter-task synchronization, connected and intelligent message passing, and much more applications of the future • MQX™ Real Time Communication Suite Now with optional IPv6 add-on package − Broad networking protocol support Customer Application (TCP,UDP, ICMP, HTTP, DHCP, FTP, Telnet, …) − Fully re-entrant, responsive, designed for embedded systems • MQX™ File System Stacks Specific − Embedded FAT file system compatible (TCP/IP, USB) Application Middleware with FAT-12, FAT-16, or FAT-32 file Libraries Operating systems (DSP, Math, Software and Hardware Evaluation & Dev Tools Encryption) System • MQX™ USB Host/Device Stack BSP, Drivers & Bootloader − USB 1.0/2.0; low-/full-/high-speed HAL • Board Support Packages MCU Hardware − Pre-configured MQX Kernel, stacks, and peripheral drivers for Freescale HW TM External Use 6 Why use an RTOS? • Create Deterministic and Connected Designs − Lower latency versus super loop software architecture − Multiple communications interfaces are much easier to manage with an RTOS − Integrated middleware and upper layer protocols such as TCP/IP, USB, Flash Systems, Web Servers, Wi-Fi support, CAN protocols, SSL, SNMP • Ease of Development − Board Support Packages (BSPs) available with peripheral drivers − Spend time developing application code, not maintaining a scheduling system • Portability and Scalability − Standard APIs for high portability of application code to other MCUs − Configurable features to scale across products − Enable only features needed for low overhead • Maintainability and Stability − Add new features without affecting system timing and higher priority functions TM External Use 7 High-Level RTOS Landscape Linux QNX VxWorks WinCE MQX SMX Nucleus RTX Process-Based Integrity RTXC RTOS/OS ThreadX CMX eCOS FreeRTOS uCOS-II (Memory Footprint) (Memory MQX Lite Full Featured Thread-Based RTOS Each “process” CMX-Tiny has own memory space. More Multi-media and sophisticated Basic Featured More features. More applications. Thread-Based RTOS integrated protocol Potential Size stacks and middleware. Bare Metal Basic features. Some Low to high footprint. (No OS) protocol stacks and middleware. Low to medium footprint. Features, Performance, Sophistication TM External Use 8 Proven: 20+ years in the marketplace • Used in millions and millions of products in medical, industrial, and defense markets from Fortune 500 companies. • Freescale holds a broad license to MQX across its portfolio. ARC acquired Precise with MQX Introducing Freescale MQX • Acquired MQX license across Embedded Access Inc. (EAI) Freescale’s portfolio from ARC. Precise Founded • Licensed Provider of MQX • MQX Began • Roots from Precise & ARC • Strategic Freescale Partner 2005 2006 1989 Time 2000 Time 2004 Time 2008 2009 2010 2011 2012 2013 TM External Use 9 Freescale MQX Growing in Popularity! #1 Freescale MQX 3rd Most Popular MCU RTOS in #2 2013 UBM Survey #3 Freescale MQX 65K+ Downloads 19K+ Unique Users TM External Use 10 What's New in MQX RTOS 4.1 New Board Support Package − TWR-K21F120M (Kinetis K21 Tower System Module) New Features and Updates − Enhanced tools support for CodeWarrior, IAR, Keil, ARM® DS-5™, and GNU tools for ARM® − Vybrid BSP Updates Drivers added or extended: eDMA. DSP codec, FTM Quadrature decoder, DCU, NAND flash file system driver, SAI, eSAI, ASRC, UART w/ eDMA, and FlashX w/ QuadSPI. − Extended DMA support in Kinetis and Vybrid BSPs SPI, SAI, & eSAI drivers w/ eDMA; eSDHC w/ ADMA − Other Enhancements Updated LWADC, RTC, Hardware Timer w/ Low Power Timer (LPT), Kinetis Flash Swap, NAND Flash File System (FFS) added. − Software compatibility improvement MQX custom types replaced w/ standard C99 types ARM DS-5 TM External Use 11 PLATFORM MQX 4.1 MQX 4.1 Board Support Packages VBYRID TWR‐VF65GS10 (M4&A5) √ AUTOEVB (M4&A5) √ • 24 Complimentary BSPs covering all Kinetis K, KINETIS Vybrid, and select ColdFire and Power Families TWR‐K20D50M √ TWR‐K20D72M √ • Numerous additional BSPs for legacy devices TWR‐K21D50M √ available free of charge in earlier MQX versions TWR‐K21F120M √ TWR‐K40X256 √ • Other BSPs available for purchase for other TWR‐K40D100M √ architectures TWR‐K53N512 √ TWR‐K60D100M √ • MQX Lite also available for all Kinetis K, L, & TWR‐K60F120M √ some E Series in Processor Expert TWR‐K60N512 √ TWR‐K64F120M * KWIKSTICK (K40) √ TWR‐K70120M √ COLDFIRE V1‐V4 TWR‐MCF51JF √ TWR‐MCF52259 √ TWR‐MCF54418 √ POWER ARCHITECTURE TWR‐PXD10 √ * MQX 4.1-based standalone release TWR‐PXS20 √ (separate installer than main release) TWR‐PXS30 √ TWR‐PXN20 √ TM External Use 12 Freescale MQX Lite RTOS Launched in 2012 MQX RTOS MQX Lite RTOS Delivery Mechanism Traditional installer with full Processor Expert (PEx) Kernel source for Kernel, services and and services component, BSPs configurable software generated by PEx I/O Drivers MQX POSIX compatible drivers PEx drivers only with option for using PEx drivers Configurability User selects needed services Reduced services available; from full or lightweight versions lightweight options only Example Footprint <10 Kbytes FLASH <8 Kbytes FLASH (3 tasks, sem, event) Kinetis K Series, ColdFire Kinetis L and K Series Processors, Vybrid ARM® Controller Solutions, Power Architecture solutions, Digital Signal Controllers TM External Use 13 Freescale MQX Level 2 Support Accelerating MQX RTOS-based development projects What are the benefits of MQX Level 2 Support? • Direct senior level support access • Specified response times • Support for software customizations • Troubleshooting support on custom hardware • Early access to software releases and bug fixes • Private support portal, telephone, & web conferencing support When to consider upgrading to MQX Level 2 Support? • Before next MQX RTOS-based development project starts • Tight resources or schedule, or just to insure project efficiency How to get MQX Level 2 Support? • Packages available for purchase at www.freescale.com/mqx/support • See website for complete details TM External Use 14 Freescale MQX Support and Engineering Services Level 1 Support Level 2 Support Engineering Services Plan Overview Basic Standard Premium Approx. once a Approx. once a Releases Available Quarter Quarter Early1 Access to MQX Online Community / Online Training Yes Yes Yes Service Requests (SW running on FSL Eval HW only) Yes Yes Yes Report bugs for fix in quarterly releases Yes Yes Yes BSP customization support ‐ Yes Yes Private Support Portal ‐ Yes Yes Software development Access to Early Beta Releases 1 ‐‐Yes services. On‐site Hot Fixes 2 ‐ Yes Yes support/training. Cost based on project Initial Response Time 3 ‐ 2 business days 1 business day definition. Max Hours of Support Engineer's Time 4 ‐ 20 hours 100 hours Web Conferencing to debug issue 5 ‐ 4 hours 10 hours Phone Support 5 ‐ Yes Yes Hands‐on Support of Customer‐Provided Hardware (shipped to Freescale Support) ‐‐Yes Support Plan Term ‐ 6 Months 12 Months Price Free $3,000 $12,000 Part Number ‐ DL‐MQXLVL2‐SDL‐MQXLVL2‐P 1 Early access to beta releases weeks/months before quarterly releases are typically available 2 Access to bug fixes on issues you report immediately when available 3 Amount of time to receive acknowledge of support request 4 Any time support engineer spends including time preparing bug fixes. 5 Hours counted in Support Engineers