Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Esrtos 2012 table of contents


Published on

Embedded System and Real time operating system by V. N. Ghodke

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

Esrtos 2012 table of contents

  1. 1. Table of contents i Contents List of tables at a glance [x] Editor’s note [xi] Preface [xi] Acknowledgements [xiv] Dedication [xv] Syllabus curriculum [xvi] 1 INTRODUCTION TO EMBEDDED SYSTEMS [1-1 to 1-30] 1.1 INTRODUCTION: AN EMBEDDED SYSTEM [1-1] 1.1.1 System [1-1] 1.1.2 Embedded systems [1-2] 1.2 EMBEDDED SYSTEM: DEFINITION [1-2] 1.3 OVERVIEW OF AN EMBEDDED SYSTEM [1-3] 1.4 THE COMPONENTS OF AN EMBEDDED SYSTEM [1-5] 1.5 OVERVIEW OF EMBEDDED SYSTEM ARCHITECTURE [1-5] 1.6 BUILDING BLOCKS OF THE HARDWARE OF AN EMBEDDED SYSTEM [1-6] 1.7 FEATURES OF GENERALIZED EMBEDDED SYSTEMS [1-7] 1.8 EXAMPLES OF EMBEDDED SYSTEMS [1-8] 1.9 CATEGORIES OF EMBEDDED SYSTEM [1-10] 1.10 SPECIALITIES OF EMBEDDED SYSTEM [1-13] 1.11 RECENT TRENDS IN EMBEDDED SYSTEM DESIGN [1-15] 1.12 CLASSIFICATIONS OF EMBEDDED SYSTEM [1-15] 1.13 SKILLS REQUIRED FOR AN EMBEDDED SYSTEM DESIGNER [1-16] 1.14 APPLICATION AREAS OF AN EMBEDDED SYSTEM [1-17] 1.15 CHARACTERISTICS OF AN EMBEDDED SYSTEM [1-19] 1.16 DESIGN CHALLENGE-OPTIMIZING DESIGN METRICS [1-20] 1.16.1 Common design metrics [1-20] 1.16.2 Design metrics competition – improving one may worsen others [1-21] 1.16.3 Time to market – a demanding design metric [1-21] 1.16.4 Losses due to delayed market entry [1-22] 1.16.5 Examples [1-23] 1.17 SUMMARY: INTRODUCTION TO EMBEDDED SYSTEM [1-25] Review Questions [1-27] References for further reading [1-30] 2 WIRELESS COMMUNICATION PROTOCOLS [2-1 to 2-64] 2.0 WIRELESS COMMUNICATION SYSTEM [2-1] 2.1 BLUETOOTH (IEEE 802.15a) [2-1] 2.1.1 Bluetooth specification [2-2] 2.1.2 Bluetooth state transition diagram [2-4] 2.1.3 Bluetooth addresses [2-5]
  2. 2. ii Embedded systems and RTOS 2.1.4 Bluetooth protocol architecture [2-5] 2.1.5 Bluetooth protocol stack [2-6] 2.1.6 Bluetooth versions [2-8] 2.1.7 Bluetooth security [2-9] 2.1.8 Bluetooth applications [2-9] 2.1.9 Summary of WPAN: IEEE 802.15.1 Bluetooth [2-9] 2.2 GPRS – GENERAL PACKET RADIO SERVICE [2-10] 2.2.1 Application [2-11] 2.3 IrDA – INFRARED DATA ASSOCIATION [2-12] 2.3.1 Block diagram of IrDA module [2-12] 2.3.2 IrDA protocol architecture [2-12] 2.3.3 IrDA transceiver [2-13] 2.4 IEEE 802.11 (WLAN OR WI – FI) [2-15] 2.4.1 Mobile communication technology according to IEEE [2-15] 2.4.2 WLAN – local wireless network. IEEE 802.11 [2-16] 2.4.3 Design goals for Wireless LAN [2-16] 2.4.4 Characteristics of Wireless LAN [2-16] 2.4.5 Comparison of Infrared and Radio [2-17] 2.4.6 802.11 Architecture of an infrastructure network [2-17] 2.4.7 802.11 Architecture of an Ad-hoc network [2-18] 2.4.8 IEEE standard 802.11 protocol architecture [2-18] 2.4.9 Summary of WLAN: IEEE 802.11b and WLAN: IEEE 802.11a [2-22] 2.5 IEEE 802.16 (WIRELESS METROPOLITAN AREA NETWORK [WMAN] OR WI – MAX) [2-23] 2.5.1 Wireless broad band (Wi-Max) [2-23] Physical layer [2-24] MAC layer [2-25] 2.5.2 Broadband applications [2-25] 2.5.3 Some more IEEE standard for mobile communication [2-25] 2.6 ZIGBEE [2-25] 2.6.1 Zigbee protocol stack [2-26] 2.6.2 IEEE 802.15.4 [2-26] 2.6.3 Network topologies in Zigbee [2-27] 2.6.4 OSI overview [2-27] 2.7 RFID [2-30] 2.7.1 Areas of applications of RFID [2-32] 2.8 SUMMARY: DIFFERENT TYPES OF CONNECTIVITY COMPARED [2-33] 2.9 CAN PROTOCOL [2-34] 2.9.1 CAN Bus technology [2-34] 2.9.2 CAN Bus topology [2-35] 2.9.3 Properties of CAN [2-36] 2.9.4 Layered structure of a CAN node [2-36] 2.9.5 Types of frames [2-37] Data frame [2-37] Remote frame [2-38] Error frame [2-39] Overload frame [2-40]
  3. 3. Table of contents iii 2.9.6 Message transmission [2-40] 2.9.7 Features of CAN [2-40] 2.9.8 CAN Bus cables and connector [2-40] 2.9.9 Application [2-41] 2.10 LIN PROTOCOL [2-41] 2.10.1 Features [2-42] 2.10.2 LIN Bus frame format [2-42] 2.10.3 LIN Bus protocol [2-42] Components of protocols [2-43] Response [2-43] 2.10.4 Application [2-43] 2.11 FLEXRAY PROTOCOL [2-44] 2.11.1 Network topology of FlexRay Protocol [2-44] Passive bus topology [2-44] Active star topology [2-45] 2.11.2 FlexRay overview [2-45] Host communication controller interface [2-46] Communication controller bus driver interface [2-46] Bus driver host interface [2-46] Hard wired signals (option A) [2-46] Serial Peripheral Interface (SPI) (option B) [2-47] Bus driver power supply interface (optional) [2-47] 2.11.3 FlexRay frame format [2-47] FlexRay header segment (5 bytes) [2-48] 2.12 WINDOWS CE (WinCE) [2-50] 2.12.1 Windows CE design principles [2-51] 2.12.2 Windows CE versions [2-51] 2.12.3 Modular operating system (1) [2-51] 2.12.4 Modular operating system (2) [2-51] 2.12.5 Wide ranging hardware support [2-51] 2.12.6 Target hardware requirement [2-52] 2.12.7 Windows CE specifications [2-52] 2.12.8 Features of WinCE [2-52] 2.12.9 Windows CE architecture [2-53] 2.12.10 Applications of Window CE [2-56] 2.13 WHAT IS ANDROID? [2-57] 2.13.1 Specification of Android [2-57] 2.13.2 Features of Android [2-57] 2.13.3 Android architecture [2-58] 2.13.4 Applications of Android [2-60] 2.14 SUMMARY: WIRELESS COMMUNICATION PROTOCOL [2-60] Review Questions [2-62] References for further reading [2-64] 3 PROCESSOR AND MEMORIES [3-1 to 3-40] 3.1 PROCESSOR [3-1]
  4. 4. iv Embedded systems and RTOS 3.1.1 Processor selection for an embedded system [3-2] 3.2 PROCESSOR IN THE SYSTEM [3-4] 3.2.1 Microprocessor [3-4] 3.2.2 Microcontroller [3-5] 3.2.3 Embedded processor for a complex system [3-6] 3.2.4 Digital signal processor (DSP) [3-7] 3.2.5 Application specific system processors (ASSD’s) in embedded systems [3-7] 3.2.6 Microprocessor systems using general purpose processor (GPP) [3-7] 3.3 OTHER HARDWARE UNITS [3-7] 3.3.1 Clock oscillator circuit and clocking unit(s) [3-8] 3.3.2 Real time clock (RTC) and timers for various timing and counting needs of the system [3-8] 3.3.3 Reset circuit, power up and watch dog timer reset [3-8] 3.3.4 Input, output and input / output ports, input / output buses and input / output interfaces [3-9] 3.3.5 Interrupts handler [3-9] 3.3.6 DAC (using a PWM) and ADC [3-10] 3.3.7 LCD and LED displays [3-10] 3.3.8 Keypad or keyboard [3-10] 3.3.9 Pulse dialer, modem and transceiver [3-11] 3.3.10 GPIB (IEEE 488) link [3-11] 3.3.11 Linking and interfacing buses and units of the embedded system hardware [3-11] 3.3.12 Hardware units required in five cases [3-11] 3.4 INTERFACE AND ACCESSING PC104 COMPATIBLE DIGITAL AND ANALOG I/O CARDS [3-12] 3.5 INTRODUCTION TO ETHERNET AND TCP/IP [3-13] 3.5.1 TCP/IP protocol suite [3-16] 3.6 EMBEDDED SYSTEM TECHNOLOGIES [3-18] 3.6.1 Processor technology [3-19] 3.6.2 IC technology [3-21] 3.6.3 Design technology [3-23] 3.7 SURVEY OF CURRENTLY AVAILABLE PROCESSORS OF DIFFERENT COMPANIES AND THEIR COMPARISON [3-23] 3.7.1 Stand alone processors [3-24] 3.7.2 Integrated processor: system on chip [3-24] 3.8 MEMORY [3-31] 3.8.1 RAM (Random Access Memory) [3-31] 3.8.2 NV-RAM (Non-Volatile RAM) [3-31] 3.8.3 ROM (Read Only Memory) [3-32] 3.8.4 EEPROM (E 2 PROM) [3-32] 3.8.5 Flash memory [3-32] 3.9 VARIOUS FORMS OF MEMORY IN THE SYSTEM: SUMMARY [3-33] 3.10 MEMORY SELECTION FOR AN EMBEDDED SYSTEM [3-34] 3.11 SUMMARY OF PROCESSOR AND MEMORY [3-36] Review Questions [3-36] References for further reading [3-39] 4 ARM PROCESSORS [4-1 TO 4-32] 4.1 LIMITATIONS OF 8 BIT PROCESSOR [4-1] 4.2 NEED OF 32 BIT PROCESSOR [4-2]
  5. 5. Table of contents v 4.3 ARM-7 TDMI PROCESSOR [4-2] 4.3.1 The RISC design philosophy [4-2] 4.3.2 Comparison between RISC and CISC [4-3] 4.4 ARM PROCESSOR FAMILIES [4-4] 4.4.1 Development of the ARM architecture [4-5] 4.5 ARM-7 FAMILY [4-6] 4.5.1 Features of ARM-7 TDMI [4-6] 4.5.2 ARM-7 TDMI core [4-7] 4.5.3 ARM-7 TDMI processor architecture [4-9] 4.5.4 Data types [4-12] 4.5.5 Processor modes [4-12] 4.5.6 Registers [4-13] 4.5.7 ARM instruction set [4-16] 4.6 ARM9 Family [4-20] 4.6.1 Features of an ARM9TDMI [4-21] 4.6.2 Applications of an ARM9TDMI [4-21] 4.7 ARM11 Family [4-22] 4.7.1 Features of an ARM11TDMI [4-22] 4.8 ARM CORTEX [4-22] 4.8.1 ARM Cortex M3 processor [4-24] 4.8.2 ARM Cortex A8 processor [4-25] 4.9 HARDWARE INTERFACING OF DEVICES LIKE LPC 2148 [4-26] 4.9.1 LPC 2148 [4-26] 4.9.2 Features of an LPC 2148 [4-28] 4.10 SUMMARY: ARM PROCESSOR [4-29] Review Questions [4-31] References for further reading [4-32] 5 PROGRAMMING CONCEPTS USING EMBEDDED ‘C’ [5-1 TO 5-28] 5.1 SOFTWARE PROGRAMMING IN ASSEMBLY LANGUAGE (ALP) AND IN HIGH LEVEL LANGUAGE [5-1] 5.2 ‘C’ PROGRAM ELEMENTS: HEADER AND SOURCE FILES AND PREPROCESSOR DIRECTIVES [5-2] 5.2.1 Include directive for the inclusion of files [5-2] 5.2.2 Source files [5-3] 5.2.3 Configuration files [5-3] 5.2.4 Preprocessor directives [5-3] 5.3 PROGRAM ELEMENTS: MACROS AND FUNCTIONS [5-3] 5.3.1 Preprocessor macros [5-4] 5.4 PROGRAM ELEMENTS [5-4] 5.4.1 Use of data types [5-5] 5.4.2 Use of data structures: Queues, stacks, List and Trees [5-5] 5.4.3 Use of modifiers [5-6] 5.4.4 Use of conditions, loops, and infinite loops [5-7] 5.4.5 Use of pointers, null pointers [5-9] 5.4.6 Use of function calls [5-9] 5.4.7 Multiple function calls in cyclic order in the main [5-11] 5.4.8 Function pointers, function queues, and interrupt service routine queues [5-12]
  6. 6. vi Embedded systems and RTOS 5.5 QUEUES [5-12] 5.5.1 Use of the queues for implementing the protocol for a network [5-15] 5.5.2 Queuing the functions on interrupts [5-17] 5.5.3 Use of the FIPO (First In Provisionally Out) queues for flow control on a network [5-17] 5.6 STACKS [5-19] 5.7 LISTS AND ORDERED LISTS [5-19] 5.7.1 List [5-19] 5.7.2 Use of a list of active device drivers (software timers) [5-20] 5.7.3 Use of a list of tasks in a ready list [5-21] 5.8 ‘C’ PROGRAM COMPILER AND CROSS COMPILER [5-23] 5.8.1 Compiled executable and locator files [5-23] 5.9 SOURCE CODE ENGINEERING TOOLS FOR EMBEDDED C/C++ [5-23] 5.10 OPTIMIZATION OF MEMORY NEEDS [5-24] 5.11 SUMMARY: PROGRAMMING CONCEPTS USING EMBEDDED ‘C’ [5-25] Review Questions [5-26] References for further reading [5-27] 6 SOFTWARE DEVELOPMENT PROCESS [6-1 to 6-26] 6.1 SOFTWARE DEVELOPMENT PROCESS [6-1] 6.1.1 The development process [6-2] 6.1.2 Software development process lifecycle [6-2] 6.1.3 Phases in software development process lifecycle [6-2] 6.1.4 Models in software development process lifecycle [6-3] 6.1.5 Linear sequential model or waterfall model [6-3] 6.1.6 Spiral model [6-4] 6.1.7 V model [6-6] 6.1.8 Comparison of waterfall, spiral, and V models [6-7] 6.2 SOFTWARE ANALYSIS [6-8] 6.2.1 Activities for software analysis during and embedded software development process [6-8] 6.3 SOFTWARE DESIGN [6-9] 6.3.1 Activities for software design during an embedded software development process [6-10] 6.3.2 Implementation by using detailed design [6-11] 6.4 SOFTWARE MAINTENANCE [6-12] 6.4.1 Types of software maintenance [6-13] 6.5 SOFTWARE EMBEDDED INTO A SYSTEM [6-13] 6.5.1 Final machine implementable software for a product [6-14] 6.5.2 Coding of software in machine codes [6-15] 6.5.3 Software in processor specific assembly language [6-15] 6.5.4 Software in high level language [6-16] 6.5.5 Software for the device drivers and device management using an operating system [6-17] 6.5.6 Software design for scheduling multiple tasks and devices using an RTOS [6-18] 6.5.7 Software modules and tools for the detailed designing of an embedded system [6-18] 6.5.8 Needed software tools in typical cases [6-18] 6.6 EMBEDDED SYSTEM ON CHIP (SOC) AND IN VLSI CIRCUITS [6-19] 6.6.1 Typical SoC for cell phone [6-19] 6.6.2 ASIP [6-20]
  7. 7. Table of contents vii 6.6.3 IP core [6-20] 6.6.4 Embedding a GPP [6-21] 6.6.5 FPGA (Field Programmable Gate Array) core with single or multiple processors [6-21] 6.6.6 DSP [6-22] 6.6.7 Components in a typical SoC- smart card [6-22] 6.7 SUMMARY: SOFTWARE DEVELOPMENT PROCESS [6-23] Review Questions [6-24] References for further reading [6-25] 7 REAL TIME OPERATING SYSTEM CONCEPTS [7-1 TO 7-58] 7.1 OPERATING SYSTEM [7-1] 7.1.1 Components of a computer system [7-2] 7.1.2 Types of operating system [7-2] 7.1.3 Components of operating system [7-3] 7.2 BASIC CONCEPTS OF REAL TIME OPERATING SYSTEM [7-3] 7.2.1 The fundamentals [7-3] 7.2.2 Basic kernel services [7-4] 7.2.3 Services provided by RTOS [7-5] 7.2.4 Architecture of kernel [7-6] 7.2.5 Types of scheduling algorithm [7-6] 7.2.6 Rate monotonic analysis (RMA) [7-9] 7.2.7 Interrupt service routines (ISR) [7-10] 7.2.8 Semaphores [7-11] 7.2.9 Round robin scheduling [7-12] 7.3 COMPARISON OF TRADITIONAL AND EMBEDDED OPERATING SYSTEM [7-15] 7.4 SOFTWARE ARCHITECTURE OF EMBEDDED SYSTEM [7-16] 7.4.1 Services provided by an operating system (function of operating system) [7-16] 7.4.2 Categories of operating system [7-16] 7.4.3 Special requirements of embedded system operating system [7-16] 7.4.4 Functionalities of operating system [7-17] 7.4.5 Activities of embedded operating system [7-17] 7.4.6 Software architecture [7-17] 7.4.7 Function calls provided by an operating system [7-18] 7.4.8 Hard and soft real time systems [7-18] 7.4.9 Development / testing tools [7-19] 7.4.10 General purpose system and embedded system [7-19] 7.4.11 Different software architecture of embedded system [7-20] 7.5 REAL TIME SYSTEM CONCEPTS [7-20] 7.5.1 Foreground / background systems [7-22] 7.5.2 RTOS features in general [7-27] 7.5.3 C / OS – II features and applications [7-28] 7.5.4 C / OS characteristics [7-28] 7.6 MICRO C / OS (COS – II) RTOS SERVICES [7-29] 7.6.1 Basic function in an RTOS [7-29] 7.7 COS – II RTOS SERVICES: TASK MANAGEMENT [7-30] 7.8 COS – II RTOS SERVICES: TIME MANAGEMENT [7-32]
  8. 8. viii Embedded systems and RTOS 7.9 COS – II RTOS SERVICES: SEMAPHORE MANAGEMENT [7-33] 7.10 COS – II RTOS SERVICES: MUTUAL EXCLUSION SEMAPHORE [7-35] 7.11 COS – II RTOS SERVICES: MEMORY MANAGEMENT [7-35] 7.12 INTER TASK COMMUNICATION AND SYNCHRONIZATION [7-37] 7.12.1 Relation between semaphore, ISR, and task [7-38] 7.12.2 Message mailboxes [7-39] 7.12.3 Message queues [7-40] 7.12.4 Event registers [7-41] 7.12.5 Pipes [7-41] 7.12.6 Signals [7-41] 7.12.7 Deadlock (or Deadly embrace) [7-42] 7.13 SYNCHRONIZATION [7-42] 7.14 PORTING COS – II [7-43] 7.15 SUMMARY: REAL TIME OPERATING CONCEPTS [7-44] Review Questions [7-47] References for further reading [7-57] 8 COMMERCIAL RTOS [8-1 TO 8-24] 8.1 OVERVIEW OF COMMERCIAL RTOS [8-1] 8.1.1 QNX Neutrino [8-2] 8.1.2 COS – II [8-2] 8.1.3 VxWorks [8-2] 8.1.4 RT Linux [8-2] 8.1.5 Handheld OS [8-3] 8.2 VxWORKS [8-4] 8.2.1 Basic features of VxWorks [8-5] 8.2.2 Basic functions of VxWorks [8-7] 8.2.3 Applications of VxWorks [8-7] 8.3 QNX [8-7] 8.3.1 QNX Neutrino architecture [8-8] 8.3.2 QNX Neutrino implementation [8-10] 8.4 SYMBIAN OS [8-11] 8.4.1 Features of Symbian OS [8-12] 8.4.2 Symbian OS architecture [8-12] 8.4.3 Application platform [8-13] 8.5 LINUX OPERATING SYSTEM [8-13] 8.5.1 Features of Linux [8-14] 8.5.2 Application of Linux [8-15] 8.6 WINDOWS CE [8-16] 8.6.1 Features of WinCE [8-16] 8.7 ANDROID OS [8-16] 8.7.1 Features of Android [8-17] 8.8 NUCLEUS RTOS [8-17] 8.8.1 Features of Nucleus RTOS [8-17] 8.9 SUMMARY: COMMERCIAL RTOS [8-19] Review Questions [8-22]
  9. 9. Table of contents ix References for further reading [8-23] 9 CASE STUDY OF EMBEDDED SYSTEMS [9-1 to 9-36] 9.1 SMART CARD: A CASE STUDY [9-1] 9.1.1 Features of smart card [9-2] 9.1.2 Classification of smart card [9-3] 9.1.3 Embedded hardware used in smart card [9-6] 9.1.4 Embedded software used in smart card [9-7] 9.1.5 Applications [9-8] 9.2 DIGITAL CAMERA: A CASE STUDY [9-8] 9.2.1 Users perspective [9-9] 9.2.2 Designers perspective [9-9] 9.2.3 Embedded hardware and software in digital camera [9-9] 9.2.4 Requirement specifications [9-13] 9.3 CASE STUDY OF EMBEDDED SYSTEM: ADAPTIVE CRUISE CONTROL SYSTEM IN A CAR [9-15] 9.3.1 Adaptive cruise control block diagram [9-15] 9.3.2 Model for an Adaptive control algorithm adapts and functions [9-16] 9.3.3 Functioning of system by synchronization of tasks in Adaptive cruise control [9-19] 9.3.4 Hardware architecture [9-20] 9.4 CASE STUDY OF AN EMBEDDED SYSTEM AS A MOBILE PHONE [9-21] 9.4.1 State diagram for Task_SMS_Create text send [9-23] 9.4.2 SMS create and send application software architecture [9-24] 9.5 CASE STUDY: DIGITAL ENERGY METER [9-26] 9.5.1 Hardware architecture of an energy meter [9-26] 9.5.2 Software architecture of an energy meter [9-28] 9.6 CASE STUDY: AUTOMATED TELLER MACHINE (ATM) [9-29] 9.6.1 Hardware architecture [9-30] 9.6.2 Process of withdrawing money from ATM [9-31] 9.7 SUMMARY OF A CASE STUDY OF EMBEDDED SYSTEM [9-33] Review Questions [9-34] References for further reading [9-36] 10 EMBEDDED LINUX [10-1 TO 10-24] 10.1 EMBEDDED LINUX [10-1] 10.1.1 Introduction to Linux [10-2] 10.1.2 Linux basics [10-2] 10.1.3 Why use Linux? [10-2] 10.1.4 Some basic Linux commands [10-3] 10.2 EMBEDDED LINUX DEVELOPMENT TOOLS [10-4] 10.2.1 Development tools required for ARM / Linux application [10-4] 10.2.2 Tool chain building [10-5] 10.2.3 Tool utilities [10-6] 10.2.4 Debugging tools [10-7] 10.2.5 MTD [10-7] 10.3 KERNEL ARCHITECTURE AND CONFIGURATION [10-8] 10.3.1 Overview of operating system and kernels [10-10]
  10. 10. x Embedded systems and RTOS 10.3.2 Types of kernel [10-10] 10.3.3 Kernel architecture overview [10-11] 10.3.4 Kernel functional overview [10-12] 10.4 FILE SYSTEM TYPES AND SUPPORT [10-14] 10.4.1 Linux file system concepts [10-15] 10.4.2 Types of Linux file system [10-16] 10.4.3 Root file system [10-16] 10.5 DEVICE DRIVERS [10-17] 10.5.1 What is a device driver ? [10-17] 10.5.2 What are different types of drivers? [10-17] 10.5.3 Writing simple device driver [10-17] 10.6 REAL TIME VARIANTS OF LINUX (FREE AND COMMERCIAL) [10-18] 10.7 FIRST LINUX APPLICATION ON ARM “HELLO WORLD” [10-18] 10.8 LINUX APPLICATION [10-22] 10.9 SUMMARY: EMBEDDED LINUX [10-23] Review Questions [10-23] References for further reading [10-24] Subject index List of tables at a glance Chapter 2: Wireless communication protocols Table 2.1: Frequency bands and data rates [2-28] Table 2.2: Channels and how to calculate them [2-28] Chapter 3: Processor and memories Table 3.1: Processor capabilities in typical systems [3-2] Table 3.2: Important microprocessors used in the embedded systems [3-5] Table 3.3: Important microcontrollers used in the embedded systems [3-6] Table 3.4: Important digital signal processors used in the embedded systems [3-7] Table 3.5: Hardware required in six typical systems [3-11] Table 3.6: AMCC PowerPC 405xx [3-25] Table 3.7: AMCC PowerPC 440xx [3-25] Table 3.8: Freescale select PowerQUICC I [3-26] Table 3.9: Freescale select PowerQUICC II [3-26] Table 3.10: Freescale select PowerQUICC II Pro [3-26] Table 3.11: Freescale select PowerQUICC III [3-27] Table 3.12: Broadcom select Sibyte Processor [3-28] Table 3.13: AMD Alchemy MIPS [3-28] Table 3.14: TI ARM OMAP [3-29] Table 3.15: Intel Xscale processor [3-30] Table 3.16: The functions assigned in the embedded systems to the memories [3-34] Table 3.17: Required memory devices in five cases [3-35] Chapter 4: ARM processors Table 4.1: The history of ARM processor from version 1 to the current version 6 architecture [4-4] Table 4.2: ARM family attributes comparison [4-6] Table 4.3: ARM version 4 processor modes [4-12] Table 4.4: ARM Cortex-M3 features [4-25] Table 4.5: Applications of various product types [4-26] Table 4.6: Feature description of Cortex A8 [4-26] Chapter 5: Programming concepts using embedded C Table 5.1: Uses of the various sets of instructions as the program elements [5-4] Table 5.2: Use of various data structure in a program element [5-5] Table 5.3: Use of queues for implementing a networking protocol [5-16] Chapter 6: Software development process Table 6.1: Activity list in three phases in a software development process [6-3] Table 6.2: Stages in the software development process in the linear sequential model [6-4] Table 6.3: Activities of requirements by models and specifications [6-8] Table 6.4: Types of software maintenance [6-13] Table 6.5: Software modules and tools for the detailed designing of an embedded system [6-18] Table 6.6: Software tools required in typical system [6-19] Chapter 7: Real time operating system concepts Table 7.1: Rate Monotonic Scheduling: Percentage of CPU time utilized [7-10] Table 7.2: Characteristics of various software architectures [7-20] Table 7.3: Three types of real systems [7-45] Chapter 9: Case study of embedded systems Table 9.1: Software architecture or steps required for energy meter product [9-28]
  11. 11.  EDITOR'S NOTE The advent in last few years of technology in the microprocessors and microcontrollers actually allowed to have small automatic and stand alone systems to be developed for the consumers goods. This gave rise to various types of appliances, like smart video games and automatic chocolate-vending machines that embeds low and high level processing hardware elements and application-specific processors into a chip has given an added dimension to the embedded systems that are multiprocessor systems, on a single VLSI chip (called System-on-Chip) and are smart as well as highly sophisticated. Embedded systems are becoming the core subject for software as well as hardware engineers and communication engineering. It is related to integration of several hardware and software into real time, stand alone, and portable system. Embedded systems and real time operating systems go hand in hand. This book is an attempt to simplify the concepts of embedded systems and real-time OS and upcoming technologies and processors. Thanks to university syllabus boards to give very advanced syllabus curriculum for this subject and made it very challenging. A practical based approach is adapted while presenting the subject matter and the language made very neutral. It will be useful to the beginners and practicing engineers as a reference book. Fortunately, I have gained a great wealth of knowledge for editing purpose through this book after Data structure in March 2011. The knowledge gained will be useful for this book and future books to make finest and user-friendly contents. I have included and refined major changes in the book. The book has become so much user-friendly. Prof. V.N. Ghodke's knowledge and understanding shown through at every turn played a key role in setting this book for its usefulness. His teaching and notes for this subject was earlier very useful for the students and faculties in various colleges in the University for the subject lead to perfection in the technical writing. He has finest orientation with respect to syllabus curriculum in teaching various electronic and communication related subject for the fourteen years, since this subject was first introduced in the university curriculum in the year 2003 and the available material was in infant stage. It is his great achievement of his job of over so many years to bring out this book. Every minute technical and text book requirements asked was fulfilled by him and made finest book which meets the standard. I am personally sure that this book will be of great use to students and as well as faculty members as well as the programming professionals in various industries. Mr.Chintan N. Dewalia D.I.E. (Institute of Polytechnic Engg,Lonere, Dr.Babasaheb Ambedkar University) B. E. Instrumentation Engg. (Dr.D.Y.Patil College of Engg., Pune) Preface Computers are everywhere. This fact, of course, is not a surprise to anyone who hasn't been living in a cave during the past 25 years or so. Moreover, you probably know that computers aren't just on our desktops, in our kitchens, and, increasingly, in our living rooms holding our music collections. They're also in our microwave ovens, our regular ovens, our cell phones, and our portable digital music players. Children need embedded systems to play smart video games and to operate automatic chocolate-vending machines! Young people need embedded systems to borrow smart cards from parents to see movies! Housewives need embedded systems for smart internet-compliant home appliances. The driver needs it for automatic cruise control of car. Organizations require embedded systems for network systems and products. There are so many examples of the applications of embedded systems. And if you're holding this book, you probably know a lot, or are interested in learning more about, these embedded computer systems. I'm excited about this book. It provides an excellent "guide up the learning curve" for the developer who wants to use develop the embedded system. It's clear, well-written, and well-organized; Until not too long ago, embedded systems were not very powerful, and they ran special-purpose, proprietary operating systems that were very different from industry-standard. Also, they were much harder to develop. Today, embedded computers are as powerful as a modern home computer. Along with this power comes the capability to run a full-fledged operating system. Using an operating system for an embedded product makes a lot of sense. A large community of developers is making it possible. The development environment and the deployment environment can be surprisingly similar, which makes your life as a developer much easier. Moreover, you have both the security of a protected address space that a virtual memory-based system gives you, and the power and flexibility of a multiuser, multiprocessor system. That's a good deal all around. For this reason, companies all over the world are using embedded system devices such as PDAs, home entertainment systems, and even, believe it or not, cell phones!
  12. 12. In the early days, embedded systems were designed using microprocessors like 8085.e.g. temperature-monitoring systems, data acquisition systems, music systems using appropriate interface and simple robotic systems using stepper motor interface. These are now not even referred to as embedded systems. An embedded system can be defined as one that has computer hardware with software embedded in it as one of its most important components. An embedded system is a dedicated, computer-based system for an application or product. An embedded system may be either an independent system or a part of a larger system. The organization of the chapters is as follows: Although my earlier notes that the students are using were arranged as per the old curriculum, new topics are added in revised syllabus. Therefore, I have rearranged the contents of the curriculum of Electronic and telecommunications in appropriate logical manner ultimately covers each and every topic in the syllabus. The main aim is to understand the subject completely. If you understand the subject completely, you don‟t have to read the book many times. Chapter 1 gives a detailed introduction to embedded systems. Embedded systems hardware consists of a processor, memory devices, characteristics, design metrics, and optimization of various parameters of embedded system. Current trends and challenges of embedded systems. Chapter 2 explains Wireless communication like Bluetooth (IEEE 802.15a) specifications, GPRS, IrDA, IEEE802.11 (WLAN or WI-FI), Mobile communication technology, WLAN Design goals for Wireless LAN,802.11 Architecture, Ad- hoc network, IEEE802.16 , Wi-Max, Zigbee, OSI overview, RFID,CAN protocol, LIN protocol, Flexray protocol exposure to different architectures. Survey of applications using Linux, Win CE, and Android such as touch screens, tablets etc. Survey of currently available processors from various manufacturers and comparison of them for embedded applications. Chapter 3 describes the various Processors and Memories like Microprocessors. Microcontrollers, Embedded processors, Digital signal processors are used in systems for imaging, video, and convergent technology products etc. Other hardware units like clock oscillator, Real time clock (RTC), DAC (using a PWM) and ADC , LCD and LED displays ,GPIB (IEEE 488) link , Interface and accessing PC104 compatible digital and analog I/O cards, Ethernet and TCP/IP , Further it takes to the Embedded System Technologies like Processors technology and IC technology. Memories like RAM, NV-RAM, ROM, and EEPROM (E2 PROM) etc are covered in depth. Chapter 4 concentrates on performance of ARM processors and their families like ARM-7 TDMI, ARM-7, ARM9, ARM11, ARM Cortex, hardware interfacing of devices like LPC2148. Chapter 5 explains the programming concepts and source code engineering tools for embedded system programming in embedded C/C++. The Software Programming in Assembly Language (ALP) and in high level language, „C‟ program elements, optimization of memory needs. It thoroughly explains the use of pointers and data structures in embedded software. Memory optimization is critical in an embedded system. This chapter gives the answer of How and why is it done? Chapter 6 teaches software development process and goes through software development processes lifecycle, necessary analysis, design guidelines of embedding software into a system with examples. It also gives various models like waterfall model, Spiral model, V model, and their Comparison of, spiral and V models. This chapter answers the importance of designing Embedded System On Chip (SOC) and in VLSI circuits , FPGA core with single or multiple processors DSP, IP core, Embedding a GPP, ASIP, SoC etc. Chapter 7 is for learning real-time operating system concepts. Comparing traditional and embedded operating systems. Description of software architecture of embedded system, real-time system concepts in Micro C / OS (COS – II) RTOS services, inter task communication and synchronization, porting COS – II etc is given in this chapter. Chapter 8 takes further explanation of chapter 7 is commercial RTOS and its overview. The commercial RTOS like VxWorks, QNX, Symbian OS, Linux OS, Windows CE, Android OS, Nucleus RTOS powering various now-a-days devices like Tablets, notebooks, and Cell phones etc. Those RTOS are helping to reduce the need of physical activity and changing the definition working styles in the offices and personnel use. Chapter 9 introduces the real world case studies of embedded systems that we actually use in personnel, commercial and industrial applications. The Smart Cards, digital camera, adaptive cruise control system in a car, mobile phone, digital energy meter, Automated Teller Machine (ATM) are explained thoroughly so that the developer gets the idea of how the systems already designed and helps in developing their own embedded system using problems and errors encountered in those earlier systems. Finally, Chapter 10 covers the introduction provides a brief look at the factors driving the rapid adoption of Linux in the embedded environment. Several important standards and organizations relevant to embedded Linux are introduced. This chapter examines the Linux kernel from a slightly different perspective. Instead of kernel theory or internals, we look at its structure, layout, and build construction so you can begin to learn your way around this large software project and, more important, learn where your own customization efforts must be focused. This includes the coverage of the kernel build system, embedded Linux development tools, kernel architecture and configuration, file system types and support, device drivers. Finally, the real-time variants of Linux (free and commercial), Linux applications are covered. While writing this book, the I had in his mind the graduate engineering students, readers and keen learners who are promising embedded system engineers of today and perhaps the master designers of these systems tomorrow. Also in mind were the young software engineers interested in working on embedded software and real-time programming
  13. 13. projects. This book is intended as a textbook for the students and a reference for the engineers to explain the concepts necessary for designing high-performance response-rime constrained sophisticated systems. I expect readers of this book to first learn about the embedded system architecture, its basic hardware, and software elements, programming models and software engineering practices that are used during the system development process and then learn the software techniques to embed codes into the systems. Develop systems that make optimum use of the available system resources: processor, memory, ports, devices, and power. This book has been written to fulfill these expectations. SCOPE AND OVERVIEW It's not only informative and helpful it's also enjoyable to read. I hope you both learn something and have fun at the same time. I know I did. Although many good books cover embedded systems and RTOS, none brings together so many dimensions of information and advice specifically targeted to the embedded developer. Indeed, there are some very good books written about the embedded system design and so on. Much of the material presented in this book is motivated by questions I've received over the years from the students and development engineers, in my capacity as a teacher. The text introduces embedded system and RTOS concepts, shows how those concepts are useful in problem solving. Equal emphasis is placed on both the abstract and the concrete versions of a concept, so that the student learns about the concept itself, its implementation, and its application. The programming concepts implemented in this text are using C. As Kernighan and Ritchie indicate, C is "a pleasant, expressive, and versatile language." I have included C in the fifth chapter. Hence even if you don‟t have any idea of C programming, you can use another book from our publisher i.e., Data structures. This book gives fine learning experience of C language and earlier the book was in the notes form and was famous in many colleges. Even in the same curriculum, you can use Electronic product design book from our publisher for many concepts while designing the embedded systems. This book is teaching the overall electronic system design point of view. The text is organized in most logical sequence. At no point of time the reader will feel that he or she is reading something, the prerequisite of which is not explained earlier. The explanation of each topic is given in simple language with examples. Also given are over one hundred references and suggestions for further reading of published books, websites, and journal papers. This will enable the readers to carry out further in-depth study of the topics related to Embedded Systems. The students can avail more information by email i.e. as we give extra information and material for each title published. GENERAL APPROACH The curriculum in B.E. Electronics & Telecommunication engineering and Electronics Engineering is arranged so that an introductory study of the microprocessors and microcontrollers, C language, data structures, classical electromagnetics and wave theory, Digital and analog communication in second year and third year. By then the students have had a suitable background in Electronics and communication so that Embedded systems and RTOS can be studied with the use of these fundamentals. In addition, the parallel and interrelated subject like Electronic product design and VLSI design includes some topics of this subject. Such a course thus furnishes adequate preparation for a more meaningful final year industrial projects experience using the software and hardware for the B.E. Electronics & Telecommunication engineering and Electronics engineering course. INTENDED READER The book is specially written for the students of final year in B.E. Electronics & Telecommunication engineering and Electronics Engineering and covers the entire syllabus of the subject “Embedded systems and RTOS” of the final year B.E. Electronics & Telecommunication engineering and Electronics Engineering. It is also seen as being of value to the students of Computer Engineering, Information technology and computer science. It can also be used by the students of M.E. in Computer Engineering, Communication engineering, Computer science, MSc, MCA, MCM, BCA, BSc Electronics and Electronic Science. BACKGROUND KNOWLEDGE ASSUMED This book is intended for programmers with a slight working knowledge of programming in C. I assume that you have a rudimentary understanding of local area networks and the Internet. You should understand and recognize an IP address and how it is used on a simple local area network. I also assume that you have an understanding of hexadecimal and octal
  14. 14. numbering systems, and their common usage in a text such as this. Several concepts related to C compiling and linking are explored, so you will benefit from having at least a cursory understanding of the role of the linker in ordinary C programming. Knowledge of the GNU make operation and semantics will also prove beneficial. - Prof. V. N. Ghodke Acknowledgements I am vastly indebted to many people who have helped and inspired me, in various ways, to start, continue, and complete this book. Writing a technical book involves a lot of painstaking attention to detail, so a big thank to my colleagues at G.S.M.C.O.E. especially Prof. S.D. Sawant (H.O.D., E&TC Engg.) and Prof. R.U. Shekokar for support. I cannot find words to describe the debt I owe to all my colleagues at the Pune University for having created a stimulating atmosphere of academic excellence, the basic element of any long-lasting endeavor. A special thanks to my teachers Dr. S. D. Lokhande (Principal, S.C.O.E.,Pune) , Prof. S. R. Ganorkar, and Prof. V. B. Baru developing the habit of self learning in the emerging technologies and passion for knowledge. I would like to thank our Principal Dr. A.S. Hiwale and management for their encouragement and support. I would like to thank my son Suven for having patience during the editing at home. I am thankful to my wife Mrs. Sujata V. Ghodke who has been very supportive and has let me put up spending a large proportion of home time on this book. Many thanks are due to my parents being the source of inspiration. I am grateful for the fine effort by the Chintan Publications group. Mrs. Bhaktti Dewalia spent many hours typing and correcting the original manuscript with the staff. Her meticulous work could bring this project into reality. I would like to thank her for the efforts put in. Mr. Chinttan Dewalia, the editor, who spent time and effort reading and providing feedback-a difficult activity that requires a special skill. He spent many hours correcting language, list of tables sorting the question banks and more tedious job of creating the index for the book. His co-operation and patience as I continually made up and changed my mind about additions and deletions are most sincerely appreciated. Thanks to all the reader for having faith in me. - Prof. V.N. Ghodke Many thanks to Prof. R. U. Shekokar (G. S. Moze college of engg, Balewadi ,Pune) and Prof. S.D. Sawant of the same college to whom I met for another purpose and coincidently met Prof. V. N. Ghodke regarding the publication of this book. That meeting gave birth to my publishing journey with him. After the many books being recommended by both the University of Pune and Mumbai encouraged me to publish the book which meets the standards, simplicity, and usefulness. I am glad to have an authoring of Prof. V. N. Ghodke with careful editing of contents and completing the whole activity with minimum time & great efforts. Before editing Ghodke sir had collected exhaustive material for the same that is now been utilized with his careful assessment and editing from the student‟s point of view as well as knowledge point of view. His zeal for the task was above and beyond the call of duty. We have reviewed all the chapters many times and made so many changes as per the learning and logical sequence so as to make a standard book for this subject. Many thanks to all the faculty members & teachers in Mumbai & Pune University & those who supported & encouraged me to publish the various useful & needful books. The books that are bridging the gap of contents & simplification between reference materials, application notes, and applied curriculum of engineering course in Mumbai & Pune University which will further conform to all the curriculums in Indian Universities. Every time we are getting more proficient in editing and publishing towards improving the quality of the book. The suggestions from all side will be very helpful to the future reader and students of this subject because the intention is to have a standard book for this subject. Thanks to all the students for encouraging us to publish this book. Chinttan N. Dewalia D.I.E. (Institute of Polytechnic Engg, Lonere, Dr. Babasaheb Ambedkar University) B. E. Instrumentation Engg. (Dr. D.Y. Patil College of Engg., Pune)
  15. 15. Editing, assessment&review: Chinttan N. Dewalia Typesetting and Art: Mrs. Bhaktti N. Dewalia to … My father Late Shri Namdev V. Ghodke
  16. 16.  SYLLABUS  (In accordance with the revised University syllabus 2008 for B.E. Electronics & Telecommunication engg and B.E. Electronics Engg) Unit 1: Introduction to Embedded System: Characteristics , design metrics and optimization of various parameters of embedded system. Current trends and challenges of embedded systems in terms of demand of number of applications,size,cost and power.Wireless communication like Bluetooth, GPRS, IRDA, IEEE 802.11 and 802.16. Other protocols like CAN,LIN ,flexray Survey of applications using Linux. Win CE and Android such as ipod, touch screen, tablet etc Exposure to different architectures. Survey of currently available processors from various manufacturers and comparison of them for embedded application Go to Chapter 1,2,3 Unit 2: Processor and Memory: Limitations of 8 bit processors and need of 32 bit processors. Different series of ARM : ARM7,ARM9, Arm11and ARM Cortex architecture. ,Features and applications of each with typical example. Hardware interfacing of devices like LPC2148. using Embedded C language: LED, Switches, LCD Display ,Serial Communication using on chip UART. On chip Multichannel ADC programming and USB interface with PC. On chip Real Time Clock and .On chip Timer/ counter programming with practical implementation. DSP,VLSI devices such as FPGA, IP CORES & SOC in embedded system. Memory types such as RAM, ROM, FLASH, EEPROM, NVRAM, application and selection for embedded system. Go to Chapter 3,4,5 Unit 3: Real time Operating System Concept: Comparison of traditional and embedded OS. Software architectures of embedded system and comparison of them. Architecture of kernel, types of scheduler algorithms. μcos II RTOS services : Task management, ISR, Timer, Semaphores, mailbox, message queues, pipes, events, signals, memory management. Go to Chapter 7 Unit 4: Embedded Linux: What is Embedded Linux? Development tools required for ARM/Linux applications. Tool chain building. Tool utilities such as Minicomp, Busybox, Redboot, Libc, debugging tools, MTD. First Linux application on ARM: “Hello world!” Linux Kernel architecture and configuration. File system types & support. Interface and accessing PC104 compatible digital and analog I/O cards Introduction to Ethernet and TCP/IP .Writing simple device drivers , Real-time variants of Linux (free and commercial).Linux applications. Go to Chapter 10 Unit 5: Commercial RTOS: Overview of Commercial RTOS like Vxworks, QNX, Nucleus.and Symbian. Features of each applicable for embedded applications. Features of Linux, Win CE, Android and Symbian OS used in smart mobile phones & development support features. Software development life cycle. Various models like waterfall, spiral, V models and Comparison. Go to Chapter 8,6 Unit 6: Case Study of Embedded system: Case study of embedded system like digital camera, smart card, ATM. Mobile phones Automotive applications for Car area network ,engine control, safety & fuel efficiency, energy meters, ECG Machines,industrial automations, points of sales terminals. Mobile Internet Device(MTD). Case study should be demonstrated by suitable hardware and software with or w/o RTOS. Should specify processor, Memory & special I/O device. In software should mention No of tasks, priorities, RTOS services such as Semaphore, Mailboxes queues, signals etc. Simple application W/O RTOS should have modular design with drivers and c codes. Go to Chapter 9 B.E. Electronics Unit 1: Introduction: Introduction to embedded system, Definition of embedded systems, characteristics of embedded systems, design metrics, applications, embedded system operations, Software development, software architectures, IDE, Communication protocols: Blue tooth, Zig-bee, etc. Go to Chapter 1,2,6 Unit 2: Embedded Processor: Processor internal architecture, processor technology, processor types, embedded processor, RISC design philosophy, specifications of processor/s, memory organization, memory interfacing aspects, processor & memory selection for different applications, Interrupts. Go to Chapter 3,4 Unit 3: Arm Processor: ARM-7 processor LPC 2148 architecture, data flow model, memory organization, programming model, ISP & IAP, register banking, operating modes: ARM mode & Thumb mode, I/O port read/write operations, Status registers Go to Chapter 4 Unit 4: Programming: On chip communication protocols of LPC 2148, Programming concepts using embedded C, Programming ARM processor for implementing various communication protocols, keyboard Interface, LCD interface, on chip ADC/DAC interface. Go to Chapter 4,5 Unit 5: Real Time Operating Systems Concept: Real Time Operating Systems μCOS-II, Features, State diagram, comparison with traditional OS, Semaphore, shared data problem, scheduling algorithms, dead lock. Go to Chapter 7 Unit 6: Case Study: Priority inversion problem, priority inheritance, interrupts management; inter task communication, memory management, Time delays. Case studies: Cruise control, digital Camera.
  17. 17. Go to Chapter 9