You are on page 1of 4

1. Write the main components of an embedded system.

Include power supply, microcontrollers and microprocessors, memory, timers and counters,
communication interfaces, input/output, and electrical circuits, all of which work together to enable the
desired functionality of the embedded system.
2. Define embedded microcontroller.
Microcontroller is a compact integrated circuit designed to govern a specific operation in an
embedded system. A typical microcontroller includes a processor, memory and input/output (I/O)
peripherals on a single chip. Sometimes referred to as an embedded controller or microcontroller unit
(MCU)
3. Give the two essential units of a processor on an embedded system.
 Program Flow Control Unit (CU)
 Execution Unit (EU)
4. Acquire the important considerations when selecting a processor.
Today's converged processing paradigm makes selecting a processor a more complex decision
than ever.
Processor performance.
Hardware acceleration.
Bandwidth requirements.
Power management.
Security needs.
Safety and fault tolerance.
Debugging capabilities.
System cost.
5. Name some of the hardware parts of embedded systems.
The core components of an embedded system are Microcontrollers/Microprocessors, embedded
memory (i.e. RAM, ROM, FLASH), I/O interface ports, serial communication protocols (i.e. SPI, I2C,
UART), clock generators, ADC, DAC, power management blocks and power supplies.
6. Evaluate the challenges of embedded systems?
 Costly purchase of equipment.
 Lack of compliance and certifications.
 Cost of prototyping.
 Device incompatibility.
 Quality control automation.
 Maintaining high security.
 Hardware development project management.
 High complexity of the mechanical component.
7. i. Explain in detail about device driver and Interrupt servicing Mechanism in an embedded (7) (R)
device.
Device Driver in computing refers to a special kind of software program or a specific
type of software application that controls a specific hardware device that enables different
hardware devices to communicate with the computer’s Operating System. A device driver
communicates with the computer hardware by computer subsystem or computer bus
connected to the hardware.
Device Drivers are essential for a computer system to work properly because without a
device driver the particular hardware fails to work accordingly, which means it fails in doing
the function/action it was created to do. Most use the term Driver, but some may say
Hardware Driver, which also refers to the Device Driver.
Types of Device Driver:
For almost every device associated with the computer system there exist a Device
Driver for the particular hardware. But it can be broadly classified into two types i.e.,
 Kernel-mode Device Driver –
This Kernel-mode device driver includes some generic hardware that loads with the
operating system as part of the OS these are BIOS, motherboard, processor, and some
other hardware that are part of kernel software. These include the minimum system
requirement device drivers for each operating system.
 User-mode Device Driver –
Other than the devices which are brought by the kernel for working the system the
user also brings some devices for use during the using of a system that devices need
device drivers to function those drivers fall under User mode device driver. For
example, the user needs any plug-and-play action that comes under this.
Interrupt Service Routine:
An interrupt is a signal to the processor emitted by hardware or software indicating
an event that needs immediate attention. Whenever an interrupt occurs, the controller
completes the execution of the current instruction and starts the execution of an Interrupt
Service Routine (ISR) or Interrupt Handler. ISR tells the processor or controller what to do
when the interrupt occurs. The interrupts can be either hardware interrupts or software
interrupts.
Hardware Interrupt
A hardware interrupt is an electronic alerting signal sent to the processor from an
external device, like a disk controller or an external peripheral. For example, when we press a
key on the keyboard or move the mouse, they trigger hardware interrupts which cause the
processor to read the keystroke or mouse position.
Software Interrupt
A software interrupt is caused either by an exceptional condition or a special
instruction in the instruction set which causes an interrupt when it is executed by the
processor. For example, if the processor's arithmetic logic unit runs a command to divide a
number by zero, to cause a divide-by-zero exception, thus causing the computer to abandon
the calculation or display an error message. Software interrupt instructions work similar to
subroutine calls.
Interrupt Service Routine
For every interrupt, there must be an interrupt service routine (ISR), or interrupt
handler. When an interrupt occurs, the microcontroller runs the interrupt service routine. For
every interrupt, there is a fixed location in memory that holds the address of its interrupt
service routine, ISR. The table of memory locations set aside to hold the addresses of ISRs is
called as the Interrupt Vector Table.
ii. Discuss in detail about interrupt latency and their solutions. (6) (U)
Interrupt latency is the time that elapses between the occurrence of an interrupt and
the execution of the first instruction of the interrupt service routine (ISR) that handles the
interrupt.
 It is a measure of the system’s ability to respond to external events in a timely
manner.
 The shorter the interrupt latency, the more responsive the system will be.
 Interrupt latency is expressed in core clock cycles.
Importance of Interrupt Latency
Interrupt latency is an important consideration in the design and optimization of real-time and
embedded systems. These systems often have hard real-time constraints, meaning that they
must respond to external events within a specified time period.
 A high interrupt latency can result in the system missing a deadline, which can cause
the system to fail or produce incorrect results.
 If interrupts are not handled in a timely manner then the system will exhibit slow
response times.
Factors Affecting Interrupt Latency
There are several factors that can affect interrupt latency, including:

 Hardware: The architecture of the processor, as well as the design of the memory and
I/O subsystems, can have a significant impact on interrupt latency.
 Operating System: The operating system plays a big role in interrupt latency, with
some OSes having fewer interrupt latencies due to advanced scheduler and interrupt
handling mechanism.
 Interrupt Priority: The priority level of the interrupt can also affect interrupt latency,
with higher priority interrupts being serviced before lower priority interrupts.
 Interrupt Storms: High number of interrupts from certain devices or software can lead
to Interrupt Storm which can cause large interrupt latency and system hang
 Interrupt Handlers: Interrupt handlers themselves can add to the latency of the system.
The ISR should be optimized for speed and should avoid unnecessary operations.
 System load: High system load can also increase interrupt latency, as the CPU is busy
processing other tasks and may not be able to respond to interrupts in a timely
manner.
 Disabling interrupts: The system will not react to any interrupt requests if the software
has disabled interrupts.
Without examining the system, it can be difficult to determine the precise cause of interrupt
latency, but by understanding the potential causes, the problem may be found and fixed.

Interrupt Prioritization
When a processor receives a higher-priority interrupt while it is still addressing a
lower-priority interrupt, this is known as interrupt preemption. In this scenario, the processor
will instantly halt the handler for the current interrupt and start the handler for the interrupt
with a higher priority.
This is often referred to as “interrupt nesting” or “interrupt prioritization.” It is a
technique for managing various interrupt requests in the order of their importance, making
sure that the most crucial tasks are attended to first.
When a disc drive interrupt with a higher priority is received while a keyboard
interrupt is still being treated, for instance, the processor will instantly cease handling the
keyboard interrupt and begin handling the disc drive interrupt. The processor will return to the
keyboard interrupt and go on from there until the disc drive interrupt has been resolved.
It’s also important to keep in mind that some interrupt controllers include priority
levels, which allow the controller to manage an interrupt queue internally by prioritizing and
handling interrupts in the order of priority.

You might also like