0% found this document useful (0 votes)
22 views32 pages

Unit 1 QB Part B

The document outlines the design process for embedded systems, detailing steps such as requirements gathering, specification formulation, architecture design, component building, and system integration. It also discusses various types of embedded processors, including microcontrollers, DSPs, FPGAs, SoCs, and ARM Cortex processors, highlighting their applications and selection criteria based on performance, power consumption, and cost. Additionally, it emphasizes the importance of a suitable processor selection in embedded system design through case studies.

Uploaded by

Free Fire tamil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views32 pages

Unit 1 QB Part B

The document outlines the design process for embedded systems, detailing steps such as requirements gathering, specification formulation, architecture design, component building, and system integration. It also discusses various types of embedded processors, including microcontrollers, DSPs, FPGAs, SoCs, and ARM Cortex processors, highlighting their applications and selection criteria based on performance, power consumption, and cost. Additionally, it emphasizes the importance of a suitable processor selection in embedded system design through case studies.

Uploaded by

Free Fire tamil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

Part – B (C312.1)
1. Illustrate in detail the design process involved in embedded system /Explain in detail about the
different embedded processors in a system. (Dec 2014) (May 2015) (Nov 2022).
Design process steps:
There are different steps involved in Embedded system design process. These steps depend on the design
methodology. Design methodology is important for optimizing performance, and developing computer
aided design tools. It also makes communication between team members easier. Figure1 shows the steps in
the design process. They are requirements gathering, specification formulation, architecture design,
building of components, and system integration.

The steps in the design process can be viewed as top down view and bottom up view. Top–down view
begins with the most abstract description of the system and concludes with concrete details. Bottom–up
view starts with components to build a system. Bottom–up design steps are shown in the figure as dashed-
line arrows. We need bottom–up design because we do not have perfect insight into how later stages of the
design process will turn out.
The major goals of the design to be considered are :
● Manufacturing cost;
● Performance (both overall speed and deadlines) and
● Power consumption.
The tasks which need to be performed at each step are the following.
● We must analyze the design at each step to determine how we can meet the specifications.
● We must then refine the design to add details.
● We must verify the design to ensure that it still meets all system goals, such as cost, speed, and so on.
We will discuss each step of the design process in detail.
1.1 Requirements
Informal descriptions gathered from the customer are known as requirements. The requirements are refined
into a specification to begin the designing of the system architecture. Requirements can be functional or
non-functional requirements. Functional requirements need output as a function of input. Non-functional
requirements includes performance, cost, physical size, weight, and power consumption.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

1.2 Specification
Requirements gathered is refined into a specification. Specification serves as the contract between the
customers and the architects. Specification is essential to create working systems with a minimum of
designer effort. It must be specific, understandable and accurately reflect the customer’s requirements.
Example:
Considering the example of the GPS system, the specification would include details for several
components:
• Data received from the GPS satellite constellation
• Map data
• User interface
• Operations that must be performed to satisfy customer requests
• Background actions
1.3 Architecture Design
The specification describes only the functions of the system. Implementation of the system is described by
the Architecture. The architecture is a plan for the overall structure of the system. It will be used later to
design the components.
Example:
A basic block diagram of the GPS system shows the major operations and the data flow among the blocks.

Architectural descriptions must be designed to satisfy the functional and non-functional requirements. Not
only must all the required functions be present, but we must meet cost, speed, power and other non-
functional constraints. Starting out with a system architecture and refining that to hardware and software
architectures is one good way to ensure that we meet all specifications. We can concentrate on the functional
elements in the system block diagram, and then consider the non- functional constraints when creating the
hardware and software architectures.
1.4 Hardware and Software components
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

The architectural description tells us what components we need. The component design effort builds those
components in conformance to the architecture and specification. The components in general includes both
hardware and software modules. Some of the components will be ready-made (example :CPU, memory
chips).
1.5 System integration
After the components are built, they are integrated. Bugs are typically found during the system integration.
Good planning can help us to find the bugs quickly. By debugging a few modules at a time, simple bugs
can be uncovered. By fixing the simple bugs early, more complex or obscure bugs can be uncovered.
System integration is difficult because it usually uncovers problems. The debugging facilities for embedded
systems are usually much more limited than the desktop systems. Careful attention is needed to insert
appropriate debugging facilities during design which can help to ease system integration problems.
Embedded processors are a crucial component of embedded systems, providing the computational power
necessary to execute tasks and control various functions. The choice of an embedded processor depends on
the application's requirements, including performance, power consumption, cost, and other specific needs.
Here's an overview of some common types of embedded processors:
 Microcontrollers:
Microcontrollers are compact integrated circuits that consist of a processor core, memory (RAM and
ROM/Flash), and peripheral interfaces on a single chip. They are designed for specific applications and are
commonly used in embedded systems.
Applications: Widely used in simple and cost-sensitive applications such as household appliances,
automotive control systems, and small-scale industrial devices.
Digital Signal Processor (DSP):
DSPs are specialized processors optimized for signal processing tasks such as audio and video processing,
image manipulation, and communication signal processing. They excel at performing mathematical
operations in real-time.
 Applications: Found in audio processing devices, image and video processing systems,
telecommunications equipment, and radar systems.
 Field Programmable GATE Array (FPGA):
FPGAs are programmable logic devices that can be configured to perform specific tasks after
manufacturing. They consist of an array of configurable logic blocks and programmable interconnects.
Applications: Used in applications where flexibility and reconfigurability are essential, such as prototyping,
digital signal processing, and hardware acceleration.
 System on Chip (SoC):
SoCs integrate multiple components, including processors, memory, peripherals, and often GPU (Graphics
Processing Unit) or other accelerators, onto a single chip. They offer a comprehensive solution for
embedded systems.
Applications: Commonly used in a wide range of applications, including smartphones, tablets, smart TVs,
automotive systems, and IoT devices.
 ARM Cortex Processors:
ARM Cortex processors are a family of energy-efficient and scalable processors designed by ARM
Holdings. They come in different cores with varying performance levels and power consumption.
Applications: Used in a broad spectrum of applications, from low-power microcontrollers (e.g., Cortex-M
series) to high-performance computing (e.g., Cortex-A series) in smartphones, embedded systems, and
servers.
 Graphic Processing Units (GPU):
Originally designed for rendering graphics, GPUs are highly parallel processors capable of handling
complex mathematical computations. They are increasingly used in embedded systems for parallel
processing tasks.
Applications: Found in applications requiring parallel computation, such as graphics rendering, machine
learning, and scientific simulations.
 RISC Processors :
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

RISC processors have a simplified instruction set, focusing on a small set of frequently used instructions,
which allows for faster execution. They are known for their efficiency and speed.
Applications: Commonly used in a variety of embedded systems, including consumer electronics,
networking equipment, and industrial automation.
Choosing the right embedded processor depends on the specific requirements of the application, balancing
factors such as processing power, power consumption, cost, and form factor. It's common to see
combinations of different processors in a system to address different tasks efficiently.

2. Explain how a suitable processor is selected for an embedded system design with minimum three
case studies. (April 2023).
An embedded processor is a microprocessor that is used in an embedded system. An embedded system
is a computer system that is designed to perform a specific task within a larger system. It is a self -
contained system that is embedded within a larger device or system and is used to control the operation
of the device. Embedded processors are designed to be small, low-power, and efficient, as they are
typically used in devices where space and power are at a premium.
They are also designed to be reliable and to operate for long periods of time without failure. Some
examples of devices that use embedded processors include smartphones, TVs, washing machines, and
aircraft systems.
Types of Embedded Processors
Below are the different types of embedded processors:
1. General Purpose Processors (GPPs)
General purpose processors, also known as central processing units (CPUs), are processors that are designed
to be capable of executing a wide range of tasks. They are used in computers and other devices that require
high-performance processing capabilities. Some features of general-purpose processors include:
a. Instruction set: General purpose processors have a large and complex instruction set, which allows
them to perform a wide range of tasks.
b. Multi-core: Many general-purpose processors are multi-core, which means they have multiple
processors on a single chip. This allows them to perform multiple tasks concurrently, improving
performance.
c. Clock speed: The clock speed of a processor determines how fast it can execute instructions. General-
purpose processors typically have high clock speeds, which allows them to perform tasks quickly.
d. Cache: General-purpose processors have one or more levels of cache, which is a small amount of high-
speed memory that is used to store frequently accessed data. This helps to improve the performance of the
processor.
e. Compatibility: General-purpose processors are typically compatible with a wide range of operating
systems and software applications.
f. Virtualization: Many general-purpose processors support virtualization, which allows them to run
multiple virtual machines on a single physical machine.
g. Power consumption: General-purpose processors can have high power consumption, which can be a
concern in devices where power is limited.
2. Microprocessors
A microprocessor is a processor that is contained on a microchip, or integrated circuit (IC). It is a central
processing unit (CPU) that executes the instructions of a computer program. Some features of
microprocessors include:
a. Instruction set: Microprocessors have a specific instruction set that defines the operations that they
can perform.
b. Clock speed: The clock speed of a microprocessor determines how fast it can execute instructions.
Microprocessors typically have high clock speeds, which allows them to perform tasks quickly.
c. Data bus: The data bus is a communication pathway that is used to transfer data between the
microprocessor and other components in a system.
d. Address bus: The address bus is a communication pathway that is used to transfer the address of a
memory location between the microprocessor and other components in a system.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

