Introduction To Embedded Systems: Using Microcontrollers and The MSP430
Introduction To Embedded Systems: Using Microcontrollers and The MSP430
INTRODUCTION
OUTLINE
Structure of an Embedded
Design Constraints
• Early Forms of
Embedded Systems
1.1 EMBEDDED • Birth and Evolution
of Modern
SYSTEMS: HISTORY & Embedded Systems
OVERVIEW • Contemporary
Embedded Systems
Definition
An electronic systems containing tightly coupled hardware
and software components
Characteristics
Perform a single function
Form part of a larger system
Not intended to be independently programmable by the user
Are expected to work with minimal or no human interaction
Reactive, real-time operation
Tightly constrained
Fig. 1.1: Control panel and paper tape transport Fig. 1.2: AGC user interface module
view of a Colossus Mark II computer (Public (Public photo EC96-43408-1 by NASA)
image by the British Public Record Office, London)
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 5
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
Fig. 1.3: Die microphotograph (left) Fig. 1.4: Die microphotograph (left) and
packaged part for the TMS1000 (Courtesy packaged part for the Intel 4004
of Texas Instruments, Inc.) (Courtesy of Intel Corporation)
System Components
Power management
Video processing
Audio processing
Communications
User interfaces
Dedicated ASICs
Memory management
Storage
Multi-embedding
Most components are
embedded system by
themselves
System integration
Fig. 1.6 Generic multi-function media player.
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 8
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
• Hardware
Components
1.2 STRUCTURE OF AN • Software
EMBEDDED SYSTEM Components
Hardware Components:
Electronics Infrastructure
CPU
Memory
I/O Subsystem
Software Components:
System Functionality
Firmware
Operating System
Application Programs
HARDWARE COMPONENTS
Memory
Program Memory
Data Memory
I/O Devices
Communication ports
User Interfaces
Sensors & actuators
Diagnostics support
System controllers
Power management
Specialized ASICs Fig. 1.8: Hardware elements in an embedded system
SOFTWARE COMPONENTS
System Tasks
Actions making use of
system resources
System Kernel
Manages system resources
Coordinates task services
Services
Routines performing specific
tasks
SYSTEMS • High-performance
A CLASSIFICATION OF EMBEDDED
Small High-performance
MCU-based, low component Dedicated board-level
count hardware
Large volume Task intensive, RTOS-based
Single tasked Low-volume, high cost
Low-cost, maintenance free High maintenance
Distributed
Multi-chip, board-level
Multi-tasked
Medium volume & cost
Maintainable, upgradeable
Fig. 1.10 A classification of embedded systems
• Birth
• Design
1.4 THE LIFE CYCLE OF • Growth
Birth
Need & opportunity
Specifications
Design
Proof-of-concept
Manufacturing design
Growth
Production & deployment
Maturity
Maintenance & upgrade
Decline Fig. 1.11: Life cycle of an embedded design
System disposal
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 16
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
DESIGN ENDURANCE
• Functionality
• Cost
• Performance
1.5 DESIGN • Power and Energy
CONSTRAINTS • Time-to-Market
• Reliability and
Maintainability
DESIGN CONSTRAINTS
Functionality
System ability to perform the function it was designed for (REQ)
Cost
Amount of resources needed to conceive, design, and produce an
embedded system
Performance
System ability to perform its function in time.
Affected by both HW & SW factors
Size
Physical space taken by a system solution.
Power and Energy
Energy required by a system to perform its function.
Time to Market
The time it takes from system conception to deployment.
Maintainability
System ability to be kept functional during its mature life.
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 19
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
FUNCTIONALIT Y (1/2)
Functional verification is a
difficult task
Can consume up to 70% of
development time
Verification Methods
Simulation Techniques MSP430 FET Tool
Courtesy of Texas Instruments Inc.
Behavioral (HDL-based)
Logic (Circuit Modeling)
Processor (Software)
JTAG Debugger
Hardware supported through
dedicated ports
Used also for testing
(boundary scan test) PIC In-circuit Debugger
Cost effective Courtesy of Microchip Corporation
FUNCTIONALIT Y (2/2)
In-Circuit Emulators
Replace MCU in target
system
A powerful debugger
Expensive
ROM Monitors
Monitor functions in ROM 68HC11 In-circuit Emulator
Status sent via serial port Courtesy of Nohau Systems
SYSTEM COST
Commercial off-the-shelf
parts-based design
Traditional methodology for
Embedded Systems
Minimizes Hardware costs
Increases design &
verification costs
Balance between
technology choice and
Fig. 1.12 Embedded systems design
production volume flow model based on COTS parts
PERFORMANCE: HW FACTORS
Clock Frequency
System clock speed: not an absolute performance metric
Architecture
Determines how clock cycles are used
Component Speed
Response time and access time
Handshaking
Signalization required to complete a transaction
Low-power Modes
Wake-up times might affect application speed
High speed is expensive!!!
Use it wisely
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 24
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
PERFORMANCE: SW FACTORS
Algorithm Complexity
Steps and resources needed to complete a task
Task Scheduling
Affects waiting time in multitasking system
Inter-task Communication
Time taken by tasks to exchange information
Level of Parallelism
Software usage of system hardware resources
Critical Parameter
A long chain of design events depend on it
System reliability
Stress, noise, and heat
Cooling Costs
High power = lot of heat to remove
Power Supply Requirements
Larger batteries of power supply
Size, Weight, and Form
Mechanical system parameters affected by heat density
large appliances 4%
35%
PCs and Monitors
Fig. 1.13 Distribution of U.S. residential consumer electronics (CE) energy consumption in one
year (Source Consumer Electronics Association)
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 27
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
TIME-TO-MARKET (1/2)
Fig. 1.14 Typical revenue-time curve for embedded products, denoting the
time-to-market and market window
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 29
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
TIME-TO-MARKET (2/2)
(1-D/W)R max
Assume:
Delayed Revenues
• 2W = 24 months
• D = 4 months
Estimated Revenue
D Time (months)
Extended Time-to-market Loss:
System W
Conception Sales Life (2W)
• L% = 50%
Fig. 1.15 Linear revenue model with a delayed system deployment
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 30
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
MAINTAINABILIT Y
Maintenance enables Four maintenance
reliable system operation dimensions
throughout entire useful life Corrective: Fixes faults
Adaptive: Copes with a
Relevance of maintenance changing environment
depends on application Perfective: Adds enhancements
Expected lifespan Preventive: Anticipates events
Application criticality
Maintainability is a design
requirement
Must be included among
system specifications
Increased NREs
Design overhead to support HW maintenance
Time-to-market Impact
Additional development time
Increases Recurrent Cost
More components in system
Component Obsolescence
Limit system useful life span
Hardware Constraints
Stringent HW constraints leave little room for support functions
Cost of Verification
Undiscovered software bugs become maintenance headaches
Inadequate Code Documentation
Meaningful and up-to-date
Technology Changes
Compatibility with tool newer versions
Ripple Effect of Changes
Identifying effect down the code
Qualified Personnel
Everybody wants to design
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 33
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430