Getting started with IAR Power Pac for MSP

  • Slides: 34
Download presentation
Getting started with IAR Power. Pac for MSP 430 Mats Pettersson, IAR Systems •

Getting started with IAR Power. Pac for MSP 430 Mats Pettersson, IAR Systems • Fast… • Everything can be found on www. iar. com • Evaluation and kickstart versions free to download • Demo after the Power. Point slides • Feedback and questions to support@iar. com July, 2008 1

Support IAR Systems IAR Power. Pac for MSP 430 RTOS and File System Tools

Support IAR Systems IAR Power. Pac for MSP 430 RTOS and File System Tools July, 2008 3

IAR Systems • Founded in 1983 in Uppsala, Sweden (Headquarter) • About 140 employees

IAR Systems • Founded in 1983 in Uppsala, Sweden (Headquarter) • About 140 employees • Offices in the US (3), China, Japan, the UK, Belgium, Germany, Brazil and Sweden • 80. 000 application developers • Partner with 16 of the top semiconductor companies July, 2008 4

Support IAR Systems IAR Power. Pac for MSP 430 RTOS and File System Tools

Support IAR Systems IAR Power. Pac for MSP 430 RTOS and File System Tools July, 2008 5

 • What is an RTOS? Software that manages the time and other resources

• What is an RTOS? Software that manages the time and other resources of a microprocessor or microcontroller. It breaks down the application into multiple tasks each handling one aspect of the application. It’s like having multiple CPUs! • What is a File System ? Software for storing and organizing data on storage devices. Functions to create and handle files and directories in an application. RTOS and File System July, 2008 6

Why use an RTOS ? • • • Ensure that high priority tasks run

Why use an RTOS ? • • • Ensure that high priority tasks run first Deterministic response Saves power! Saves development time Easy to structure/divide code between developers. Correctness - easier to understand complex systems Makes programming more efficient/better structured Abstracts the hardware-dependence, porting easier and much, much more… RTOS and File System July, 2008 7

Scheduling The algorithms that determine which task to execute Distinguish between tasks that are

Scheduling The algorithms that determine which task to execute Distinguish between tasks that are ready to be executed and other tasks that are suspended The task which is currently executing is referred to as the active task RTOS and File System July, 2008 8

Tasks Each task consist of: • The program code, which usually resides in ROM

Tasks Each task consist of: • The program code, which usually resides in ROM • A stack, residing in a RAM area that can be accessed by the stack pointer • A task control block (TCB), residing in RAM. The TCB is only accessed by the RTOS and File System July, 2008 9

Communication between tasks As tasks run in the same application, they sometimes need to

Communication between tasks As tasks run in the same application, they sometimes need to communicate with each other to: • exchange data with other tasks • synchronize with other tasks • make sure that a resource is used by no more than one task at a time Can be achieved by: • Global variables. . . • RTOS communication mechanisms July, 2008 RTOS and File System 10

Communication mechanisms Events Mailboxes • A buffer that is managed by • the real-time

Communication mechanisms Events Mailboxes • A buffer that is managed by • the real-time operating system Fixed message size Semaphores • Used for managing • • resources by avoiding conflicts caused by simultaneous use of a resource Resource semaphore Counting semaphore Task events are messages to a single, specified recipient Queues • Similar to mailboxes, but • enable inter task communication with larger messages Messages of various sizes RTOS and File System July, 2008 11

Task oriented design Benefits • Clearer design • Polling is avoided • Adding a

Task oriented design Benefits • Clearer design • Polling is avoided • Adding a lower priority task will not affect the responsiveness • • of the system to high priority tasks Code can be modularized, making things easier to maintain and debug Saves power RTOS and File System July, 2008 12

File System features Fail-safe operations • The driver makes only atomic actions and takes

File System features Fail-safe operations • The driver makes only atomic actions and takes the • • responsibility that the data managed by the file system is always valid. In case of a power loss or a power reset during a write operation, it is always assured that only valid data is stored in the flash. If the power loss interrupts the write operation, the old data will be kept and the block will not be corrupted. Wear leveling • makes sure that the number of erase cycles remains approximately equal for each sector July, 2008 RTOS and File System 13