e. Cache: Many microprocessors have one or more levels of cache, which is a small amount of high-
speed memory that is used to store frequently accessed data. This helps to improve the performance of the
microprocessor.
f. Power consumption: Microprocessors can have relatively high power consumption, which can be a
concern in devices where power is limited.
g. Size: Microprocessors are designed to be small, as they are typically used in devices where space is at
a premium.
h. Cost: Microprocessors can vary in cost depending on their capabilities and features.

3. Microcontrollers
A microcontroller is a small, low-power computer that is contained in a single integrated circuit (IC). It is
a type of embedded processor that is used in a wide range of devices, including consumer electronics,
industrial control systems, and automotive systems. Some features of microcontrollers include:
a. On-chip peripherals: Many microcontrollers have a variety of on-chip peripherals, such as timers,
serial ports, and analog-to-digital converters, which allow them to interface with external devices.
b. Memory: Microcontrollers have both program memory, which stores the instructions that are executed
by the processor, and data memory, which is used to store variables and other data.
c. Input/output (I/O) pins: Microcontrollers have a set of I/O pins that can be used to interface with
external devices, such as sensors or actuators.
d. Low power consumption: Microcontrollers are designed to be low-power, which makes them suitable
for use in battery-powered devices.
e. Cost: Microcontrollers are typically less expensive than general-purpose processors, as they are
designed for specific tasks and do not have as many capabilities.
f. Size: Microcontrollers are small, which makes them suitable for use in compact devices.
g. Flexibility: Microcontrollers are highly flexible and can be programmed to perform a wide range of
tasks.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

4. Digital Signal Processor (DSP)


Digital signal processors (DSPs) are specialized microprocessors that are designed to process digital
signals. They are used in a wide range of applications, including audio and video processing,
telecommunications, and control systems. Some key features of DSPs include:
a. High-speed processing: DSPs are designed to process large amounts of data quickly, making them
well-suited for real-time applications.
b. Parallel processing: Many DSPs are designed to perform multiple operations simultaneously, which
can increase their processing speed and efficiency.
c. Hardware support for common operations: DSPs often include specialized hardware to support
common operations, such as filtering and FFTs (Fast Fourier Transforms), which can reduce the
processing overhead and improve performance.
d. Low power consumption: DSPs are often designed to be energy-efficient, making them well-suited
for battery-powered applications.
e. Programmability: Most DSPs are programmable, which means that they can be customized to
perform specific tasks. This allows them to be used in a wide range of applications.

5. Single-Purpose Embedded Processor


Single-purpose embedded processors, also known as application-specific embedded processors, are
microprocessors that are designed to perform a specific task or set of tasks. They are used in a wide range
of applications, including automotive systems, industrial control systems, and consumer electronics. Some
key features of single-purpose embedded processors include:
a. Specialized functionality: Single-purpose embedded processors are designed to perform a specific
task or set of tasks, making them well-suited for applications that require highly specialized
functionality.
b. Low power consumption: Single-purpose embedded processors are often designed to be energy-
efficient, making them well-suited for battery-powered applications.
c. Compact size: Single-purpose embedded processors are often designed to be small and lightweight,
making them well-suited for applications where space is limited.
d. High reliability: Single-purpose embedded processors are often designed to be highly reliable, as they
are typically used in mission-critical applications where downtime is not an option.
e. Low cost: Single-purpose embedded processors are often less expensive than general-purpose
processors, as they are designed to perform a specific set of tasks and do not require the same level of
flexibility and programmability.
6. System-on-Chip (SoC)
System-on-Chip (SoC) is an integrated circuit that integrates all components of a computer or other
electronic system onto a single chip. Some key features of SoCs include:
a. Integration: SoCs integrate all or most of the components of a system onto a single chip, which can
reduce the size and complexity of the system.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

b. Low power consumption: SoCs can be designed to be highly power efficient, which can be useful in
battery-powered or energy-sensitive applications.
c. High performance: SoCs can be designed for high performance, making them suitable for applications
that require a lot of processing power.
d. Customization: SoCs can be customized for specific applications, allowing them to be optimized for
the specific requirements of those applications.
e. Reduced component count: Because many components are integrated onto a single chip, SoCs can
reduce the component count of a system, which can make the system simpler and easier to manufacture.

Applications of Embedded Processors


Embedded processors are used in a wide range of applications, including:
a. Consumer electronics: Embedded processors are used in many types of consumer electronics, such
as smartphones, tablets, laptops, and other portable devices.
b. Industrial control systems: Embedded processors are used to control and monitoring industrial
equipment, such as robots, conveyor belts, and other manufacturing systems.
c. Automotive systems: Embedded processors are used in automotive systems, such as engine control,
traction control, and advanced driver assistance systems (ADAS).
d. Medical devices: Embedded processors are used in medical devices, such as monitoring devices,
imaging devices, and drug delivery systems.
e. Military systems: Embedded processors are used in military systems, such as missiles, aircraft, and
other defense systems.
f. Communication systems: Embedded processors are used in communication systems, such as routers,
switches, and other networking equipment.
g. Home automation systems: Embedded processors are used in home automation systems, such as
smart thermostats, security systems, and lighting control systems.
h. Other applications: Embedded processors are used in many other applications, such as point-of-sale
systems, cash registers, vending machines, and many others.
Case Study 1: Industrial Automation System
i. Real-time control for industrial processes.
j. Support for multiple communication protocols.
k. Low power consumption for energy efficiency.
Long-term reliability in harsh environments.
Selected Processor:
Microcontroller: STM32 series (ARM Cortex-M architecture).
Justification:
 The STM32 series provides a range of ARM Cortex-M based microcontrollers suitable for industrial
applications.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

 These microcontrollers offer real-time capabilities, a variety of communication interfaces, and low
power consumption.
 The ARM Cortex-M architecture ensures a balance between performance and power efficiency.
 The STM32 series is known for its robustness and reliability, making it suitable for industrial
environments.
Case Study 2: Medical Monitoring Device
Requirements:
 Real-time processing for monitoring vital signs.
 Low power consumption for battery-operated devices.
 Integration with various sensors and wireless communication.
 Regulatory compliance for medical devices.
Selected Processor:
System-on-Chip (SoC): Texas Instruments MSP430FR5994.
Justification:
 The MSP430FR5994 is an ultra-low-power SoC designed for battery-operated medical devices.
 It integrates a high-performance MSP430 microcontroller with FRAM (Ferroelectric RAM)
technology for energy-efficient operation.
 The SoC includes analog and digital peripherals suitable for sensor interfacing.
 Texas Instruments provides comprehensive support and documentation for medical device
development.
Case Study 3: Automotive Infotainment System
Requirements:
 High-performance multimedia processing for graphics and audio.
 Connectivity features for navigation and communication.
 Robustness to withstand automotive environmental conditions.
 Compatibility with industry standards.
Selected Processor:
System-on-Chip (SoC): NVIDIA Tegra X1.
Justification:
 The NVIDIA Tegra X1 is a powerful SoC designed for multimedia processing and graphics-intensive
applications.
 It features a quad-core ARM Cortex-A57 CPU and a 256-core Maxwell GPU, providing high
performance for multimedia applications.
 The SoC supports multiple connectivity options, including HDMI, USB, and PCIe.
 NVIDIA's expertise in graphics processing makes it suitable for automotive infotainment systems.
