Application Of Embedded Systems On Mobile Phones Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

In the day-to-day life we come across a wide variety of consumer electronic products. Common examples are Mobile Phones, Washing machines, FAX machines, Xerox machines, TV Remote Controllers etc. Each of these devices does have one or more programmable devices which interact with the environment as effectively as possible. These are a class of "embedded systems" and they provide service without much delay in real time

Fig 1 : Overview of Nokia mobile

1.1 Features of Mobile phone:

We often look for the following features while buying a mobile phone. Price, weight, size, screen, games, camera, radio, ringtones and memory . Besides these features it also includes network type GSM and CMDA (Bandwidth) .A mobile phone is a very complex device which houses a number of miniature gadgets functioning coherently on a single device. Each of these embedded gadgets such as digital camera or an FM radio along with the telephone has a number of operating modes such as:

• To adjust the zoom of the digital camera,

• To reduce the screen brightness,

• To change the channels in FM radio,

• To use it as a calculator, address book, emailing device etc.

These variations in the functionality can only be achieved by a very flexible and customized microprocessor known as an Embedded Processor and the mobile phone housing a number of functionalities is known as an Embedded System

1.2 Characteristics of RTEs:

Single functioned:

The RTES is usually meant for very specific functions. Generally a special purpose microprocessor executes a program over and over again for a specific purpose. If the user wants to change the functionality, e.g. changing the mobile phone from conversation to camera mode or calculator mode the program gets flushed out and a new program is loaded which carries out the requisite function. These operations are monitored and controlled by an operating system called as Real Time Operating System (RTOS)

Tightly Constrained:

The constraints on the design and marketability of RTES are more rigid than their non-real-time non-embedded counter parts. Time-domain constraints are to be taken care while developing such a system. Size, weight, power consumption and cost are the other major factors.

Reactive and Real Time

Many embedded systems must continually react to changes in the system's environment and must compute certain results in real time without delay

1.4 Mobile phone circuitry:

In general, a cell phone is composed of the following components:

• A Circuit board • Antenna • Microphone • Speaker • Keyboard • Battery

• Liquid crystal display (LCD)

Fig 2: Mobile phone internal components

Fig 3: Cell Phone Circuitry

A typical mobile phone should include standard I/O devices (keyboard, LCD), plus a microphone, speaker and antenna for wireless communication. The Digital Signal Processor (DSP) performs the signal processing, and the micro-controller controls the user interface, battery management, call setup etc. The performance specification of the DSP is very crucial since the conversion has to take place in real time. This is why almost all cell phones contain such a special processor dedicated for making digital-to-analog (DA) and analog-to-digital (AD) conversions and real time processing such as modulation and demodulation etc. The Read Only Memory (ROM) and flash memory (Electrically Erasable and Programmable Memory) chips provide storage for the phone's operating system (RTOS) and various data such as phone numbers, calendars information, games etc.

1.5 Design Metrics

A Design Metric is a measurable feature of the system's performance, cost, time for implementation and safety etc. Following metrics are generally taken into account while designing embedded systems

NRE cost (nonrecurring engineering cost): It is one-time cost of designing the system.

Unit cost: The monetary cost of manufacturing each copy of the system, excluding NRE cost.

Size: The physical space required by the system, often measured in bytes for software, and gates or transistors for hardware.

Performance: The execution time of the system

Power Consumption: It is the amount of power consumed by the system, which may determine the lifetime of a battery, or the cooling requirements of the IC, since more power means more heat.

Flexibility: The ability to change the functionality of the system without incurring heavy NRE cost. Software is typically considered very flexible.

Time-to-prototype: The time needed to build a working version of the system, which may be bigger or more expensive than the final system implementation,.

Time-to-market: The time required to develop a system to the point that it can be released and sold to customers. The main contributors are design time, manufacturing time, and testing time..

Maintainability: It is the ability to modify the system after its initial release, especially by designers who did not originally design the system.

Correctness: This is the measure of the confidence that we have implemented the system's functionality correctly.

The Performance Design Metric: Performance of a system is a measure of how long the system takes to execute our desired tasks.

2. Components of an Embedded System: (Mobile Phone)

2.1 Digital Signal Processor:

Signals represented digitally as sequences of samples. Digital signals obtained from physical signals via transducers (e.g., microphones) and analog-to- digital converters (ADC) .Digital signals converted back to physical signals via digital-to-analog converters (DAC).

DSP: TI 3206711, TI 3205000, TMS32010 can be used in mobile phones.

TMS 32010 has got the following features

16-bit fixed-point

Harvard architecture separate instruction and data memories

Specialized instruction set Load and Accumulate

390 ns Multiple-Accumulator(MAC)

General characteristics of Digital Signal Processor:

Microprocessors specialized for signal processing applications

Harvard architecture