Support IAR Systems IAR Power. Pac for MSP 430 RTOS and File System Tools

Support IAR Systems IAR Power. Pac for MSP 430 RTOS and File System Tools July, 2008 14

Complete suite of tools visual. STATE Idea IAR Embedded Workbench Verify, Design Validate, Implement

Complete suite of tools visual. STATE Idea IAR Embedded Workbench Verify, Design Validate, Implement IAR Power. Pac JTAG debugger Compile Debug IAR Development Kits Deploy RTOS & Middleware Tools July, 2008 15 Target application

Support IAR Systems IAR Power. Pac for MSP 430 RTOS and File System Tools

Support IAR Systems IAR Power. Pac for MSP 430 RTOS and File System Tools July, 2008 16

IAR Power. Pac for MSP 430 Why use a commercial RTOS ? Proven code

IAR Power. Pac for MSP 430 Why use a commercial RTOS ? Proven code Hard real time Priority controlled Mulititasking Costs Shorter time to market Commercial RTOS? Visualization July, 2008 Documentation 17

TM for MSP 430 IAR Power. Pac for MSP 430 Fully featured real-time operating

TM for MSP 430 IAR Power. Pac for MSP 430 Fully featured real-time operating system Additional components IAR Power. Pac USB IAR Power. Pac Source (RTOS + File System) IAR Power. Pac Base High performance file system Innovative business model similar to that of IAR Embedded Workbench Tight integration with IAR Embedded Workbench Easy to get started (RTOS + File System) Board support packages July, 2008 18