In each case study, the selected processor aligns with the specific requirements of the application. The
choice takes into consideration factors such as processing power, power efficiency, peripheral integration,
and environmental robustness. It's important to note that the embedded system design process also involves
thorough testing and validation to ensure that the chosen processor meets the performance and reliability
expectations in real-world scenarios. Additionally, factors like long-term availability, vendor support, and
development tools influence the selection decision.

3. Illustrate how the Real-time systems differ from conventional system? (May 2015) (Dec
2014).
Real-time systems and conventional systems differ primarily in their response time requirements and the
consequences of missing deadlines. Here are key distinctions between the two:
a. Timing Constraints:
Real-time Systems: These systems have strict timing constraints, where tasks must be completed within a
specific time frame. There are hard real-time systems, where missing a deadline can have severe
consequences, and soft real-time systems, where occasional delays are acceptable but may degrade system
performance.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

Conventional Systems: Timing constraints in conventional systems are generally more relaxed. There is
no stringent requirement for tasks to complete within specific time bounds.
b. Predictability:
Real-time Systems: Predictability is crucial in real-time systems. The behavior of the system must be
deterministic, and developers need to guarantee that tasks will complete within their specified time limits.
Conventional Systems: Predictability is not as critical in conventional systems. Variability in execution
times is often acceptable, and the emphasis is on optimizing overall system performance rather than meeting
strict deadlines.
c. Concurrency and Parallelism:
Real-time Systems: Often involve concurrency and parallelism to meet timing constraints. Parallel
execution of tasks and effective scheduling algorithms are essential to ensure that critical tasks are
completed on time.
Conventional Systems: While concurrency and parallelism can be utilized in conventional systems, they
are not always required to the same extent. Performance optimization may focus on throughput rather than
meeting specific deadlines.
d. Failure Consequences:
Real-time Systems: Failures to meet deadlines in real-time systems can have severe consequences,
including system instability, data loss, or even endangering human lives (in the case of certain critical
applications like medical devices or automotive systems).
Conventional Systems: Failures in conventional systems may lead to reduced performance or
inconvenience, but they typically do not have immediate and critical consequences.
e. Resource Utilization:
Real-time Systems: Efficient resource utilization is critical in real- time systems to ensure that tasks can
meet their deadlines. This includes careful management of CPU, memory, and other resources.
Conventional Systems: Resource utilization is important in conventional systems, but the emphasis may
be on maximizing overall system throughput rather than meeting specific, stringent timing constraints.
Examples:
Real-time Systems: Aerospace systems, medical devices, automotive control systems, industrial
automation, and certain gaming applications.
Conventional Systems: Web servers, databases, general-purpose operating systems, and office
productivity software.
In summary, the primary difference lies in the timing constraints and consequences of missing deadlines.
Real-time systems must guarantee timely execution of tasks, while conventional systems prioritize overall
system performance without strict adherence to specific time limits.
4. Illustrate with a neat diagram the components of embedded system hardware and the
functional circuits in the core of microcontroller.
An embedded system has three main components:

1. It has hardware. Figure shows the units in the hardware of an embedded system.
2. It has main application software. The application software may perform concurrently the
Series of tasks or multiple tasks.
3. It has a real time operating system (RTOS) that supervises the application software and provides a
mechanism to let the processor run a process as per scheduling and do the context-switch between the
various processes (tasks). RTOS defines the way the system works. It organizes access to a resource
in sequence of the series of tasks of the system. It schedules their working and execution by following
a plan to control the latencies and to meet the deadlines. [Latency refers to the waiting period between
running the codes of a task and the instance at which the need for the task arises.] It sets the rules
during the execution of the application software. A small-scale embedded system may not need an
RTOS.
An embeddedsystem has software designed to keep in view three constraints:
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

(i) available system memory


(ii) available processor speed and
(iii) The need to limit power dissipation when running thesystem continuously in cycles
of wait for events, run, stop and wake-up.
Hardware Components of Embedded System
Since the system is not general purpose, you do not need to add all hardware to it, but you should have the
minimum quantity required.
1. Power Supply
We are aware that to operate any system, electricity is necessary. There are three ways to supply power to
a system:
 The system will either have its power supply or, if it is a component of a larger system, it will draw
power from that system.
 Donate to a system that the embedded system interfaces with, like a network card.
 In some instances, the charge pump principle is used in an embedded device that uses little power
and accepts ATM cards. As soon as we put the ATM card in, the machine will start to receive electricity,
which is why we termed the charge pump. This charge pump will thus supply the required power.
2. Processor
Any embedded system’s core component is the CPU. It determines how well the system works. There are
three different processor types: 8-bit, 16-bit, and 32-bit CPUs. For embedded systems, smaller applications
require fewer bits. Large applications call for embedded systems with larger bit processors.
The embedded system’s brain is its processor. The following categories of processors are possible:
 General purpose processor
 Digital signal processor
 Media processor
 Application specific processor
 Microprocessor
 Microcontroller
 Embedded processor
 Application-specific instruction processor
We primarily use microprocessors or microcontrollers.
3. Timers Counter/ Timer
Some applications need a delay, such as LED display apps, which need one so that the LED can keep
blinking. In embedded systems, timers are employed for this reason. Mechanisms are often required in
embedded systems to count the occurrence of things and carry out actions at regular intervals. Time
boundaries apply to embedded systems when counting the number of events or the interval between them.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

The method for executing the tasks on a regular schedule is needed by the embedded system. Tasks must
be finished within a certain time frame. The timer is used to create waveforms with specific delays and to
create delays in general. As a result, these are the timers’ primary tasks or actions.
4. Memory
The microcontroller itself contains two different types of memory. RAM and ROM are these. ROM is a
code memory, whereas RAM is a volatile memory. In embedded systems, there are several types of system
memory, including:-
 Internal memory at the microcontroller
 RAM at the system on a chip or external RAM
 Internal caches at the microprocessor
 External RAM chips
 ROM / PROM
 Flash / EEPROM
5. The Communication Port
You can communicate with other embedded systems via this interface. In embedded systems, various
communication interfaces are available, including UART, USB, Ethernet, RS-485, and many more. A serial
port is an interface for serial communication in which data is transferred one bit at a time. The serial
protocols UART, SPI, SCI, and I2C are often used.
Below are various communication ports in embedded systems:-
 UART
 CAN
 RS-232
 RS-423
 RS-485
 SPI
 I2C
 USB
 Ethernet
6. Parallel Port
Peripheral connections are made via a parallel port. The term alludes to the method of data transmission,
where parallel ports send several bits of data simultaneously. In comparison to modern serial ports, parallel
ports have more data lines and require longer cables and port connectors.
7. Output And Input
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

Input is necessary to communicate with the embedded system. An input source for the system could be a
sensor. The system’s microcontroller has an input port and an output port that may be set up. You can use
the fixed number of input and output ports on the microcontroller under your needs.
We require input to engage with embedded devices. The input could come from the user or a sensor.
Occasionally, some systems require more input or output. I/O will be used to determine the processor.
The ports P0, P1, P2, and P3 in 8051 microcontrollers are typical divisions of this input and output. And
the microcontrollers in the ATmega series PA, PB, PC, and PD. The given register must be used to set up
the I/O for input or output. We must consult the manufacturer’s datasheet to do it.

Basic Hardware Components of an Embedded system

Functional circuit of a Microcontroller

5. Conduct an in-depth analysis of an exemplary embedded system, delving into its


components, functions, and real-world applications. How does this specific embedded
system showcase the versatility and capabilities of embedded technology?
Let's delve into an exemplary embedded system: the Engine Control Unit (ECU) in modern automobiles.
The ECU is a prime example of embedded technology, showcasing versatility and capabilities in managing
complex tasks within a specific application domain.
Components of the ECU:
a. Microcontroller/Processor:
The core processing unit responsible for executing control algorithms and managing the overall operation
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

