Embedded system

INTRODUCTION

we provide information on the design, development and debugging of Embedded Systems under this section. This information could be useful to the beginners as well as to the advanced Embedded System Developers. These tutorials are under continuous update. So, if you have any suggestions, which might help me to improve the usefulnees of these tutorials, please feel free to provide me your feedback.

PROCESSOR ARCHITECTURE

In previous section we discussed about the parallelism which can exists in an appllication. Modern processors employ intelligent processor architectures to exploit the parallelism of the computer programs. In this section we will discuss about different processor architectures.

PERIPHERALS

Peripherals (of a processor) are its means of communicating with the external world.

MEMORY

Memory is an important part of embedded systems. The cost and performance of an embedded system heavily depends on the kind of memory devices it utilizes. In this section we will discuss about "Memory Classification", "Memory Technologies" and "Memory Management".

PROCESSOR BOOTING

On reset event, processor starts executing instructions from a fixed Memory Address, called “Reset Vector Address”. The Reset Vector address for a given processor is fixed.

PARALLEL PROCESSING

A computer program consists of a sequence of instructions. Each of these instructions performs some operations on certain data operands. So, computer program can be considered as a sequence of operations on certain data operands. A computer program is said to exhibit parallelism, if these operations (to be performed on data operands by the given set of instructions) can be performed in any order. If the operations could be performed out of order, and multiple processing elements (or ALUs) are available, then it would be possible to perform these operations in parallel (since the order of execution does not matter) at the same time. That is where the world parallelism coins from. The processors which provide multiple ALUs on a single chip (to exploit the program parallelism) are called parallel processors (and the process is known as parallel processing) . There could be different kind of parallelism in a program.

EMBEDDED SYSTEM DESIGN

Designer of an Embedded System faces two conflicting requirements 1 ; High Performance and Low Cost 2 .

Performance of a system refers to its Direct features. There could be Direct or Indirect features in a product (both add to product cost). Let us consider example of a Digital Still Camera. Its direct features include Zoom (how many X), Picture Quality (How many mega pixels), Optics (which lenses in particular), Storage (How much memory), Speed (How many clicks per second), and Battery life. The indirect features include free accessories and spares, image compression and image processing softwares, warranty and after-sales support. In this section we will only discuss the direct features of a product because these features are directly under control of system designer. A careful selection and design of these features, can greatly improve the final system cost.

High Reliability and High Quality are two other factors which could be decisive during the Design Process. Some (Mission critical and Life critical) systems require very high reliability (e.g. Space Shuttles, Heart Pace-maker, ABS in a Car). Though cost could still be a constraint for such systems, but it is very much relaxed. Any failure of such product could be fatal and hence the design process requires special emphasis on reliability. In some products, quality is a major criteria (apart from low cost).

Safety Norms (e.g. low emi-emc radiations for medical equipments), and Low Power Design (for battery powered handheld devices) could also act as design constraints for such systems.

EMBEDDED SYSTEM DEVELOPMENT

The most important development goals for embedded system developers are "Low Time to Market" and "High Quality". Probably no customer would dislike a "Zero Defect" product delivered to them in "Zero Time". We will discuss these two constraints later in this section.

EMBEDDED SYSTEM DEBUGGING

Application Debugging: Simulators and emulators are two powerful debugging tools which allow developers to debug (and verify) their application code. These tools enable programmer to perform the functional tests and performance tests on the application code. Simulator is a software which tries to imitate a given processor or hardware. Simulator is based on the mathematical model of the processor. Generally all the functional errors in an application can be detected by running it on the simulator. Since simulator is not actual device itself, it may not be an exact replica of the target hardware. Hence, some errors can pass undetected through the simulator. Also, the performance of an application can not be accurately measured using Simulator (it only provides a rough estimate). Generally most development tools come under an integrated environment, where Editor, Compiler, Archiver, Linker and Simulator are integrated together. Emulator (or Hardware Emulator) provides a way to run the application on actual target (but under the control of a emulation software) hardware. Results are more accurate with emulation, as the application is actually running on the real hardware target.

Hardware Debugging: Developer of an Embedded System often encounters problems which are related to the Hardware. Hence it is desirable to gain familiarity with some Hardware Debugging (probing tools). DVM, Oscilloscope (DSO or CRO) and Logical Analyzer (LA) are some of the common debugging tools, which are used in day to day debugging process.

Memory Testing Tools There are a number of commercially available tools which help programmers to test the memory related problems in their code. Apart from Memory leaks, these tools can catch other memory related errors - e.g. freeing a previously allocated memory more than once, writing to uninitialized memory etc. Here is a list of some freely (no cost) available Memory Testing tools:

MORE ON MEMORY DEVICES

In this section I have discussed about the NOR Flash Commands and the operations supported by a “Generic NOR Flash Driver”. I have also provide a “Flash Driver example code in C” for “AT29LV040A Flash Memory”. This code can be used for any other Flash Memory, with minimum changes.

REAL WORLD EXAMPLES

In this section we will discuss about the "Interprocessor Communication". We will also implement a communication protocol for Inter-processor communication between two processors, using Shared Memory and GPIOs.