IAR Power. Pac for MSP 430 Operating system Key features Small memory footprint (1.

IAR Power. Pac for MSP 430 Operating system Key features Small memory footprint (1. 7 KByte for typical MSP 430 implementation) Pre-emptive multi-tasking Round-robin scheduling Up to 255 priorities Unlimited number of tasks, semaphores, mailboxes and software timers Full interrupt support with nested interrupts Very fast context switch times Power Management July, 2008 19

IAR Power. Pac for MSP 430 RTOS performance Memory usage Kernel size (ROM) 1208

IAR Power. Pac for MSP 430 RTOS performance Memory usage Kernel size (ROM) 1208 bytes Kernel RAM usage 28 bytes RAM usage per task control block 18 bytes RAM usage per resource semaphore 8 bytes RAM usage per counting semaphore 4 bytes RAM usage per mailbox 12 bytes RAM usage per software timer 12 bytes RAM usage event 0 bytes Min. stack-size per July, task 2008 (RAM) 48 bytes 20

IAR Power. Pac for MSP 430 RTOS performance Timing Context switch time 270 clock

IAR Power. Pac for MSP 430 RTOS performance Timing Context switch time 270 clock cycles (67. 5 µs), independent of number of tasks Interrupt latency time max. 151 clock cycles (37. 8 µs) Kernel CPU usage/TICK less than 1% of total calculation time at 1000 Interrupts/second (1 ms TICK) Basic time unit (TICK) typ. 1 ms, min. 100 µs (10 k. Hz interrupt frequency) July, 2008 21

IAR Power. Pac for MSP 430 Support for MSP 430 Low Power Modes Task

IAR Power. Pac for MSP 430 Support for MSP 430 Low Power Modes Task oriented design is very useful if you want to save power Peripherals can be switched of when not used Wake up is possible through all enabled interrupts Efficient OS causes minimum CPU overhead -> maximizing idle time -> reducing power consumption July, 2008 22

IAR Power. Pac for MSP 430 Support for MSP 430 Low Power Modes Power.

IAR Power. Pac for MSP 430 Support for MSP 430 Low Power Modes Power. Pac RTOS fully supports all MSP 430 low power modes. RTOS always brings CPU into lowest power mode possible whenever CPU is idle Peripheral clock requirements are taken into account Lifts a lot of the burden for power management from the programmer July, 2008 23

IAR Power. Pac for MSP 430 Support for MSP 430 Low Power Modes The

IAR Power. Pac for MSP 430 Support for MSP 430 Low Power Modes The idle task • The idle task is only active when no other task has something to • do. Other tasks need to make operating systems calls to let the system know when shared resources are or are not in use. » OS_POWER_Usage. Dec(OS_UINT Level) » OS_POWER_Usage. Inc(OS_UINT Level) • The idle task will depending on which resources are used, enter the lowest possible power mode. July, 2008 24

IAR Power. Pac for MSP 430 IAR Power. Pac file system Small footprint, e.

IAR Power. Pac for MSP 430 IAR Power. Pac file system Small footprint, e. g. 12 KByte ROM / 1. 6 KByte RAM MS-DOS/MS-Windows compatible FAT 12, FAT 16 and FAT 32 support Multiple device driver support Multiple media support Caching functionality Check disk functionality Device drivers available for a number of media types July, 2008 25

IAR Power. Pac for MSP 430 Power. Pac File System API layers Application -

IAR Power. Pac for MSP 430 Power. Pac File System API layers Application - Contains functions in ANSI C stdio style, FS_FOpen(), FS_FWrite() etc. - Translates file operations to logical block (sector) operations. Storage API layer - Optimized for applications which do not require file system functionality. - Allows sector read and write operations to a storage medium - A typical application: USB mass storage device, data has to be stored on a medium, but all file system functionality is handled by the host PC. July, 2008 Power. Pac File System API layer API Layer Storage API File System Layer Storage Layer Device Driver Hardware Layer 26

IAR Power. Pac for MSP 430 Integration with IAR Embedded Workbench Example projects available

IAR Power. Pac for MSP 430 Integration with IAR Embedded Workbench Example projects available from the startup screen Links to IAR Power. Pac for MSP 430 documentation in the Help menu Template projects within IDE for new library projects RTOS aware debugging via C-SPY plug-in Board Support packages July, 2008 27

IAR Power. Pac for MSP 430 evaluation version Works with all EW 430 product

IAR Power. Pac for MSP 430 evaluation version Works with all EW 430 product variants with the following limitations: • IAR Power. Pac RTOS can either work without a time limit • with a maximum of three tasks or create more than three tasks and work with a time limit of 15 minutes. IAR Power. Pac File System can only handle one open file at any given time Time limited version will also be available July, 2008 28

IAR Power. Pac for MSP 430 IAR Power. Pac business model Principle • Base

IAR Power. Pac for MSP 430 IAR Power. Pac business model Principle • Base product in object code format Licensing model • Seat license - per developer and CPU • Full source code upgrade • Group license (up to 20 developers) • Site license (unlimited on the same site) • No royalty fees Result • Low-risk licensing model • A license can be used in unlimited number of projects and • products Affordable site license for unlimited number of developers July, 2008 29

Support IAR Systems IAR Power. Pac for MSP 430 RTOS and File System Tools

Support IAR Systems IAR Power. Pac for MSP 430 RTOS and File System Tools July, 2008 30

Customer support Support and Update Agreement (SUA) • Free software updates • First class

Customer support Support and Update Agreement (SUA) • Free software updates • First class world-wide technical support by telephone, e- • mail and fax VIP Support contracts available ”My Pages” at www. iar. com • Read about new product releases • Download product updates • Transfer licenses to co-workers • Manage your contact information July, 2008 31

Technical Resources Support www. iar. com • Tecnical notes • Application notes • My

Technical Resources Support www. iar. com • Tecnical notes • Application notes • My Pages with latest product updates Documentation • User Guides for EW 430 and PP 430 • Reference Guides for all EW 430 components • Reference Guides for PP 430 RTOS and FS. July, 2008 32

Support IAR Systems IAR Power. Pac for MSP 430 on Demonstration MSP-EXP 430 F

Support IAR Systems IAR Power. Pac for MSP 430 on Demonstration MSP-EXP 430 F 5438 RTOS and File System Tools July, 2008 33

Summary Our offering • A tightly integrated RTOS, file system, and tools for developing

Summary Our offering • A tightly integrated RTOS, file system, and tools for developing embedded applications • Perfect compliment to IAR Embedded Workbench • Innovative ”low-risk” price model • Continuous ”add-ons” for more middleware’s • Upgrade path • Same license management system as IAR Embedded Workbench • Local support across the globe. July, 2008 34

Thank you! Please send feedback and questions to support@iar. com July, 2008 35

Thank you! Please send feedback and questions to support@iar. com July, 2008 35