of the ECU.
Often a specialized microcontroller designed for real-time tasks.
b. Sensors:
Collect data from various points in the vehicle, such as the engine speed, throttle position, oxygen levels in
exhaust gases, temperature, and more.
Examples include the crankshaft position sensor, throttle position sensor, oxygen sensors, and temperature
sensors.
c. Actuators:
Responsible for executing control commands generated by the ECU.
Examples include fuel injectors, spark plugs, and components of the exhaust gas recirculation system.
d. Memory:
Stores the control algorithms, calibration maps, and historical data.
Typically includes both non-volatile memory (for storing data permanently) and volatile memory (for
temporary data storage during operation).
e. Communication Interfaces:
Allows communication with other ECUs in the vehicle (e.g., transmission control unit, anti-lock braking
system).
Standard communication protocols like Controller Area Network (CAN) are often used.
f. Power Supply:
Provides power to the ECU and its components.
Functions of the ECU:
a. Engine Control:
Adjusts fuel injection timing and duration based on sensor inputs to optimize combustion efficiency.
Controls ignition timing for optimal power and fuel efficiency.
b. Emission Control:
Monitors and adjusts the air-fuel mixture to ensure compliance with emission standards.
Manages exhaust gas recirculation to reduce nitrogen oxide emissions.
c. Transmission Control (in some ECUs):
Coordinates with the transmission control unit to optimize gear shifts based on driving conditions.
d. Diagnostic Functions:
Monitors sensor and actuator performance in real-time.
Stores fault codes and communicates with external diagnostic tools for troubleshooting.
e. Adaptive Learning:
Some ECUs have adaptive learning capabilities, adjusting parameters over time based on driving conditions
and fuel quality.
Versatility and Capabilities of Embedded Technology:
a. Real-time Operation:
The ECU operates in real-time, making split-second decisions based on sensor inputs to optimize engine
performance.
b. Customization and Adaptability:
Embedded systems allow for the customization of control algorithms to adapt to different engine types and
driving conditions.
c. Efficiency and Reliability:
Embedded systems are designed for efficiency and reliability, critical in applications where safety and
performance are paramount.
d. Integration with Other Systems:
The ECU seamlessly integrates with other embedded systems in the vehicle, forming a network that
collectively ensures optimal performance and safety.
e. Diagnostic Capabilities:
The ECU's diagnostic functions showcase the ability of embedded systems to monitor and report on the
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

health of the entire vehicle system.


In conclusion, the Engine Control Unit in modern automobiles exemplifies the versatility and capabilities
of embedded technology by seamlessly integrating various components, efficiently managing real-time
tasks, and playing a crucial role in optimizing the performance, fuel efficiency, and emissions of vehicles
in diverse real-world applications.

6. Illustrate the concepts of DMA and structural units of an embedded Processor.


(May 2018) (April 2019) (Nov 2019).
For the execution of a computer program, it requires the synchronous working of more than one component
of a computer. For example, Processors – providing necessary control information, addresses…etc, buses
– to transfer information and data to and from memory to I/O devices…etc. The interesting factor of the
system would be the way it handles the transfer of information among processor, memory and I/O devices.
Usually, processors control all the process of transferring data, right from initiating the transfer to the
storage of data at the destination. This adds load on the processor and most of the time it stays in the ideal
state, thus decreasing the efficiency of the system. To speed up the transfer of data between I/O devices and
memory, DMA controller acts as station master. DMA controller transfers data with minimal intervention
of the processor.
DMA controller provides an interface between the bus and the input-output devices. Although it transfers
data without intervention of processor, it is controlled by the processor. The processor initiates the DMA
controller by sending the starting address, Number of words in the data block and direction of transfer of
data .i.e. from I/O devices to the memory or from main memory to I/O devices. More than one external
device can be connected to the DMA controller. DMA controller contains an address unit, for generating
addresses and selecting I/O device for transfer. It also contains the control unit and data count for keeping
counts of the number of blocks transferred and indicating the direction of transfer of data. When the transfer
is completed, DMA informs the processor by raising an interrupt.

Block diagram of DMA controller


DMA controller has to share the bus with the processor to make the data transfer. The device that holds the
bus at a given time is called bus master. When a transfer from I/O device to the memory or vice versa has
to be made, the processor stops the execution of the current program, increments the program counter,
moves data over stack then sends a DMA select signal to DMA controller over the address bus.
If the DMA controller is free, it requests the control of bus from the processor by raising the bus request
signal. Processor grants the bus to the controller by raising the bus grant signal, now DMA controller is the
bus master. The processor initiates the DMA controller by sending the memory addresses, number of blocks
of data to be transferred and direction of data transfer. After assigning the data transfer task to the DMA
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

controller, instead of waiting ideally till completion of data transfer, the processor resumes the execution
of the program after retrieving instructions from the stack.

DMA WORKING
DMA controller now has the full control of buses and can interact directly with memory and I/O devices
independent of CPU. It makes the data transfer according to the control instructions received by the
processor. After completion of data transfer, it disables the bus request signal and CPU disables the bus
grant signal thereby moving control of buses to the CPU.
When an I/O device wants to initiate the transfer then it sends a DMA request signal to the DMA controller,
for which the controller acknowledges if it is free. Then the controller requests the processor for the bus,
raising the bus request signal. After receiving the bus grant signal it transfers the data from the device. For
n channelled DMA controller n number of external devices can be connected.
The DMA transfers the data in three modes which include the following.
a) Burst Mode: In this mode DMA handover the buses to CPU only after completion of whole data transfer.
Meanwhile, if the CPU requires the bus it has to stay ideal and wait for data transfer.
b) Cycle Stealing Mode: In this mode, DMA gives control of buses to CPU after transfer of every byte. It
continuously issues a request for bus control, makes the transfer of one byte and returns the bus. By this
CPU doesn’t have to wait for a long time if it needs a bus for higher priority task.
c) Transparent Mode: Here, DMA transfers data only when CPU is executing the instruction which does
not require the use of buses.
Internal Buses
It internally connects all the structural units inside the processor. Its width can be of 8, 16, 32 or 64 bits.
The internal buses include address bus, data bus and control bus. All the internal units of the processor are
communicated with the external buses through an interface unit called Bus Interface Unit(BIU).
 Address bus is an external bus that carries the address from the Memory Address Register(MAR)
to the memory as well as to the IO devices and other units of the system.
 Data bus is an external bus that carries the data from or to the address determined by Memory
Address Register(MAR).
 Control Bus is an external bus that carries, control signals to or between the processor and memory.
Instruction Units
The processor executes several operations with the help of a piece of code or program called instructions.
All these instruction are arranged in a queue called Instruction Queue(IQ). This helps the Instruction
Register to execute the instructions without the need to wait.
Instruction Register(IR) takes the instruction codes(opcodes) sequentially to the execution unit of the
processor. Instruction decoder(ID) decodes the instruction opcode received at the Instruction Register and
passes it to the processor Control unit for its execution.
Caches
In general, cache is the temporary storage place in the processor, where the data can easily be retrieved by
the CPU for quick operation. Cache is available in your computers, laptop, mobile phone, browser, app,
etc. The embedded processor has three cache memory for fast operation.
Similar to an instruction queue, Instruction Cache(I-Cache) sequentially stores the instructions in FIFO
mode. It lets the processor to execute the instructions at a greater speed.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

Branch Target Cache(BT Cache) facilitates the ready availability of the next instruction set, when a branch
instruction like jump, call or loop is encountered. Its fetch unit foresees a branching instruction in the I –
cache.
Data Cache(D – Cache) stores the pre – fetched data from the external memory. A data cache holds both
the address and data together at a location. It also stores the write-through data that is to be transferred to
the external memory addresses. Write-through data is nothing but the output data from the execution unit.
Control unit(CU):
The control unit(CU) is one of the important structural units in an any embedded processor. It is responsible
for all the control of the bus activities and unit functions needed for processing. It directs all the units of a
processor to respond to the instruction that is executed.
Pre fetch control Unit(PFCU) controls the fetching of data into the I-Cache and D-Cache in advance from
the memory unit. The instructions and data are delivered when needed to the processor’s execution units.
Memory Management Unit(MMU) manages the memories such that the instructions and data are readily
available for processing. There are several memory management methods for managing the memory in an
embedded processor such as fixed block allocation, dynamic block allocation, dynamic page allocation,
etc.
Processing unit:
Processing units receives the input data, process it and produces the output. Depending on the function of
the embedded system, the processing is done through different units like ALU, FLPU, AOU and advanced
units.
Arithmetic Logic Unit(ALU) is used for the execution the arithmetic and logic instructions according to the
instruction present at the Instruction Register.
Floating point processing unit(FLPU) is different from ALU, used primarily for floating point processing.
It is essential for fast processing mathematical functions in a microprocessor or Digital Signal Processor.
Atomic operation unit(AOU) lets a user (compiler) instruction when broken into number of processor
instructions called atomic operations, finish before an interrupt of the processor occurs.
The embedded processor also has Advanced processing units for multistage pipeline processing, multi-line
superscalar processing to obtain processing speeds higher than one instruction per cycle.
Register Sets
Application Register Set(ARS) is a set of on-chip registers used during processing of instructions of the
application program of the user. A register window consists of a subset of registers with each subset storing
static variables of software – routine.
System Register Set(SRS) is a set of registers used while processing the instructions of the supervisory
system program.
Floating point register set(FRS) is dedicated for storing floating point numbers in the standard format and
used by Floating point Processing Units for its data.
Memory Registers
Registers are smallest part of the CPU, where the data and address can be stored and accessed quickly.
There are various registers like accumulator, general purpose registers, flag registers, memory address
register, memory data register, program counter, stack pointer, etc.
Memory Address Register(MAR) holds the address of the data byte or word that is to be fetched from
external memories. Memory Data Register(MDR) holds the data byte or word that is fetched from external
memory or stored to the external memory.
Program Counter and Stack Pointer
Program counter is a register that stores the address of the next instruction to be executed from the memory.
It generates the instruction cycle to fetch the address from memory through MAR.
Stack pointer is a register that stores the address of the last program request in a stack. It is a pointer for an
address which corresponds to a stack top in the memory.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

