Unit 1
Unit 1
Unit 1
An Autonomous Institution
(Approved by AICTE, New Delhi, Affiliated to Anna University & Accredited by NAAC (A+))
K.S.R. Kalvi Nagar, Tiruchengode – 637 215,
Namakkal District, Tamil Nadu
STUDY MATERIAL
REGULATION–2021
COURSE OBJECTIVES:
TOTAL: 45 PERIODS
COURSE OUTCOME:
CO1: Explain fundamental embedded systems design paradigms, architectures, possibilities, and
challenges, both with respect to software and hardware.
CO2: Describe the hardware architecture and features of embedded microcontrollers and
peripherals.
CO3: Explain software design tools and embedded system design programming phases.
CO4: Describe IoT Architectures and Build simple IoT Systems using embedded target boards.
CO5: Exhibit understanding of IoMT infrastructure for healthcare applications.
TEXT BOOKS
1. Embedded Systems – A Contemporary Design Tool, James K Peckol, , John Weily, 2008,
ISBN: 0- 444-51616-6.
2. David Hanes, Gonzalo Salgueiro, Patrick Grossetete, Rob Barton and Jerome Henry, “loT
Fundamentals: Networking Technologies, Protocols and Use Cases for lnternet of Things,
Cisco Press, 2017.
3. Venkata Krishna, Sasikumar Gurumoorthy, Mohammad S. Obaidat, “lnternet of Things and
Personalized Healthcare Systems”, Springer Briefs in Applied Sciences, and Technology,
Forensic and Medical Bioinformatics, 2019.
REFERENCE BOOKS
Embeddedsystem
An embedded system is one kind of a computer system mainly designed toperformseveral tasks
like to access, process, store and also control the data in various electronics- basedsystems.
Embedded systems are a combination of hardware and software where software isusually known
as firmware that is embedded into the hardware. One of its most importantcharacteristics of
these systems is, it gives the o/p within the time limits. Embedded systemssupporttomake the
workmore perfectandconvenient.So,we frequently use embeddedsystems in simple and complex
devices too. The applications of embedded systems mainlyinvolve in our real lifefor several
devices likemicrowave,calculators,TV remote control,homesecurityand neighborhood
trafficcontrol systems
Fig:BlockDiagramofEmbeddedsystem
The embedded system basics are the combination of embedded system hardware and
embeddedsystemsoftware.
An embedded processor is a microprocessor specifically designed to be integrated into a larger
system for performing dedicated tasks. Unlike general-purpose processors (such as those found
in personal computers), embedded processors are optimized for efficiency, real-time
performance, and low power consumption. They are the heart of numerous devices and systems
that we encounter in our daily lives, from smartphones and smart appliances to automotive
systems and industrial machines.
1. Purpose and Application: Embedded processors are designed for a specific function or set
of functions. They are found in a wide range of applications, including consumer
electronics (like washing machines, digital cameras), industrial automation (robotics,
manufacturing equipment), automotive systems (engine control, infotainment), medical
devices (implantable devices, diagnostic equipment), and more.
2. Real-time Constraints: Many embedded systems require real-time processing, meaning
they must respond to inputs and produce outputs within strict timing constraints. For
instance, an anti-lock braking system in a car must respond instantly to prevent skidding.
3. Low Power Consumption: Embedded systems often have limited power resources, so
energy efficiency is a crucial consideration. Processors used in such systems are designed
to perform tasks using minimal power, which is vital for extending the device's battery
life.
4. Integration: Embedded processors are typically integrated into a larger system on a chip
(SoC). An SoC incorporates not only the processor core but also memory, peripheral
interfaces, and sometimes specialized hardware accelerators, all on a single chip.
5. Variety of Architectures: Embedded processors come in various architectures, including
ARM, x86, MIPS, PowerPC, and more. The choice of architecture depends on factors
such as performance requirements, power constraints, and the ecosystem surrounding the
processor.
6. Customization: In some cases, designers create custom processors tailored to specific
tasks. These processors might have features and instructions optimized for a particular
application, allowing for better performance and efficiency.
7. Development Tools: Software development for embedded processors involves tools and
environments designed to work within the constraints of the target hardware. This might
include specialized compilers, debugging tools, and integrated development
environments (IDEs).
8. RTOS and Firmware: Embedded systems often run on Real-Time Operating Systems
(RTOS) or specialized firmware. RTOS manages tasks with different priorities and
timing requirements, ensuring that critical tasks are executed on time.
9. Security Considerations: As more embedded systems connect to the internet, security
becomes a crucial concern. Designing processors with hardware security features helps
protect against unauthorized access, data breaches, and other cyber threats.
10. Updates and Maintenance: Some embedded systems can receive software updates, while
others might remain unchanged throughout their lifetimes due to hardware constraints.
This affects how security vulnerabilities and software bugs are addressed.
2.Application Areas
Embedded processors are widely used in various application areas due to their compact size, low
power consumption, and ability to perform specific tasks efficiently. Some common application
areas for embedded processors include:
Embedded processors can be broadly categorized into the following types based on their
architecture and design:
1. Microcontrollers (MCUs): Microcontrollers are integrated circuits that combine a
microprocessor core with memory, peripherals, and input/output (I/O) interfaces on a
single chip. They are designed for embedded systems and typically have low power
consumption. MCUs are commonly used in applications that require real-time control,
such as industrial automation, consumer electronics, automotive systems, and home
appliances.
2. Digital Signal Processors (DSPs): DSPs are specialized processors designed to
efficiently handle digital signal processing tasks. They excel in applications that require
high-speed mathematical calculations, such as audio and video processing,
telecommunications, image recognition, and medical imaging. DSPs are optimized for
numeric computations and often incorporate features like multiply-accumulate (MAC)
units and parallel processing capabilities.
3. Field-Programmable Gate Arrays (FPGAs): FPGAs are programmable logic devices that
consist of an array of configurable logic blocks interconnected by programmable routing
channels. They can be reprogrammed or reconfigured to implement digital logic
functions and perform specific tasks. FPGAs are used in applications that require high-
speed parallel processing, such as image and video processing, networking,
cryptography, and prototyping of digital systems.
4. System-on-Chip (SoC): SoCs integrate multiple components, including one or more
processors (such as CPUs or DSPs), memory, I/O interfaces, peripherals, and often
specialized hardware accelerators, onto a single chip. SoCs provide a complete system
solution within a single package and are commonly used in complex applications such as
smartphones, tablets, automotive systems, and IoT devices.
5. Graphics Processing Units (GPUs): GPUs are specialized processors designed to handle
graphics rendering and parallel processing tasks. While primarily used for rendering
graphics in applications like gaming and computer graphics, GPUs have found
application in fields such as scientific computing, artificial intelligence, and machine
learning due to their parallel computing capabilities.
6. Application-Specific Integrated Circuits (ASICs): ASICs are custom-designed integrated
circuits tailored for specific applications. They are optimized for performance, power
efficiency, and often have specialized hardware blocks. ASICs are commonly used in
areas such as telecommunications, automotive electronics, aerospace, and high-
performance computing, where specific requirements demand highly optimized
solutions.
1. Real-Time Constraints: Many embedded systems require real-time operation, where tasks
must be completed within specific timing constraints. Designing and implementing real-
time systems involve ensuring that tasks are scheduled and executed on time, managing
task priorities, and handling resource sharing and synchronization.
2. Limited Resources: Embedded systems often have limited resources in terms of
processing power, memory, storage, and energy. Designers need to optimize resource
usage, employ efficient algorithms and data structures, and carefully manage power
consumption to meet the system's requirements within the available constraints.
3. Heterogeneous Hardware and Software: Embedded systems often involve a combination
of hardware and software components from different vendors or with varying
architectures. Integrating and interfacing these components can be challenging, requiring
careful coordination and compatibility considerations.
4. Reliability and Fault Tolerance: Many embedded systems operate in critical
environments or perform safety-critical tasks. Ensuring system reliability and fault
tolerance is crucial. Designers must incorporate fault detection, error handling, and fault
recovery mechanisms to minimize the impact of failures and ensure system resilience.
5. Security Concerns: As embedded systems become more interconnected and part of larger
networks (e.g., IoT devices), they face increasing security risks. Designers need to
address security vulnerabilities, protect against unauthorized access, and ensure data
integrity and privacy within the system.
6. Software Complexity: Embedded systems are becoming more sophisticated, requiring
complex software development and integration. Managing the complexity of the
software, including handling interactions between different software modules, ensuring
code quality, and enabling efficient debugging and maintenance, poses significant
challenges.
7. Verification and Validation: Verifying and validating the correctness and performance of
embedded systems can be complex. Testing and debugging embedded software and
hardware components, performing system integration testing, and ensuring compliance
with the system requirements require careful planning and execution.
8. Time-to-Market Pressure: Embedded systems are often developed within tight schedules
to meet market demands. Balancing time-to-market pressures with the need for thorough
design, testing, and validation can be a significant challenge for embedded system
designers.
This section provides an overview of the embedded system design process aimed at two
objectives. First, it will give us an introduction to the various steps in embedded system design
before we delve into them in more detail. Second, it will allow us to consider the design
methodology itself. A design methodology is important for three reasons. First, it allows us to
keep a scorecard on a design to ensure that we have done everything we need to do, such as
optimizing performance or performing functional tests. Second, it allows us to develop
computer-aided design tools. Developing a single program that takes in a concept for an
embedded system and emits a completed design would be a daunting task, but by first breaking
the process into manageable steps, we can work on automating (or at least semi automating) the
steps one at a time. Third, a design methodology makes it much easier for members of a design
team to communicate.
The below Figure summarizes the major steps in the embedded system design process. In this
top–down view, we start with the system requirements.
Fig:Major levels of abstraction in the design process
Requirements
Clearly, before we design a system, we must know what we are designing. The initial stages of
the design process capture this information for use in creating the architecture and components.
We generally proceed in two phases: First, we gather an informal description from the customers
known as requirements, and we refine the requirements into a specification that contains enough
information to begin designing the system architecture.
Requirements may be functional or nonfunctional. We must of course capture the basic functions
of the embedded system, but functional description is often not sufficient. Typical nonfunctional
requirements include:
Performance: The speed of the system is often a major consideration both for the usability of the
system and for its ultimate cost. As we have noted, performance may be a combination of soft
performance metrics such as approximate time to perform a user-level function and hard
deadlines by which a particular operation must be completed.
Cost: The target cost or purchase price for the system is almost always a consideration. Cost
typically has two major components: manufacturing cost includes the cost of components and
assembly; nonrecurring engineering (NRE) costs include the personnel and other costs of
designing the system.
Physical size and weight: The physical aspects of the final system can vary greatly depending
upon the application. An industrial control system for an assembly line may be designed to fit
into a standard-size rack with no strict limitations on weight. A handheld device typically has
tight requirements on both size and weight that can ripple through the entire system design.
A sample requirements form that can be filled out at the start of the project. We can use the form
as a checklist in considering the basic characteristics of the system. Let’s consider the entries in
the form:
Name: This is simple but helpful. Giving a name to the project not only simplifies talking about
it to other people but can also crystallize the purpose of the machine.
Purpose: This should be a brief one- or two-line description of what the system is supposed to
do. If you can’t describe the essence of your system in one or two lines, chances are that you
don’t understand it well enough.
Inputs and outputs: These two entries are more complex than they seem. The inputs and outputs
to the system encompass a wealth of detail:
Types of data: Analog electronic signals,Digital data, Mechanical inputs
Performance: Many embedded computing systems spend at least some time controlling physical
devices or processing data coming from the physical world. In most of these cases, the
computations must be performed within a certain time frame. It is essential that the performance
requirements be identified early
Manufacturing cost: This includes primarily the cost of the hardware components. Even if you
don’t know exactly how much you can afford to spend on system components, you should have
some idea of the eventual cost range. Cost has a substantial influence on architecture: A machine
that is meant to
Power: Similarly, you may have only a rough idea of how much power the system can consume,
but a little information can go a long way. Typically, the most important decision is
whetherthemachinewillbebatterypoweredorpluggedintothewall.Battery-
poweredmachinesmustbemuchmorecareful abouthow theyspendenergy.
GPSMODULE:
REQUIREMENTSFORMOFGPSMOVINGMAPMODULE:
Name:GPSmovingmap
Purpose: Consumer-
grade moving map for
driving
useInputs:Powerbutton,t
wocontrolbuttons
Outputs: Back-litLCDdisplay 400_ 600
Functions : Uses 5-receiver GPS system; three
user-selectable resolutions;alwaysdisplays
currentlatitudeandlongitude
Performance: Updates screen within
0.25 seconds upon
movementManufacturingcost:$30
Power:100mW
Physicalsizeandweight:Nomorethan2” _ 6,” 12ounces
Specification
Thespecificationismoreprecise—itservesasthecontractbetweenthecustomerandthearchitects. As
such, the specification must be carefully written so that it accurately reflects
thecustomer’srequirementsand doessoin awaythat can
beclearlyfollowedduringdesign.Thespecificationshouldbeunderstandableenoughso
thatsomeonecanverifythatitmeetssystemrequirements andoverall expectationsof thecustomer.
AspecificationoftheGPSsystemwouldincludeseveralcomponents:
Datareceived fromtheGPSsatelliteconstellation.
Mapdata.
Userinterface.
Operationsthatmustbeperformedtosatisfycustomerrequests.
Backgroundactionsrequiredtokeepthesystemrunning,s
uchasoperatingtheGPSreceiver.
The specification does not say how the system does things, only what the system does.
Describing how the system implements those functions is the purpose of the architecture. The
architecture is a plan for the overall structure of the system that will be used later to design the
components that make up the architecture. The creation of the architecture is the first phase of
what many designers think of as design.
This block diagram is still quite abstract—we have not yet specified which operations will be
performed by software running on a CPU, what will be done by special-purpose hardware, and
so on. The diagram does, however, go a long way toward describing how to implement the
functions described in the specification. We clearly see, for example, that we need to search the
topographic database and to render (i.e., draw) the results for the display. We have chosen to
separate those functions so that we can potentially do them in parallel—performing rendering
separately from searching the database may help us update the screen more fluidly.
Fig: Block Diagram forthe Moving Map
The hardware block diagram clearly shows that we have one central CPU surrounded by memory
and I/O devices. In particular, we have chosen to use two memories: a frame buffer for the pixels
to be displayed and a separate program/data memory for general use by the CPU. The software
block diagram fairly closely follows the system block diagram, but we have added a timer to
control when we read the buttons on the user interface and render data onto the screen. To have a
truly complete architectural description, we require more detail, such as where units in the
software block diagram will be executed in the hardware block diagram and when operations
will be performed in time.
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
will in general include both hardware—FPGAs, boards, and so on—and software modules. Some
of the components will be ready-made. The CPU, for example, will be a standard component in
almost all cases, as will memory chips and many other components. In the moving map, the GPS
receiver is a good example of a specialized component that will nonetheless be a predesigned,
standard component. We can also make use of standard software modules.
System Integration
Only after the components are built do we have the satisfaction of putting them together and
seeing a working system. Of course, this phase usually consists of a lot more than just plugging
everything together and standing back. Bugs are typically found during system integration, and
good planning can help us find the bugs quickly. By building up the system in phases and
running properly chosen tests, we can often find bugs more easily. If we debug only a few
modules at a time, we are more likely to uncover the simple bugs and able to easily recognize
them. Only by fixing the simple bugs early will we be able to uncover the more complex or
obscure bugs that can be identified only by giving the system a hard workout
Von-Neumann architecture supports simple hardware. It allows the use of a single, sequential
memory. Today's processing speeds vastly outpace memory access times, and we employ a very
fast but small amount of memory (cache) local to the processor.
Harvard Architecture
The Harvard architecture offers separate storage and signal buses for instructions and data. This
architecture has data storage entirely contained within the CPU, and there is no access to the
instruction storage as data. Computers have separate memory areas for program instructions and
data using internal data buses, allowing simultaneous access to both instructions and data.
Programs needed to be loaded by an operator; the processor could not boot itself. In a Harvard
architecture, there is no need to make the two memories share properties.
Single memory to be shared by both code and data. Separate memories for code and data.
Processor needs to fetch code in a separate clock cycle Single clock cycle is sufficient, as
and data in another clock cycle. So it requires two separate buses are used to access code
clock cycles. and data.
Higher speed, thus less time consuming. Slower in speed, thus more time-
consuming.
RISC Architectures
The term RISC stands for ‘’Reduced Instruction Set Computer’’. It is a CPU design plan based
on simple orders and acts fast.
This is a small or reduced set of instructions. Here, every instruction is expected to attain very
small jobs. In this machine, the instruction sets are modest and simple, which help in comprising
more complex commands. Each instruction is about a similar length; these are wound together to
get compound tasks done in a single operation. Most commands are completed in one machine
cycle. This pipelining is a crucial technique used to speed up RISC machines.
Reduced Instruction Set Computer is a microprocessor that is designed to carry out few
instructions at a similar time. Based on small commands, these chips need fewer transistors,
which makes the transistors inexpensive to design and produce. The features of RISC include the
following
Also, while writing a program, RISC makes it easier by letting the computer programmer
eliminate needless codes and stops wasting cycles.
Characteristics
The characteristics of RISC architecture include the following.
CISC Architecture
The term CISC stands for ‘’Complex Instruction Set Computer’’. It is a CPU design plan based
on single commands, which are skilled in executing multi-step operations.
CISC computers have small programs. It has a huge number of compound instructions, which
take a long time to perform. Here, a single set of instructions is protected in several steps; each
instruction set has an additional than 300 separate instructions. Maximum instructions are
finished in two to ten machine cycles. In CISC, instruction pipelining is not easily implemented.
The CISC machines have good acts, based on the overview of program compilers; as the range
of innovative instructions are simply obtainable in one instruction set. They design compound
instructions in a single, simple set of instructions.
They achieve low-level processes, which makes it easier to have huge addressing nodes and
additional data types in the hardware of a machine. But, CISC is considered less efficient than
RISC, because of its incompetence to eliminate codes which leads to wasting of cycles. Also,
microprocessor chips are difficult to understand and program for, because of the complexity of
the hardware.
Addressing Modes: Addressing modes are how the data is accessed. Depending upon the type
of instruction applied, addressing modes are of various types such as a direct mode where
straight data is accessed or indirect mode where the location of the data is accessed. Processors
having identical ISA may be very different in the organization. Processors with identical ISA and
nearly identical organization is still not nearly identical.
Characteristics
IBM 370/168 – It was introduced in the year 1970. CISC design is a 32-bit processor and four
64-bit floating point registers.
VAX 11/780 – CISC design is a 32-bit processor and it supports many numbers of addressing
modes and machine instructions which is from Digital Equipment Corporation.
Intel 80486 – It was launched in the year 1989 and it is a CISC processor, which has instructions
varying lengths from 1 to 11 and it will have 235 instructions.
CISC vs RISC
The following points differentiate a CISC from a RISC −
CISC RISC
Many addressing modes causing complex Few addressing modes, fix instruction format.
instruction formats.
Higher clock cycles per second. Low clock cycle per second.
Control unit implements large instruction set Each instruction is to be executed by hardware.
using micro-program unit.
7.CPU BUSES
A computer system encompasses much more than the CPU;it also includes memory and I/O
devices. The bus is the mechanism by which the CPU communicates with memory and devices.
A bus is, at a minimum, a collection of wires, but the bus also defines a protocol by which the
CPU, memory, and devices communicate. One of the major roles of the bus is to provide an
interface to memory. (Of course, I/O devices also connect to the bus.)
7.1. Bus Protocols:
The basic building block of most bus protocols is the four-cycle handshake, illustrated in
Figure 2.1. The handshake ensures that when two devices want to communicate, one is ready to
transmit and the other is ready to receive.
The handshake uses a pair of wires dedicated to the handshake: enq (meaning enquiry)
and ack (meaning acknowledge). Extra wires are used for the data transmitted during the
handshake. The four cycles are described below.
Device 1 raises its output to signal an enquiry, which tells device 2 that it should get ready to
listen for data.
When device 2 is ready to receive, it raises its output to signal an acknowledgment. At this
point, devices 1 and 2 can transmit or receive.
Once the data transfer is complete, device 2 lowers its output, signaling that it has received the
data.
After seeing that ack has been released, device 1 lowers its output.
At the end of the handshake, both handshaking signals are low, just as they were at the start of
the handshake. The system has thus returned to its original state in readiness for another
handshake-enabled data transfer.
Microprocessor buses build on the handshake for communication between the CPU and other
system components. The term bus is used in two ways.
The most basic use is as a set of related wires, such as address wires. However, the term may
also mean a protocol for communicating between components.
To avoid confusion, we will use the term bundle to refer to a set of related signals. The
fundamental bus operations are reading and writing. Figure 2.2 shows the structure of a typical
bus that supports reads and writes.
The major components follow:
Clock provides synchronization to the bus components,
R/W is true when the bus is reading and false when the bus is writing,
Address is an a-bit bundle of signals that transmits the address for an access,
Data is an n-bit bundle of signals that can carry data to or from the CPU, and
Data ready signals when the values on the data bundle are valid.
7.2.BusOrganisation
Direct memory access (DMA) is a bus operation that allows reads and writes not controlled
by the CPU. A DMA transfer is controlled by a DMA controller, which requests control of the
bus from the CPU.
After gaining control, the DMA controller performs read and write operations directly between
devices and memory. Figure 2.3 shows the configuration of a bus with a DMA controller. The
DMA requires the CPU to provide two additional bus signals:
The bus request is an input to the CPU through which DMA controllers ask for ownership
of the bus.
The bus grant signals that the bus has been granted to the DMA controller.
A device that can initiate its own bus transfer is known as a bus master. Devices that do not
have the capability to be bus masters do not need to connect to a bus request and bus grant.
The DMA controller uses these two signals to gain control of the bus using a classic four-cycle
handshake. The bus request is asserted by the DMA controller when it wants to control the bus,
and the bus grant is asserted by the CPU when the bus is ready.
The CPU will finish all pending bus transactions before granting control of the bus to the DMA
controller. When it does grant control, it stops driving the other bus signals: R/W, address, and so
on. Upon becoming bus master, the DMA controller has control of all bus signals (except, of
course, for bus request and bus grant).
8.MEMORY DEVICES AND THEIR CHARACTERISTICS
RAM, EEPROM-FLASH MEMORY- DRAM
Random Access Memory (RAM): RAM is a type of volatile memory that provides fast access
to data. It is used to store temporary data and program instructions that the processor needs to
access quickly. RAM loses its data when power is turned off, which means it is not suitable for
permanent data storage. There are two main types of RAM used in embedded systems:
a. Static RAM (SRAM): SRAM uses flip-flops to store each bit of data, which allows for faster
access times compared to other types of RAM. It is more expensive and requires more power
than DRAM but is often used in caches and critical areas that need fast access.
b. Dynamic RAM (DRAM): DRAM uses capacitors to store each bit of data and requires
periodic refreshing to maintain the data. It is cheaper and less power-hungry than SRAM but has
longer access times. DRAM is commonly used as the main system memory in embedded
systems.
Flash Memory: Flash memory is another type of non-volatile memory that can be electrically
erased and reprogrammed. It is widely used in embedded systems due to its fast access times,
low power consumption, and high data density. Flash memory is commonly used for storing
firmware, operating systems, and other non-volatile data in embedded systems.
There are different types of flash memory, including NAND flash and NOR flash, each with its
own characteristics and applications. NAND flash is commonly used for data storage, while
NOR flash is often used for boot code and firmware.
Embedded systems often use a combination of RAM, EEPROM, and flash memory to store and
manage data efficiently. RAM provides fast access for temporary data storage, EEPROM retains
critical data during power cycles, and flash memory serves as a non-volatile storage solution for
firmware and other essential programs.
9.BIOS
In an embedded system, the Basic Input/Output System (BIOS) plays a crucial role in initializing
and managing the hardware components during the boot-up process. BIOS are a firmware that
resides on a read-only memory (ROM) chip on the embedded system's motherboard. Its main
function is to perform the initial setup and configuration of the hardware components, load the
operating system into memory, and provide a basic set of low-level services for the operating
system to use.
10.POST
In an embedded system, the Power-On Self Test (POST) is a crucial part of the boot process. It
is a series of hardware tests and checks performed by the system firmware, typically the BIOS or
UEFI, when the system is powered on or reset. The primary purpose of the POST is to verify the
functionality of essential hardware components before loading the operating system.
The POST process begins when the embedded system is powered on or when a hardware reset
signal is received. The system firmware (BIOS or UEFI) takes control of the boot process.
2. CPU Initialization
The first step in the POST is the initialization of the Central Processing Unit (CPU). The
firmware configures the CPU, sets up its registers, and prepares it for further operation.
4. Cache Initialization
If the CPU has a cache, the firmware initializes it as well. The cache is a small but faster memory
located close to the CPU that stores frequently accessed data, improving overall system
performance.
The POST continues by detecting and initializing the chipset and other hardware components on
the motherboard. This includes the southbridge, northbridge, system buses, and peripheral
controllers.
6. Graphics Initialization
If the embedded system has a discrete graphics card, the firmware initializes it and sets up the
basic display settings to enable video output.
The firmware checks the keyboard and other input devices to ensure they are functioning
correctly. It may display messages like "Press DEL to enter Setup" to allow users to access the
BIOS/UEFI setup utility.
8. Peripheral Detection
The POST scans for connected peripheral devices such as hard drives, solid-state drives, optical
drives, USB devices, network cards, and other expansion cards. It verifies if these devices are
present and operational.
During the POST process, if any expansion cards have Option ROMs (firmware built into the
card), the firmware may execute them to provide additional features or configuration options.
As the POST performs hardware tests, it checks for any errors or failures in the detected
hardware components. If an error is found, the firmware generates error codes or displays error
messages on the screen. It may also emit beep codes through the system speaker to indicate
specific hardware issues.
After the boot device is selected, the firmware transfers control to the first sector of the boot
device, typically the Master Boot Record (MBR). The MBR contains the boot loader code,
which continues the boot process by loading the operating system kernel into memory.
The POST is a vital part of the embedded system boot process as it ensures that the
hardware components are functioning correctly before attempting to start the operating system. If
any critical hardware issues are detected during the POST, the firmware typically halts the boot
process, displays error messages or beep codes, and prompts the user to take appropriate actions,
such as fixing the hardware issue or entering the BIOS/UEFI setup utility to make necessary
adjustments.
Device drivers are a critical component of embedded systems, as they allow the operating system
or software to communicate and interact with hardware devices. Embedded systems are
specialized computer systems designed to perform specific functions or tasks and are often found
in various applications such as consumer electronics, automotive systems, medical devices,
industrial automation, and more.
Device drivers act as intermediaries between the hardware components and the higher-level
software applications. They provide an abstraction layer that allows the operating system and
applications to interact with hardware devices without needing to understand the low-level
hardware details.
Initialization: Device drivers initialize the hardware device and prepare it for operation. This
involves setting up registers, configuring communication protocols, and other necessary setup
procedures.
Data Transfer:Drivers facilitate the transfer of data between the hardware and software. This
includes reading data from sensors, writing data to actuators, and managing data buffers.
Error Handling: Device drivers manage error conditions that may arise during hardware
operation. They can detect and report errors, handle recovery mechanisms, and provide error
codes or messages to the software.
Interrupt Handling: Many embedded systems rely on interrupts to signal events from hardware
devices. Device drivers handle these interrupts, allowing the system to respond quickly to time-
sensitive events.
Power Management: Device drivers often play a role in managing power consumption by
controlling the device's power modes and determining when it should be turned on or off.
Embedded systems use various types of device drivers based on the nature of the hardware and
the system architecture:
Character Drivers: These drivers handle character-oriented devices such as serial ports,
keyboards, and sensors that send or receive data character by character.
Block Drivers: Block drivers manage block-oriented devices like hard drives, flash memory, and
memory cards. They handle data in fixed-size blocks or sectors.
Network Drivers: Network drivers facilitate communication between the embedded system and
network interfaces, such as Ethernet or Wi-Fi adapters.
Graphics Drivers: In systems with displays, graphics drivers control the display hardware,
allowing the rendering of graphics and text.
USB Drivers: These drivers enable communication with USB devices, such as USB storage,
printers, and input devices.
I2C, SPI, UART Drivers: These drivers manage communication protocols commonly used for
inter-device communication, like I2C, SPI, and UART.
Writing device drivers requires knowledge of both the hardware and the operating system or
software platform. Depending on the system, drivers can be written in languages like C or C++.
They must adhere to the conventions of the operating system's driver framework and follow
hardware-specific protocols.
Device drivers are integral to the operation of embedded systems, enabling them to interact with
hardware components efficiently and effectively. They bridge the gap between the hardware and
software layers, ensuring smooth communication and optimal utilization of resources.
Block diagram
• Device driver is a piece of software that acts as a bridge between the operating system and the
hardware
• The user applications talk to the OS kernel for all necessary information exchange including
communication with the hardware peripherals
• The architecture of the OS kernel will not allow direct device access from the user application
• All the device related access should flow through the OS kernel and the OS kernel routes it to
the concerned hardware peripheral
• OS Provides interfaces in the form of Application Programming Interfaces (APIs) for accessing
the hardware
• The device driver abstracts the hardware from user applications
• Device drivers are responsible for initiating and managing the communication with the hardware
peripherals
• Drivers which comes as part of the Operating system image is known asbuilt-in drivers’ or
‘onboard’ drivers. Eg. NAND FLASH driver
• Drivers which needs to be installed on the fly for communicating with add-on devices are known
as ‘Installable drivers’
• For installable drivers, the driver is loaded on a need basis when the device is present and it is
unloaded when the device is removed/detached
• The ‘Device Manager service of the OS kernel is responsible for loading and unloading the driver,
managing the driver etc.