CHAPTER 1:
INTRODUCTION
M. Jiménez, R. Palomera, & I. Couvertier
INTRODUCTION TO EMBEDDED SYSTEMS: Lecture
Using Microcontrollers and the MSP430 Slides
Series
© M. Jiménez et al. 2014
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
OUTLINE
Embedded Systems: History and Overview
Structure of an Embedded
Classification of Embedded Systems
The Life Cycle of Embedded Designs
Design Constraints
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 2
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
• Early Forms of
Embedded Systems
1.1 EMBEDDED • Birth and Evolution
of Modern
SYSTEMS: HISTORY & Embedded Systems
OVERVIEW • Contemporary
Embedded Systems
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 3
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
WHAT IS AN EMBEDDED SYSTEM?
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
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 4
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
EARLY EMBEDDED SYSTEMS
Early Computers First Embedded System
Similar to an ESYS The Apollo Guidance
Single functioned Computer (AGC)
Not user programmable Guidance & Navigation
Unlike today’s ESYS CPU + MEM + I/O
Large and power thirsty Low-power mode
Not integrated AGC Assembly Programmed
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
MODERN EMBEDDED SYSTEMS
Born with the Microprocessor
TMS1000: The first microcontroller
Intel 4004: The first commercial microprocessor
US Navy CADC: High-performance embedded system
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)
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 6
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
TODAY’S MCU MARKET
Plenty of Vendors Plenty of Sizes
TI (MSP430) 4-, 8-, 16-, 32-, and 64-bit
Microchip (PIC) CISC Vs. RISC
Intel (8051, 80x86) Harvard Vs. vonNeumann
Freescale (HC11, HC08) Wide Market
ARM Limited (ARM7) Over 6 Billion chips per year
Atmel (ATmega) Over $50 billion sales
Fig. 1.5: Estimates of processor
market distribution (Source:
Embedded Systems Design —
www.embedded.com)
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 7
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
CONTEMPORARY EMBEDDED SYSTEMS
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
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 9
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
EMBEDDED SYSTEM STRUCTURE
Hardware Components:
Electronics Infrastructure
CPU
Memory
I/O Subsystem
Software Components:
System Functionality
Firmware
Operating System
Application Programs
Fig. 1.7: General view of an embedded system
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 10
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
HARDWARE COMPONENTS
Central Processing Unit
Registers, ALU, CU
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
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 11
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
SOFTWARE COMPONENTS
System Tasks
Actions making use of
system resources
System Kernel
Manages system resources
Coordinates task services
Services
Routines performing specific
tasks
Fig. 1.9: Software structure in an
embedded system
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 12
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
1.3 A CLASSIFICATION • Small
OF EMBEDDED • Distributed
SYSTEMS • High-performance
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 13
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
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
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 14
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
• Birth
• Design
1.4 THE LIFE CYCLE OF • Growth
EMBEDDED DESIGNS • Maturity
• Decline
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 15
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
EMBEDDED DESIGN LIFE CYCLE
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
Embedded Design Goal
Design must successfully complete all pertinent stages
Not all designs go through all stages
Plan for Each Stage
Designer’s vision and planning needed for success
Good designs do not happen by chance
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 17
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
• Functionality
• Cost
• Performance
1.5 DESIGN • Power and Energy
CONSTRAINTS • Time-to-Market
• Reliability and
Maintainability
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 18
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
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
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 20
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
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
ICE Test Pod
Courtesy of Signum Systems
8051 In-circuit Emulator 8086 In-circuit Emulator
Courtesy of Signum Systems Courtesy of Nohau Systems
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 21
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
SYSTEM COST
The cost of a given Volume (V) of units:
CT NRE ( RP V )
CT NRE
UC RP
V V
NRE = Non-Recurrent Engineering costs (Fixed)
Investment to complete all design aspects
Very large and independent of volume in CT
Include man-hours, infrastructure, and R&D
RP = Recurrent Production costs (Variable)
Expenses in producing each unit of a given volume
Small but affected by V in CT
Include components, boards, packages, and testing
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 22
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
COTS-BASED NRE COSTS
Commercial off-the-shelf
parts-based design
Traditional methodology for
Embedded Systems
Minimizes Hardware costs
Increases design &
verification costs
NREs in UC are diluted by
a large production volume
Balance between
technology choice and
Fig. 1.12 Embedded systems design
production volume flow model based on COTS parts
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 23
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
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
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 25
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
POWER & ENERGY (1/2)
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
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 26
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
POWER & ENERGY (2/2)
Environmental Impact of Embedded Systems
Average individual uses 60 microprocessors per day
Household electronics accounts for 11% of all energy
consumed in the USA
147,000,000,000 KWh (147TWh) per year
Excludes digital TVs and 2%
12%
Analog TV
large appliances 4%
35%
PCs and Monitors
6% Cable, Satellite & Video
Excludes industry, Audio Products
schools, hospitals, etc Telephone Devices
20%
Trend continues to grow… Video Games
Is there a limit? 21%
Other
Household Energy Usage in the US (2006)
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
TIPS FOR LOW-POWER DESIGNS
Use low-power MCUs and Peripherals
Activate CPU standby and sleep modes
Let peripherals do the work while the CPU is off
Stop the Energy Waste
Turn off unused peripherals
Write power efficient code
Every wasted CPU cycle is energy
that will never come back
Use power management techniques
Power and clock gating plus efficient
coding techniques
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 28
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
TIME-TO-MARKET (1/2)
Critical Constraint for Applications with a Narrow
Market Window (W)
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)
A Moderate Market Entry Delay Could Cause a Large
Loss of Revenue
D3W D
Revenues ($)
L% 2
100%
2W
Peak on-time Revenue
R max
Loss of Revenue
(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
Must consider both aspects:
Hardware Maintenance
Software Maintenance Fig. 1.16 The four actions supporting system
maintainability
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 31
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
HARDWARE MAINTENANCE ISSUES
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
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 32
INTRODUCTION TO EMBEDDED SYSTEMS: Using Microcontrollers and the MSP430
SOFTWARE MAINTENANCE ISSUES
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
END OF CHAPTER 1 SLIDES
© 2014 by M. Jiménez, R. Palomera, & I. Couvertier Chapter 1: 34