7. Provide a comparative analysis of different memory types, highlighting their distinct features
and characteristics. (May 2015) (Dec 2017).
Memory types vary in terms of speed, volatility, capacity, and use cases. Here's a comparative analysis of
different memory types, including RAM, ROM, Flash memory, and secondary storage (hard disk drives
and solid-state drives):
 Primary memory
 Secondary memory
 Cache memory
Now we discuss each type of memory one by one in detail:
1. Primary Memory
It is also known as the main memory of the computer system. It is used to store data and programs or
instructions during computer operations. It uses semiconductor technology and hence is commonly called
semiconductor memory. Primary memory is of two types:
a. RAM (Random Access Memory): It is a volatile memory. Volatile memory stores information
based on the power supply. If the power supply fails/ interrupted/stopped, all the data and
information on this memory will be lost. RAM is used for booting up or start the computer. It
temporarily stores programs/data which has to be executed by the processor. RAM is of two types:
1. S RAM (Static RAM): S RAM uses transistors and the circuits of this memory are capable of
retaining their state as long as the power is applied. This memory consists of the number of flip
flops with each flip flop storing 1 bit. It has less access time and hence, it is faster.
2. D RAM (Dynamic RAM): D RAM uses capacitors and transistors and stores the data as a charge
on the capacitors. They contain thousands of memory cells. It needs refreshing of charge on
capacitor after a few milliseconds. This memory is slower than S RAM.
b. ROM (Read Only Memory): It is a non-volatile memory. Non-volatile memory stores
information even when there is a power supply failed/ interrupted/stopped. ROM is used to store
information that is used to operate the system. As its name refers to read-only memory, we can
only read the programs and data that is stored on it. It contains some electronic fuses that can be
programmed for a piece of specific information. The information stored in the ROM in binary
format. It is also known as permanent memory. ROM is of four types:
1. MROM(Masked ROM): Hard-wired devices with a pre-programmed collection of data or
instructions were the first ROMs. Masked ROMs are a type of low-cost ROM that works in this
way.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

2. PROM (Programmable Read Only Memory): This read-only memory is modifiable once by
the user. The user purchases a blank PROM and uses a PROM program to put the required contents
into the PROM. Its content can’t be erased once written.
3. EPROM (Erasable Programmable Read Only Memory): EPROM is an extension to PROM
where you can erase the content of ROM by exposing it to Ultraviolet rays for nearly 40 minutes.
4. EEPROM (Electrically Erasable Programmable Read Only Memory): Here the written
contents can be erased electrically. You can delete and reprogramme EEPROM up to 10,000
times. Erasing and programming take very little time, i.e., nearly 4 -10 ms(milliseconds). Any
area in an EEPROM can be wiped and programmed selectively.
2. Secondary Memory
It is also known as auxiliary memory and backup memory. It is a non-volatile memory and used to store
a large amount of data or information. The data or information stored in secondary memory is permanent,
and it is slower than primary memory. A CPU cannot access secondary memory directly. The
data/information from the auxiliary memory is first transferred to the main memory, and then the CPU
can access it.
Characteristics of Secondary Memory
 It is a slow memory but reusable.
 It is a reliable and non-volatile memory.
 It is cheaper than primary memory.
 The storage capacity of secondary memory is large.
 A computer system can run without secondary memory.
 In secondary memory, data is stored permanently even when the power is off.
3. Cache Memory
It is a type of high-speed semiconductor memory that can help the CPU run faster. Between the CPU and
the main memory, it serves as a buffer. It is used to store the data and programs that the CPU uses the
most frequently.
Advantages of Cache Memory
 It is faster than the main memory.
 When compared to the main memory, it takes less time to access it.
 It keeps the programs that can be run in a short amount of time.
 It stores data in temporary use.
Disadvantages of Cache Memory
 Because of the semiconductors used, it is very expensive.
 The size of the cache (amount of data it can store) is usually small.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

8. Discuss about the structural units in embedded processor and how a processor is selected for
an embedded application. (May 2016) (Dec 2016) (April 2023).
Note:
For structural Unit of embedded processor refer Q.No 6. For selection of processor for embedded
application refer Q.No 2.
9. Using a clear and illustrative diagram, demonstrate how Direct Memory Access
(DMA) functions, and elucidate the memory management techniques involved. How
can DMA be applied effectively to enhance data transfer in computer systems? (May
2016) (May 2015) (Dec 2014) (Dec 2016) (April 2019) (Nov 2020) (April 2021).

Memory management in embedded systems is crucial for efficient utilization of resources in


devices with limited memory. Embedded systems often have specific constraints, such as fixed-
size memory, real-time requirements, and power considerations. Here are some common memory
management methods used in embedded systems:
Static Memory Allocation:
Description: Memory is allocated at compile-time.
Advantages:
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

i. Deterministic and predictable.


ii. Low overhead.
iii. Disadvantages:
iv. Limited flexibility.
v. Inefficient use of memory if requirements change.
Fixed-Size Block Allocation:
b. Description: Memory is divided into fixed-size blocks, and each block can be allocated or
deallocated independently.
c. Advantages:
i. Allows for dynamic allocation.
ii. Reduces fragmentation compared to static allocation.
d. Disadvantages:
i. May lead to fragmentation if block sizes are not chosen carefully.
Memory Pools:
e. Description: Pre-allocated blocks of memory of varying sizes are grouped into pools, and
processes can request memory from these pools.
f. Advantages:
i. Efficient use of memory.
ii. Reduces fragmentation.
g. Disadvantages:
i. Fixed pool sizes may lead to inefficient use of memory for certain applications.
Heap Management:
h. Description: Dynamic memory allocation from a heap during runtime.
i. Advantages:
i. Flexibility in memory allocation.
ii. Can handle varying memory requirements.
j. Disadvantages:
i. May lead to fragmentation.
ii. Less deterministic than static or fixed-size block allocation.
Memory Banking:
a. Description: Memory is divided into banks, and each bank can be independently accessed.
It is commonly used in systems with different types of memory (e.g., RAM and Flash).
b. Advantages:
iii. Allows for concurrent access to different memory banks.
iv. Reduces contention for shared memory resources.
c. Disadvantages:
v. Requires careful management to avoid conflicts.
Memory Overlays:
k. Description: Code or data is stored in different memory areas, and only the necessary
portion is loaded into the active memory region when needed.
l. Advantages:
i. Efficient use of limited memory.
ii. Suitable for systems with memory constraints.
m. Disadvantages:
i. Adds complexity to program structure.
ii. Requires careful planning to avoid data loss.
Memory-mapped I/O:
n. Description: Uses a single address space for both memory and I/O devices.
o. Advantages:
i. Simplifies programming and access to peripheral devices.
ii. Efficient use of memory.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