Two to Four memory accesses per cycle

Dedicated hardware performs all key arithmetic operations in 1 cycle

Very limited Single Instruction Multiple Data features

Multiple operations per instruction

Dedicated address generation units

Specialized addressing Hardware looping.

Interrupts disabled during certain operations

Limited or no register Shadowing

Relatively narrow range on-chip peripherals and I/O interfaces

Synchronous serial port

2.2 General Processor:

The General Processor used here is ARM processor. It deals with interface between the device and the environment. ARM is one of the most licensed and used mostly in Symbian Operating systems.

The ARM is a 32-bit reduced instruction set computer (RISC) originally conceived as a processor for desktop personal computers by Acorn Computers . The relative simplicity of ARM processors made them suitable for low power applications. This has made them dominant in the mobile and embedded electronics market as relatively low cost and small microprocessors and microcontrollers.

ARM core diagram:

Fig 4: ARM architecture

ARM Characteristics:

• 32-bit RISC-processor core (32-bit instructions)

• 37 pieces of 32-bit integer registers (16 available)

• Pipelined (ARM7: 3 stages)

• Cached (depending on the implementation)

• Von Neuman-type bus structure (ARM7), Harvard (ARM9)

• 8 / 16 / 32 -bit data types

• 7 modes of operation (usr, fiq, irq, svc, abt, sys, und)

• 32-bit long instruction word

• Simple structure, reasonably good speed / power consumption ratio

ARM core modes of operation:

• User (usr): Normal program execution state

• FIQ (fiq): Data transfer state (fast irq, DMA-type transfer)

• IRQ (iqr): Used for general interrupt services

• Supervisor (svc): Protected mode for operating system support

• Abort mode (abt): Selected when data or instruction fetch is aborted

• System (sys): Operating system 'privilege'-mode for user

• Undefined (und): Selected when undefined instruction is fetched

2.3 Memory:

The memory may be Read-Only-Memory or Random Access Memory (RAM). To reduce the access (read-write) time a local copy of a portion of memory can be kept in a small but fast memory called the cache memory. The memory also can be categorized as dynamic or Static. Dynamic memory dissipates less power and hence can be compact and cheaper. But the access time of these memories are slower than their Static counter parts. In Dynamic RAMs (or DRAM) the data is retained by periodic refreshing operation. While in the Static Memory (SRAM) the data is retained continuously. SRAMs are much faster than DRAMs but consume more power.

Data Storage:

An m word memory can store m x n: m words of n bits each. One word is located at one address therefore to address m words we need.

K = Log2(m) address input signals; k number address lines can address m = 2k words

Example 4,096 x 8 memory:

• 32,768 bits

• 12 address input signals

• 8 input/output data signals

There are two important specifications for the Memory as far as Real Time Embedded Systems are concerned.

Write ability: It is the manner and speed that a particular memory can be written

High end - Processor writes to memory simply and quickly e.g., RAM

Middle range - Processor writes to memory, but slower e.g., FLASH, EEPROM

Lower range - Programmer must write to memory e.g., EPROM, OTP ROM

Low end - Bits stored only during fabrication e.g., Mask-programmed ROM

Storage Performance: It is the ability to hold the stored bits.

High end - Essentially never loses bits e.g., mask-programmed ROM

Middle range - Holds bits days, months, or years after memory's power source turned off e.g., NVRAM

Lower range - Holds bits as long as power supplied to memory e.g., SRAM

Low end - Begins to lose bits almost immediately after written e.g., DRAM

Types of memory in Symbian OS:

Random access memory:

RAM is the volatile execution and data memory. Applications vary in how much RAM they use, and this also depends on what the application is doing at the time. Also, the more RAM space you have, the more programs you can run on your smartphone at once. Typically, mobile phones have between 7 and 30MB of RAM available for applications to use.

Read Only Memory (ROM):

The ROM is where the Symbian OS software itself resides. It includes all the startup code to boot the device, as well as all device drivers, system configuration files and other hardware-specific code. For added efficiency, code in ROM is executed in place - i.e. it is not loaded into RAM before executing. Typically a phone has between 16 and 32MB of ROM.

Internal Flash Disk:

The internal flash acts like a disk drive and allows for reading and writing files to it via the Symbian OS file system. The file system is fully featured and supports a hierarchical directory structure. This memory contains user-loaded applications, as well as data such as documents, pictures, video, bookmarks, calendar entries, etc. The size of the internal flash disk varies with the phone, but it can be quite generous. For example, the Nokia 9500 has 80MB of internal flash space , Nokia 6600 has 6MB of flash space available to the user.

Removable memory cards:

Memory cards act as removable disk drives and allow you to expand the storage provided internally. You can also read from and write to a memory card just as to the internal disk - including operations such as saving user data, and even installing by phone. Memory card sizes can vary from 16MB (or even less) to 1GB applications.