p. Disadvantages:
i. Limited address space may be a constraint.
ii. Careful handling is required to prevent conflicts between memory and I/O.
Bank Switching:
q. Description: Different sections of memory are mapped to the same address, and banks are
switched to access different portions of memory.
r. Advantages:
i. Allows for more extensive memory addressing without increasing the address bus
width.
ii. Efficient use of limited address space.
s. Disadvantages:
i. Adds complexity to memory access.
ii. Careful management is needed to avoid conflicts during bank switching.

These memory management methods in embedded systems are chosen based on the specific requirements
and constraints of the application. The selection is influenced by factors such as real-time constraints, power
consumption, and the need for efficient resource utilization in the context of the embedded system's design.
Direct Memory Access uses hardware for accessing the memory, that hardware is called a DMA
Controller. It has the work of transferring the data between Input Output devices and main
memory with very less interaction with the processor. The direct Memory Access Controller is a
control unit, which has the work of transferring data.
DMA Controller is a type of control unit that works as an interface for the data bus and the I/O
Devices. As mentioned, DMA Controller has the work of transferring the data without the
intervention of the processors, processors can control the data transfer. DMA Controller also
contains an address unit, which generates the address and selects an I/O device for the transfer of
data. Here we are showing the block diagram of the DMA Controller.

Types of Direct Memory Access (DMA)


There are four popular types of DMA.
 Single-Ended DMA
 Dual-Ended DMA
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

 Arbitrated-Ended DMA
 Interleaved DMA
Single-Ended DMA: Single-Ended DMA Controllers operate by reading and writing from a
single memory address. They are the simplest DMA.
Dual-Ended DMA: Dual-Ended DMA controllers can read and write from two memory
addresses. Dual-ended DMA is more advanced than single-ended DMA.
Arbitrated-Ended DMA: Arbitrated-Ended DMA works by reading and writing to several
memory addresses. It is more advanced than Dual-Ended DMA.
Interleaved DMA: Interleaved DMA are those DMA that read from one memory address and
write from another memory address.
Working of DMA Controller
The DMA controller registers have three registers as follows.
 Address register – It contains the address to specify the desired location in memory.
 Word count register – It contains the number of words to be transferred.
 Control register – It specifies the transfer mode.
Note: All registers in the DMA appear to the CPU as I/O interface registers. Therefore, the CPU
can both read and write into the DMA registers under program control via the data bus.
The figure below shows the block diagram of the DMA controller. The unit communicates with
the CPU through the data bus and control lines. Through the use of the address bus and allowing
the DMA and RS register to select inputs, the register within the DMA is chosen by the CPU. RD
and WR are two-way inputs. When BG (bus grant) input is 0, the CPU can communicate with
DMA registers. When BG (bus grant) input is 1, the CPU has relinquished the buses and DMA
can communicate directly with the memory.
Explanation: The CPU initializes the DMA by sending the given information through the data bus.
 The starting address of the memory block where the data is available (to read) or where data
are to be stored (to write).
 It also sends word count which is the number of words in the memory block to be read or
written.
 Control to define the mode of transfer such as read or write.
 A control to begin the DMA transfer.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

Working diagram of DMA controller

10. Analyze the roles and significance of in-circuit emulators, watchdog timers, and
target debugging in embedded systems.
IN CIRCUIT EMULATOR

Embedded systems tend to lack a display, keyboard, and mouse with which to manipulate the microcontroller that
you’re trying to program. So a host computer is used for this function, and typically communicates over a serial cable
or more recently, Wi-Fi.
Once you create, edit, and compile code for your embedded system on a host computer, you will have executable
(object) code that needs to be uploaded to the microcontroller in your embedded system. There, you can see the code
in action, test it, and debug the code by making changes to the code on the host, recompiling, and running it again on
the target MCU. But what if you want to alter the contents of a register, memory, or the state of your I/O to see what
happens? An In-circuit emulator (ICE) is a debugging tool that allows you to access a target MCU for in-depth
debugging. A genuine ICE requires you to remove the microcontroller and to insert the ICE in its place, most
commonly using an adapter. In-circuit emulation is rather rare in these days of high-performance, relatively low-cost
processors because ICE needs to be invisible to the system, which is difficult to do with extremely fast, memory-
intensive chips. Nevertheless, not every system requires a high-performance MCU, and it’s still possible to use ICE.
ICE is the best tool for finding difficult bugs and can provide invaluable insight.

ICE consists of a hardware board with accompanying software for the host computer. The ICE is physically connected
between the host computer and the target MCU. The debugger on the host establishes a connection to the MCU via
the ICE. ICE allows a developer to see data and signals that are internal to the MCU, and to step through the source
code (e.g., C/C++ on the host) or set breakpoints; the immediate ramifications of executed software are observed
during run time. Since the debugging is done via hardware, not software, the MCU’s performance is left intact for
the most part, and ICE does not compromise MCU resources. This type of debugging is also referred to as source-
level or run-time debugging, except ICE is as close to the real scenario as possible, as it’s not a simulation but a
substitution of the target MCU with an emulation, or accurate mirror, of the target MCU in the ICE itself. The
behavior of the MCU will be more accurately reflected in ICE, and in real-time.
The disadvantage of ICE debugging is that the ICE hardware must be physically connected to the MCU. As chips
get smaller, adapters can help in connecting tiny surface mounted chips to the ICE. Another disadvantage is that ICE
devices come with a learning curve, especially if there will be complex debugging functions, for example, flagging
when a register holds a specific value after a conditional branch is taken, etc. And last, disadvantage is that as high-
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

performance chips have come down in price, the accessibility for debugging with ICE has faded to the point where
ICE hardware has become rare for anyone who is not still using an 8051-era MCU. In-circuit emulators require fast
connectivity and loads of memory, so lower level MCUs (8-, -16-bit and MHz, not GHz) are more likely to have an
ICE option available. Furthermore, highly integrated chips may create fewer bugs versus off-chip, board-mounted
EEPROMS and interfaces.
WATCH DOG TIMER
Watch dog timer is a device that can be set for a present interval, and an event error must occur during that interval
else the device will generate the time out signal .For example, we anticipate that a set of tasks must finish within
100ms.The watch dog timer disables and stops in case the tasks finish within 100ms. The watch dog timer generates
the interrupts after 100ms and executes a routine that runs because the tasks failed to finish in the anticipated interval.
A software task can also be programmed as a watchdog timer.

The watchdog timer has a number of applications. One application in a mobile phone is that the display is turned off
in case no GUI interaction takes place with specified time. The interval is usually set at 15, 20 , 25 , or 30 s in a
mobile phone. This saves power.
Another application in a mobile phone is that if a given menu is not selected by a click within a pre-set time interval,
another menu can be presented or a beep can be generated to invite user’s attention.
An application in a temperature controller is that if a controller takes no action to switch off the current within the
pre-set time, the current is switched off and a warning signal raised, indicating controller failure. Failure to switch
off current may cause a boiler in which water is heated to burst.

• Example: checking the stack depth, number of buffers allocated and the state of mechanical components in the
system before resetting the watchdog timer.
• A flag should be set at various points in the code indicating the successful completion of that block of code.
• Before the timer is reset, all flags are checked, if all the flags have been set, the timer can be retriggered for another
interval.
• If not, the failure mode is recorded and the timer is allowed to time out.
TARGET HARDWARE DEBUGGING:
Even though the firmware is bug free and everything is intact in the board, your embedded product need not function
as per the expected behaviour in the first attempt for various hardware related reasons like dry soldering of
components, missing connections in the PCB due to any un-noticed errors in the PCB layout design, misplaced
components, signal corruption due to noise, etc. The only way to sort out these issues and figure out the real problem
creator is debugging the target board. Hardware debugging is not similar to firmware debugging. Hardware
debugging involves the monitoring of various signals of the target board (address/data lines, port pins, etc.), checking
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

the inter connection among various components, circuit continuity checking, tec. The various hardware debugging
tools used in Embedded Product Development are explained below.
MAGNIFYING GLASS (Lens):
You might have noticed watch repairer wearing a small magnifying glass while engaged in repairing a watch. They
use the magnifying glass to view the minute components inside the watch in an enlarged manner so that they can
easily work with them. Similar to a watch repairer, magnifying glasses are the primary hardware debugging tool for
an embedded hardware debugging professional. A magnifying glass is a powerful visual inspection tool. With a
magnifying glass(lens), the surface of the target board can be examined thoroughly for dry soldering of components,
missing components, improper placement of components, improper soldering, track(PCB connection)damage, short
of tracks, etc. Nowadays high quality magnifying stations are available for visual inspection. The magnifying station
incorporates magnifying glasses attached to a stand with CFL tubes for providing proper illumination for inspection
tool for the entire hardware board whereas the other small lens within the station is used for magnifying a relatively
small area of the board which requires thorough inspection.
MULTIMETER:
I believe the name of the instrument itself is sufficient to give an outline of its usage. A multimeter is used for
measuring various electrical quantities like voltage(both AC and DC), current(DC as well as AC), resistance,
capacitance, continuity checking, transistor checking, cathode and anode identification of diode, etc. Any multimeter
will work over a specific range for each measurement. A multimeter is the most valuable tool in the toolkit of an
embedded hardware developer. It is the primary debugging tool for physical contact based hardware debugging and
almost all the developers start debugging the hardware with it. In embedded hardware debugging it is mainly used
for checking the circuit continuity between different points on the board, measuring the supply voltage, checking the
signal value, polarity, etc. Both analog and digital versions of a multimeter are available. The digital version is
preferred over the analog one for various reasons like readability, accuracy, etc. Fluke, Rishab, Philips, etc. are the
manufacturers of commonly available high quality digital multimeters.
DIGITAL CRO:
Cathode Ray Oscilloscope (CRO) is a little more sophisticated tool compared to a multimeter. You might have
studied the operation and use of a CRO in your basic electronics lab. CRO is used for waveform capturing and
analysis, measurement of signal strength, etc. By connecting the point under observation on the target board to the
channels of the oscilloscope, the waveforms can be captured and analysed for expected behaviour. CRO is a very
good tool in analysing interference noise in the power supply line and other signal lines. Monitoring the crystal
oscillator signal from the target board is a typical example of the usage of the CRO for the waveform capturing and
analysis in target board debugging. CROs are available in both analog and digital versions. Though digital CROs are
costly, featurewise they are best suited for target board debugging applications. Digital CROs are available for high
frequency support and they also incorporate modern techniques for recording waveform over a period of time,
capturing waves on the basis of a configurable event(trigger) from the target board(e.g. High to low transition of a
port pin of the target processor). Most of the modern digital CROs contain more than one channel and is easy to
capture and analyse various signals from the target board using multiple channels simultaneously. Various
measurements like phase, amplitude, etc. is also possible with CROs. Tektronix, Agilent, Philips, tec. Are the
manufacturers of high precision good quality digital CROs.
LOGIC ANALYSER:
A logic analyser is the big brother of digital CRO. Logic analyser is used for capturing digital data(logic 1 or 0) from
a digital circuitry whereas CRO is employed in capturing all kinds of waves including logic signals. Another major
limitation of CRO is that the total number of logic signals/waveforms that can be captured with a CRO is limited by
the number of channels. A logic analyser contains special connectors and clips which can be attached to the target
board for capturing digital data. In target board debugging applications, a logic analyser captures the states of various
port pins, address bus and data bus of the target processor/controller, etc. Logic analysers give an exact reflection of
what happens when a particular line of firmware is running. This is achieved by capturing the address line logic and
data line logic of the target hardware. Most modern logic analysers contain provisions for storing captured data,
selecting a desired region of the captured waveform, zooming selected region of the captured waveform, etc.
Tektronix, Agilent, etc. in the logic analyser market.
FUNCTION GENERATOR:
Function generator is not debugging tool. It is an input signal simulator tool. A function generator is capable of
producing various periodic waveforms like sine wave, square wave, saw-tooth wave, etc. with different frequencies
and amplitude. Sometimes the target board may require some kind of periodic waveform with a particular frequency
as input to some part of the board. Thus, in debugging environment, the function generator serves the purpose of
generating and supplying required signals.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

11. Explain the function of timing and counting devices in embedded systems. (Nov 2022)
TIMER:
 Timer is a device, which counts the input at regular interval (δT) using clock pulses at
its input.
 The counts increment on each pulse and store in a register, called count register
 Output bits (in a count register or at the output pins) for the present counts.
COUNTER:
 A device, which counts the input due to the events at irregular or regular intervals.
 The counts gives the number of input events or pulses since it was last read.
 Has a register to enable read of present counts
 Functions as timer when counting regular interval clock pulses.
Uses of a Timer:
 Real Time Clock Ticks (System Heart Beats).
 Initiating an event after a preset delay time.
 Initiating an event (or a pair of events or a chain of events) after a comparison(s) with
between the pre-set time(s) with counted value(s).
 Capturing the count value at the timer on an event.
 Finding the time interval between two events.
 Wait for a message from a queue or mailbox or semaphore for a preset time when using
RTOS.
 Watchdog timer. It resets the system after a defined time.
 Baud or Bit Rate Control for serial communication on a line or network.Timer timeout
interrupts define the time of each baud.
 Scheduling, Time Slicing of various tasks.
 Time division multiplexing (TDM)
Timer cum Counting Device:
It is a counting device that has two functions:
• It counts the input due to the event at irregular instances and
• It counts the clock input pulses at regular intervals.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

 Atleast one hardware timer is a must in a system which is used as a system clock.
 The number of system clock ticks needed before a system interrupts occurs equal
numticks.
 The hardware timer gets the input from a clock out signal from the processor and
activates the system clock ticks as per the numticks preset at the hardware timer.
 On each system clock tick, the user mode task interrupts and the system takes control.
 The system enables the privileged mode actions and the CPU context switches as per the
preset state of the system.
 The system control actions are performed by OS.
 Control bits are as per the hardware signals and corresponding bits at the control register.
Control bits (or signals) can be of nine types.
1. Timer Enable (to activate a timer).
2. Timer Start (to start counting at each clock input).
3. Timer Stop (to stop counting) from next clock input).
4. Pre-scaling bits (to divide the clock-out frequency signal from the processor).
5. Up count Enable (to enable up counting by incrementing the count value on each
clock input)
6. Down Count Enable (to decrement on a clock input).
7. Load Enable (to enable loading of a value at a register into the timer).
8. Timer Interrupt Enable (to enable interrupt servicing when the timer outs
(overflows) and reaches count value = 0)
9. Timer Interrupt Enable [to enable interrupt servicing when the timer overflows
(reaches count =0)].
Ten forms of Timer:
1. Hardware internal-Timer
2. Software timer (SWT)
3. User software-controlled hardware timer
4. RTOS controlled hardware timer. An RTOS can define the clock ticks per second of a
hardware timer at a system.
5. Timer with periodic time-out events (auto-reloading after overflow state).A timer may be
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

programmable for auto-reload after each time-out.


6. One shot timer (No reload after the overflow and finished state). It triggers on event-input
for activating it to running state from its idle state. It is also used for enforcing time delays
between two states or events.
7. Up count action Timer. It is a timer that increments on each count-input from a clock.
8. Down count action Timer. It is a timer which decrements on each count-input.
9. Timer with its overflow-flag, which auto resets as soon as interrupt service routine starts
running.
10. Timer with overflow-flag, which does not auto reset.
Software Timer:
 Innovative concept – VIRTUAL Timing device.
 A software, which executes and increases or decreases a count-variable (count value) on
an interrupt from system timer output or real time clock interrupt.
 The software timer also generate interrupt on overflow of count-value or on finishing value
of the count variable.

• SWT is a timer based on the system clock interrupts


• The interrupt functions as a clock input to an SWT.
• This input is common to all the SWTs that are in the list of activated SWTs.
• Any number of SWTs can be made active in a list.
• Each SWT will set a status flag on its timeout (count-value reaching 0).

12. i) How would you apply the process of selecting appropriate processor and memory
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

devices for the design of an embedded system?


The selection of a processor is not an easy task for an embedded system. It is not possible to simply select
a processor from your favorite list. Several factors are to be considered while selecting a processor for an
embedded system. Because embedded systems are designed to operate in different climatic conditions,
critical environments, etc.
Depending on the type of applications, the necessary performance, power constraints, special processing,
modern technology, etc, the processor is selected. There are different types of embedded
processors available in the market.
The selection of embedded processor should enhance the user experience by reducing the chance of poor
speed, system overheating, insufficient memory, etc.
Speed and Performance
The most important factor to consider when choosing a processor for an embedded system is its
performance. A processor’s speed is primarily determined by its architecture and silicon design.
The number of instructions executed per second and the number of operations per clock cycle must be
evaluated for assessing the performance. At the same time, the efficiency of the computation units is also
important while talking about the performance.
The advancement of fabrication techniques enabled the packing of more transistors in the same area,
reduces the propagation delay. Furthermore, the presence of a cache reduces the time required to fetch
instructions/data.
Processor architectures that support additional instruction can aid in improving performance for specific
applications. Pipelining and super-scalar architectures boost processor performance even further.
Other techniques for increasing execution rate include branch prediction, speculative execution, and so on.
Multi-core processors are the new trend in performance enhancement. So the size of the cache, processor
architecture, instruction set, etc has to be taken into account when comparing the performance.