2.4 Input/Output Devices and Interfaces:

To generate an analog signal from the microprocessor Digital to Analog Converter(DAC) is needed and to accept analog signal we need and Analog to Digital Converter (ADC). These DAC and ADC again have certain control modes. They may also operate at different speed than the microprocessor. To synchronize and control these interface chips we may need another interface chip. These chips serve as relaying units to transfer data between the processor and input/output devices. The input/output devices are generally slower than the processor. Therefore, the processor may have to wait till they respond to any request for data transfer. Number of idle clock cycles may be wasted for doing so. However, the input-output interface chips carry out this task without making the processor to wait or idle.

Fig 5: Block diagram of Signal Conversion

ADC and DAC:

The sensor is a microphone. The conditioner can be a preamplifier or a demodulator. The Analog Processor mostly is a Low Pass Filter (LPF). This is primarily used to prevent aliasing. The following is the Analog to Digital Converter which has a number of stages to convert an analog signal into digital form. The Digital Signal Processing is carried out by a system with a processor. Further the processed signal is converted into analog signal by the Digital to Analog Converter which finally sends the output to the real world through another Low Pass Filter.

DA Converter:

Pulls the samples from memory and convert them into an impulse train.

AD Converter:

Sampler - Tries to maintain a constant voltage till the next switching

Quantizer - Convert the voltage to a binary number. The number of bits in a binary number decides the approximation and accuracy.

Coder - Responsible for packing several samples and transmitting them onwards either in synchronous or in asynchronous manner.

The Sampling frequency defines the number of samples per second taken from a continuous signal to make a discrete signal. Common sampling rates in digital audio signal is 8000 Hz for telephone, adequate for human speech.

According to Nyquist-Shannon sampling theorem a signal can be exactly reconstructed from its samples if the sampling frequency is greater than twice the highest frequency of the signal. In practice, the sampling frequency is often significantly more than twice the required bandwidth.

2.5 Network Communication:

The following table illustrates the properties of wireless communication used in mobile phones









Transmission Rate




Connection limit





Blocked by wall

Can penetrate walls

Can penetrate walls


Line of Site



Hop Frequency




RF Output Power


100mW-1 W


Application Area

Ad-hoc networks

Local Area Networks

Ad-hoc Networks

2.6 Real time Operating Systems:

Like a computer operating system, a mobile operating system is the software platform on top of which other programs run. The operating system is responsible for determining the functions and features available on your device, such as thumbwheel, keyboards, WAP, synchronization with applications, e-mail, text messaging and more. Some of the more common and well-known Mobile operating systems include the following:

Symbian OS:

Symbian OS is used Nokia mobile phone. Symbian is a joint venture originally set up by Ericsson, Nokia and Psion to develop an industry standard operating system for mobile multimedia terminals.

It is currently owned by Ericsson (15.6%), Nokia (47.9%), Panasonic (10.5%), Samsung (4.5%), Siemens AG (8.4%), and Sony Ericsson (13.1%).

It has become a standard operating system for smartphones, and is licensed by more than 85 percent of the world's handset manufacturers. It is designed for the specific requirements of 2.5G and 3G mobile phones.

Windows Mobile:

The Windows Mobile platform is available on a variety of devices from a variety of wireless operators. Windows Mobile software can be found on Dell, HP, Motorola, Palm and i-mate products. Windows Mobile powered devices are available on GSM or CDMA networks.

Palm Pilot:

Since the introduction of the first Palm Pilot in 1996, the Palm OS platform has provided mobile devices with essential business tools, as well as capability to access the Internet or a central corporate database via a wireless connection.

Mobile Linux:

The first company to launch phones with Linux as its OS was Motorola in 2003. Linux is seen as a suitable option for higher-end phones with powerful processors and larger amounts of memory


MXI is a universal mobile operating system that allows existing full-fledged desktop and mobile applications written for Windows, Linux, Java and Palm be enabled immediately on mobile devices without any redevelopment. MXI allows for interoperability between various platforms, networks, software and hardware components.

2.7 Real-Time Task Scheduling Algorithms:

Three broad classes of scheduling algorithms are the following:

Clock Driven:

The clock-driven schedulers are those in which the scheduling points are determined by the interrupts received from a clock.

• Table-driven • Cyclic

Event Driven:

In the event-driven ones, the scheduling points are defined by certain events which precludes clock interrupts.

• Simple priority-based • Rate Monotonic Analysis (RMA)

• Earliest Deadline First (EDF)


Hybrid ones use both clock interrupts as well as event occurrences to define their scheduling points.

• Round-robin

Scheduling Algorithm in Symbian:

Symbian use a round robin priority based algorithm to select which thread is to be scheduled next. Basically it starts with the highest priority queue and runs each thread which are not blocked in turn until there is not more ready to run thread in that priority queue. It then moves to the next priority queue and so on.

Obviously if a thread with a higher priority is ready then the scheduler goes back up the highest priority queue.

Following algorithms are also used in other operating systems depending upon the application

Clock-Driven Scheduling:

Clock-driven schedulers make their scheduling decisions regarding which task to run next only at the clock interrupt points

Table-driven schedulers: It usually pre-compute which task would run when, and store this schedule in a table at the time the system is designed or configured

Cyclic scheduler: It repeats a pre-computed schedule. The pre-computed schedule needs to be stored only for one major cycle. Each task in the task set to be scheduled repeats identically in every major cycle.

Event Driven Scheduling:

Foreground Background scheduler: It is possibly the simplest priority-driven preemptive scheduler. The real-time tasks in an application are run as fore- ground tasks. The sporadic, aperiodic, and non-real-time tasks are run as background tasks. Among the foreground tasks, at every scheduling point the highest priority task is taken up for scheduling. A background task can run when none of the foreground tasks is ready. In other words, the background tasks run at the lowest priority.

Earliest Deadline First (EDF) scheduler: At every scheduling point the task having the shortest deadline is taken up for scheduling. A task set is schedulable under EDF, if and only if it satisfies the condition that the total processor utilization due to the task set is less than 1.

Rate Monotonic Analysis (RMA): RMA assigns priorities to tasks based on their rates of occurrence. The lower the occurrence rate of a task, the lower is the priority assigned to it. A task having the highest occurrence rate (lowest period) is accorded the highest priority. RMA has been proved to be the optimal static priority real-time task scheduling algorithm.

Deadline Monotonic Algorithm (DMA): RMA no longer remains an optimal scheduling algorithm for the periodic real-time tasks, when task deadlines and periods differ (i.e. d i≠ pi) for some tasks in the task set to be scheduled. For such task sets, Deadline Monotonic Algorithm (DMA) turns out to be more proficient than RMA. DMA is essentially a variant of RMA and assigns priorities to tasks based on their deadlines, rather than assigning priorities based on task periods as done in RMA. DMA assigns higher priorities to tasks with shorter deadlines. When the relative deadline of every task is proportional to its period, RMA and DMA produce identical solutions. When the relative deadlines are arbitrary, DMA is more proficient than RMA in the sense that it can sometimes produce a feasible schedule when RMA fails. On the other hand, RMA always fails when DMA fails

3.0 Safety and reliability:

A fail-safe state of a system is one which if entered when the system fails, no damage would Result.

A safety-critical system is one whose failure can cause severe damages.

To achieve high reliability the following must be met:

Error Avoidance: Every possibility of occurrence of errors should be minimized during product development as much as possible.

Error Detection and Removal: This can be achieved to a large extent by conducting thorough reviews and testing.

Fault-Tolerance: Even in situations where errors are present, the system should be able to tolerate the faults and compute the correct results. Fault-tolerance can be achieved by carefully incorporating redundancy.

3.1 Hardware Fault-Tolerance:

Built In Self Test (BIST): The system periodically performs self tests of its

components. Upon detection of a failure, the system automatically reconfigures

itself by switching out the faulty component and switching in one of the

redundant good components

Triple Modular Redundancy (TMR): As the name suggests, three redundant copies of all critical components are made to run concurrently

3.2 Software Fault-Tolerance:

N-Version Programming: Independent teams develop N different versions (value of N depends on the degree of fault-tolerance required) of a software component (module). The redundant modules are run concurrently (possibly on redundant hardware). The results produced by the different versions of the module are subjected to voting at run time and the result on which majority of the components agree is accepted

Recovery Blocks: The redundant components are called try blocks. Each try block computes the same end result as the others but is intentionally written using a different algorithm compared to the other try blocks. In N-version programming, the different versions of a component are written by different teams of programmers, whereas in recovery block different algorithms are used in different try blocks

4.0 Performance measures:

4.1 Watchdog Timer:

It is a fail-safe mechanism that intervenes if a system stops functioning. It consists of a hardware timer that is periodically reset by software. If the software crashes or hangs, the watchdog timer will expire, and the entire system will be reset automatically.

The watchdog timer is a 16-bit internal timer that resets the microcontroller if the software fails to operate properly.

A common problem for a machine is to lock up if two parts or programs conflict, or, in an operating system, if memory management trouble occurs.

A watchdog timer can be programmed to perform a warm boot (restarting the system) after a certain number of seconds during which a program or computer fails to respond following the most recent mouse click or keyboard action.

A WDT contains a digital counter that counts down to zero at a constant speed from a preset number. The counter speed is kept constant by a clock circuit. If the counter reaches zero before the computer recovers, a signal is sent to designated circuits to perform the desired action