Optimal Power usage


Increasing the logic density and clock speed have an adverse impact on the power requirement of the
processor. Faster charging and discharging cycles in the capacitor, leakage currents may lead to more power
consumption. More logic leads to higher power density thereby making the heat dissipation difficult. With
more emphasis on greener technologies and since many systems are becoming battery operated, it is
important to design the system for optimal power usage. Preemptions and context switching between
different processes will also cause more power consumption. Techniques like frequency scaling and voltage
scaling can help in achieving lower power usage. Silicon-on-Chip (SoC) comes with advanced power gating
techniques that can shut down clocks and power to unused modules.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

Peripheral support
Apart from the processor, the embedded system has many other peripherals to perform input and output
operations. It is important to have the right peripherals to assist the processor in optimized performance.
In recent days, almost all the processors used are SoCs. So it is better if the necessary peripherals are
available in the chip itself and are called on-chip peripherals. It offers various benefits such as optimal
power consumption and effective data communication compared to external peripherals
The Peripheral set located outside the SoC but on the same PCB is called off-chip peripherals or external
peripherals. Timers, A/D and D/A converters, PWM controllers, serial communication controllers are some
of the external peripherals used for processors.
Advanced Processing
Along with the core processor, the presence of various co-processors and specialized processing units can
add more value to the processing performance. The instructions fetched by the core processor are executed
by the co-processors in parallel, thereby reducing the processing load.
Some of the popular co-processors include Floating Point Co-processor, Graphics Processing Unit(GPU),
Digital Signal Processors(DSP), etc. Floating Point co-processor can be very helpful in applications
involving complex mathematical operations including multimedia, imaging, codecs, etc.
GPU is responsible for rendering the images on a digital display. It is a parallel processing technology,
which processes images faster than the normal unit. It is sometimes called a Visual processing unit.
GPUs are used to accelerate the 3D graphics in gaming applications, video and content creations, Artificial
Intelligence and machine learning applications, etc. For example, Intel Iris Xe MAX is a GPU along with
11th Gen Intel Core processors, it provides advanced graphics performance and immersive gameplay.
DSP processors are designed specifically for signal processing applications. Its architecture supports the
processing of multiple signals at a faster rate. It can manipulate real-time signals and is used in different
applications like telecommunications, image processing, signal processing, navigation systems, etc.
Cost:
For all the required functionalities to be built up in a system, certainly the price will be the determining
factor during the selection of processor for an embedded system.
Consider you are planning to buy a laptop. Among the different specifications, definitely you will look into
the processing speed of the laptop. If you need better performance, then you should be ready to invest more
money for the system. Additional peripheral sets along with the core processors will make the cost to rise.
Hence, SoC (System-on-Chip) devices are a very effective means to cost-effectively implement a design.
Selection of Memory
The selection of suitable memory is a very essential step in designing an embedded system. The designers
have to choose the best memory for their system. The selected memory device should reflect the goal of
your embedded application.
The performance of the entire embedded system depends on the selection of memory. Improper selection
of memory may lead to insufficient memory, slow speed operation, more power consumption, etc. Hence
such challenges must be considered while designing an embedded system.
Here we have discussed, some of the factors that should be considered while selecting the memory for an
embedded system.
List of Factors
 Speed: The time to read or write the data should be greatest consideration while selecting the
memory. In general, speed will not be a greater issue for small embedded applications. But when you go
for medium or high range applications, read/write access time time should be faster.
 Latency: It is the time between initiating the request of data until it is received. When executing
the processor instructions, it request the data stored in the memory. The requested data must be retrieved
by the processor for quick operation. Less latency, then more speed operation.
 Memory Capacity: If your application need below 60 MB, it is advisable to choose the memory
size as 64 MB. At the same time, running out of storage is the worst feeling we face with the digital camera.
So it is important to choose the capacity as needed for the application.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

 Size: The size of the memory device should be compatible with the embedded system. For hand
held devices, the size of the memory should be compact in nature. If it is a desktop computer system, the
size can be of medium sized. Proper size selection is also an essential criteria while selecting a memory.
 Power consumption: Memory needs power to read or write data. For high access speed, the power
consumptions will be more, results in more power dissipation. More heat will reduce the lifetime of the
embedded system. Hence the designers should go with optimum power consumption memory devices.
 Cost: Cost plays a significant role in deciding any product. While planning to design an embedded
system, similar importance should be given to memory as that of processor selection. Money should be
allocated, considering the type of memory to be used in the embedded system.
ii) How can you apply timing and counting devices effectively within embedded systems to
fulfill their essential functions? (Nov 2020) (April 2021)
1. Select Appropriate Devices:
 Choose timing and counting devices that meet the precision and resolution requirements of
your application.
2. Understand Power and Resource Constraints:
 Consider power consumption and resource availability when selecting devices, especially in
battery-powered or resource-constrained embedded systems.
3. Implement Efficient Interrupt Handling:
 Optimize interrupt service routines to minimize latency and ensure timely response to
events.
4. Consider Time-Critical Tasks:
 Identify tasks that require precise timing and allocate appropriate resources, such as
dedicated timers or high-priority interrupt handling.
5. Use Hardware-Assisted Features:
 Leverage hardware features provided by microcontrollers, such as hardware PWM
generators or dedicated timers, to offload processing from the main CPU.
6. Calibrate and Test:
 Calibrate timing devices and thoroughly test their accuracy under various conditions to
ensure reliable performance.
7. Consider Temperature Stability:
 In applications where temperature stability is critical, select components with stable timing
characteristics across the operating temperature range.
8. Use Timers for Power Management:
 Timers can be used to schedule power-saving modes or to trigger wake-up events,
contributing to efficient power management.
By carefully considering the requirements of your embedded system, selecting appropriate timing and
counting devices, and implementing efficient algorithms and strategies, you can effectively fulfill essential
functions and ensure precise control and synchronization in your embedded applications.
EE1672-Embedded Systems (Integrated Lab) Department of EEE/EIE 2023-2024

13. How can real-time clocks be effectively applied in embedded systems, and what are
their key functions and significance within such systems? (April 2022)
A real-time clock (RTC) is a computer clock, usually in the form of an integrated circuit that is solely built for keeping
time. Naturally, it counts hours, minutes, seconds, months, days and even years. RTCs can be found running in
personal computers, embedded systems and servers, and are present in any electronic device that may require accurate
time keeping. Being able to still function even when the computer is powered down through a battery or
independently from the system’s main power is fundamental.
RTCs must accurately keep time, even when the device is powered off because, it is often used as a trigger
for turning the device on or triggering events such as alarm clocks. RTC ICs run on an alternate power
source, which allows it to continually operate under low power or even when the computer is turned off.
ICs on older systems utilize lithium batteries, whereas newer systems make use of auxiliary batteries or
super capacitors. RTC ICs that use super capacitors are rechargeable and can be soldered. But in most
consumer-grade motherboards, the RTC is powered by a single battery that, when removed, resets the RTC
to its starting point.
RTC ICs regulate time with the use of a crystal oscillator and do not rely on clock signals like most hardware
clocks. Aside from being responsible for the timing function of the system and its clock, RTC ICs ensure
that all processes occurring in the system are appropriately synchronized. Although some may argue that
this is a job for the system clock, the system clock is actually dependent on the RTC, making the RTC
indirectly responsible for synchronization.
An RTC battery should last for three to five years or more. RTCs are essential; if the battery fails, it must
be replaced to ensure continued operation. A dead battery can be diagnosed with an error message at startup
or if the user finds that the clock or the setup configuration has become corrupted, flaky or odd.
Benefits of RTCs include:
 RTC ICs have proved to be more precise than other methods — like programming the timer of the
controller.
 It frees the main system from time-critical tasks.
 It has low power consumption and improved frequency stability.

You might also like