0% found this document useful (0 votes)
3 views28 pages

Esd Module2 Module3 Answers

The document provides exam-ready answers for Modules 2 and 3 of the BEC601 Embedded Systems course, covering essential topics such as firmware checking methods, brown-out protection circuits, reset and real-time clock circuits, and the characteristics of embedded systems. It also discusses operational and non-operational quality attributes, application-specific embedded systems like washing machines and automotive systems, and the importance of hardware-software co-design. The content is structured for academic clarity and is suitable for exam preparation.

Uploaded by

ullekhagowda8
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)
3 views28 pages

Esd Module2 Module3 Answers

The document provides exam-ready answers for Modules 2 and 3 of the BEC601 Embedded Systems course, covering essential topics such as firmware checking methods, brown-out protection circuits, reset and real-time clock circuits, and the characteristics of embedded systems. It also discusses operational and non-operational quality attributes, application-specific embedded systems like washing machines and automotive systems, and the importance of hardware-software co-design. The content is structured for academic clarity and is suitable for exam preparation.

Uploaded by

ullekhagowda8
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

BEC601 Embedded Systems

Module 2 and Module 3 Exam-Ready Answers


Course: BEC601 Embedded Systems
Institution: RNS Institute of Technology
Prepared from: Uploaded Module 2 notes, Module 3 notes, and Question Bank
Scope: Only Module 2 and Module 3 questions

Title Page
Document Title: Exam-Ready Answers for Module 2 and Module 3
Subject: Embedded Systems
Focus Areas: Embedded System Design Concepts, Firmware Design, RTOS, Scheduling,
Synchronization, and Embedded Development Environment
Answer Style: Academic, concise, marks-oriented, and suitable for README/PDF export

Module 2 – Answers
Q1. What are the methods used to check embedded firmware? (5 Marks)
Embedded firmware is checked using both design-time and run-time methods. The notes
emphasize program modelling, modular development, conversion flow, and debugging-
oriented firmware development.

Methods used to check embedded firmware


Program modelling before coding
Firmware requirements are first converted into a program model.
Tools such as UML or flowchart-based models are used before implementation.
This helps verify logic before coding begins.
Module-wise development and verification
Firmware can be developed in multiple source modules.
Each module is checked separately for syntax errors and instruction-level
correctness.
This improves reuse and simplifies validation.
Assembler / cross-compiler based checking
In assembly-based design, each .asm or .src file is assembled separately.
Syntax errors and invalid assembly instructions are detected during assembly.
In high-level language design, the cross-compiler checks the source modules and
generates object files.
Linking and address verification
Linker/locator checks object modules and assigns absolute addresses.
It also detects project-level issues such as improper export/import of symbols.
Testing during integration
After firmware and hardware are ready, integration is performed.
This checks whether firmware properly controls peripherals, memory, I/O ports, and
registers.

Simple firmware checking flow

Requirem ent -> Program m odel -> Coding -> Module checking
-> Object generation -> Linking/locating -> Hex file
-> Hardware integration -> Final verification

Key point
Thus, embedded firmware is checked through modelling, module-wise error checking,
compiler/assembler verification, linker validation, and final hardware integration testing.

Q2. What is the use of brown out protection circuit? (4 Marks)


A brown-out protection circuit is used to protect an embedded system when the supply
voltage falls below the safe operating level.

Uses of brown-out protection circuit


Monitors the supply voltage continuously.
Detects undervoltage condition before the system operates incorrectly.
Resets or holds the processor in a safe condition when voltage drops.
Prevents unpredictable firmware execution due to insufficient power.
Protects memory contents, processor state, and peripheral operation.

Importance
If supply voltage reduces below the minimum required value:

processor instructions may execute incorrectly,


registers may hold invalid values,
memory may get corrupted,
the whole system may behave unpredictably.
Conclusion
Hence, brown-out protection improves system reliability and safety by ensuring that the
embedded system operates only within the valid power range.

Q3. Explain Reset circuit and Real time clock circuit. (6 Marks)

1) Reset circuit
A reset circuit is used to initialize the embedded system properly whenever power is applied
or abnormal operation occurs.

Functions of reset circuit


Forces the processor into a known initial state.
Starts program execution from the reset vector or beginning of firmware.
Initializes registers, memory-related states, and peripherals.
Helps recover the system during faults or hangs.

Need for reset circuit


Without reset, the controller may start from an unknown state after power-on. This may lead
to invalid execution and unreliable system behavior.

Types of reset situations


Power-on reset
Manual reset
Reset due to watchdog timeout
Reset during abnormal supply conditions

2) Real Time Clock (RTC) circuit


A Real Time Clock circuit provides accurate timing reference to the system.

Functions of RTC
Maintains current time reference.
Supports time-based operations.
Helps the system in scheduling, alarms, and periodic activities.
In RTOS-based systems, the timing reference is used for timer tick generation through
hardware timer support.
Importance in embedded systems
Required for precise time management.
Used in cyclic operations and alarm handling.
Supports periodic task activation.
Gives timing reference for system events.

Combined role
Reset circuit ensures correct startup.
RTC circuit ensures correct time reference.
Both are essential for reliable embedded system operation.

Q4. Draw and explain oscillator unit and watchdog timer unit. (6 Marks)

Oscillator unit
An oscillator unit generates the clock signal required for processor and system operation.

Block representation

Crystal / Oscillator Source -> Clock Generation Circuit -> Processor / Controller

Functions of oscillator unit


Generates periodic clock pulses.
Provides timing reference for instruction execution.
Synchronizes internal operations of the controller.
Supports serial communication, timers, and peripheral timing.

Importance
The processor executes instructions in relation to the clock. Hence, the oscillator determines
operating speed and timing behavior.

Watchdog timer unit


A watchdog timer is a safety timer used to detect firmware hang or abnormal execution.
Block representation

Processor/firm ware -> periodic watchdog service (kick/reset)


-> Watchdog Tim er
If service m issing -> Tim eout -> System Reset

Working
The watchdog timer runs continuously.
Firmware must periodically clear or refresh it.
If firmware executes normally, the timer is refreshed before timeout.
If firmware hangs or enters an infinite fault state, refresh does not occur.
Then the watchdog generates a reset signal.

Need for watchdog timer


Prevents permanent system hang.
Improves reliability in superloop-based firmware.
Helpful when a single task failure affects the whole system.

Conclusion
The oscillator provides the timing base, while the watchdog timer provides fault recovery
support.

Q5. What is PCB and Passive components of embedded system? (4 Marks)

PCB
PCB stands for Printed Circuit Board. It is the physical board on which the electronic
components of an embedded system are mounted and interconnected.

Functions of PCB
Holds components mechanically.
Provides electrical interconnection paths.
Supports compact and reliable implementation.
Helps organized placement of processor, memory, sensors, and interface circuits.
Passive components
Passive components are electronic components that do not provide gain or amplification.

Common passive components


Resistors
Capacitors
Inductors

Role in embedded systems


Resistors control current and voltage division.
Capacitors are used in filtering, coupling, timing, and decoupling.
Inductors are used in filtering and power circuits.
Thus, PCB provides the platform, while passive components support stable and proper
electrical operation.

Q6. Explain the characteristics and quality attributes of embedded system. (5


Marks)
Embedded systems have specific characteristics and quality attributes that distinguish them
from general-purpose systems.

Characteristics of embedded systems


Application and domain specific
Designed for a dedicated function only.
Reactive and real time
Respond to input changes from the environment.
Must respond within known time limits.
Operates in harsh environment
Must tolerate dust, heat, cold, rain, corrosion, and component aging.
Distributed
Often part of a larger system with multiple interacting units.
Small size and weight
Compact and lightweight construction is preferred.
Power concerns
Low power utilization and low heat dissipation are important.
Quality attributes
Embedded system quality attributes are broadly classified into:

1. Operational quality attributes


2. Non-operational quality attributes

Important idea
Characteristics describe the nature of embedded systems, whereas quality attributes describe
how well the system performs and how easy it is to test, maintain, or evolve.

Q7. What are the Operational quality attributes of an embedded system? (6


Marks)
Operational quality attributes are those attributes that are directly related to the functioning
of the embedded system during operation.

Operational quality attributes


Attribute Meaning Importance

Response Measure of quickness of the system Important for real-time behavior

Throughput Rate of production or processing over time Indicates efficiency

Reliability Degree of dependable functioning Indicates trustworthiness

Maintainability Ease of handling technical issues and failures Supports serviceability

Security Protection against unauthorized access/misuse Important in connected systems

Safety Avoidance of danger to users and environment Critical in control systems

Explanation of each
Response
Indicates how quickly the system reacts.
Most embedded systems demand fast real-time response.
Throughput
Refers to the amount of work done in a given time.
It represents system efficiency.
Reliability
Indicates how much the system can be trusted for proper operation.
Related terms: MTBF and MTTR.
Maintainability
Refers to the ease of dealing with failures and technical issues.
Security
Protects system resources, data, and operation.
Safety
Prevents harm to operator, public, and environment.

Conclusion
These attributes determine how effectively and safely the embedded system performs in
actual use.

Q8. What are the Non-operational quality attributes of an embedded system? (6


Marks)
Non-operational quality attributes are quality measures that are not directly related to run-
time operation, but are very important during design, testing, deployment, and product
evolution.

Non-operational quality attributes


Testability and debugability
Ease of testing the system and identifying faults.
Evolvability
Ease of modifying or upgrading the system in future.
Portability
Ease of moving software/design to another platform.
Time to prototype and market
Speed with which a product can be designed, developed, and released.
Per unit cost and total cost
Economic feasibility of product development and production.

Explanation
These attributes are important because embedded products are not judged only by
performance. They are also judged by development speed, cost, ease of debugging, and
possibility of future enhancement.

Conclusion
Hence, non-operational attributes strongly influence product success, maintainability, and
commercial viability.
Q9. Explain the working of washing machine, an application specific embedded
system. (7 Marks)
A washing machine is a classic example of an application-specific embedded system used in
home automation.

Main parts involved


User interface / keypad
LED display
Control unit (microprocessor / microcontroller)
Water inlet valve
Water outlet
Temperature sensor
Level sensor
Motor, agitator, tub, pump, transmission, clutch

Simple block representation

User -> Keypad / selector -> Control unit -> Actuators


^ |
| v
Display Sensors feedback

Working of washing machine


1. User selects wash settings such as light, medium, heavy, wash, soak, rinse, and start.
2. The control unit receives user input through keypad and settings panel.
3. Sensors such as water temperature sensor and level sensor provide feedback.
4. Based on the selected mode and sensor feedback, the control unit drives actuators.
5. Actuators include agitator, motor, pump, and inlet valve.
6. In top-loading type, the agitator twists back and forth and moves clothes inside the tub.
7. In the next phase, water is pumped out and spin action removes water using centrifugal
force.
8. The display unit and control logic continue to manage each washing stage.

Important points
It is dedicated to one application.
It contains sensors, actuators, display, and controller.
Feedback from sensors helps automatic control.
Conclusion
Thus, the washing machine is an embedded system in which the control unit continuously
coordinates sensing, decision-making, and actuation to complete the wash cycle.

Q10. Explain the working of an automotive system, an application specific


embedded system. (7 Marks)
An automotive system is an application-specific embedded system in which electronics
control various mechanical and electrical functions of a vehicle.

Important automotive embedded applications


Instrumentation
Engine control
Fan control
Fuel injection control
Headlamp control
ABS control
Wiper control
Suspension control
Centralized locking
Power windows
Mirror control
Seat control
Airbag control
Power steering
Air conditioner

Basic architecture
Automotive embedded systems are built around microcontrollers/digital processors known
as ECUs (Electronic Control Units).

Classification of ECU
HECU – High Speed Control Unit
LECU – Low Speed Control Unit
Working principle
Sensors collect status information from the vehicle.
ECU processes this information.
Based on programmed logic, ECU generates control outputs.
Actuators then perform the required action.

Design concerns
The system is designed by considering :

fuel economy,
environmental factors,
emission standards,
safety,
comfort.

Example
In ABS control, the embedded controller monitors wheel-related conditions and takes
corrective action within strict timing limits.

Conclusion
Thus, the automotive embedded system improves safety, comfort, and efficiency by
electronically controlling multiple vehicle subsystems.

Q11. Write a note on sensors and actuators of embedded system. (5 Marks)


Sensors and actuators are basic interfacing elements of an embedded system.

Sensors
A sensor is a device that detects and responds to some type of input from the physical
environment.

Examples of sensors
Temperature sensor
Level sensor
Functions of sensors
Sense physical parameters.
Convert physical changes into electrical signals.
Provide feedback to the control unit.

Actuators
An actuator is a device that converts energy into motion or action.

Examples of actuators
Agitator
Pump
Motor
Water inlet valve

Functions of actuators
Convert control signals into physical action.
Perform the final control operation in the system.

Sensor–actuator relation

Physical world -> Sensor -> Controller -> Actuator -> Physical action

Conclusion
Sensors provide input to the embedded controller, and actuators execute the controller's
decision on the physical system.

Q12. What are the Input output subsystems of embedded system? (5 Marks)
The input-output subsystem of an embedded system consists of the components through
which the system receives information and produces output action.

Input subsystem
The input subsystem may include:

Sensors
Keypad
Switches
User interface controls
Output subsystem
The output subsystem may include:

Display unit / LED display


Actuators
Alarms
Motors / pumps / valves

Role of I/O subsystem


Accepts input from user and environment.
Sends input to control unit.
Produces response through output devices.
Creates interaction between embedded system and external world.

Example: washing machine


Inputs: keypad, temperature sensor, level sensor
Outputs: LED display, agitator, pump, water inlet valve

Conclusion
Hence, the I/O subsystem forms the communication link between the embedded controller
and the user/environment.

Q13. Explain the hardware and software co-design and the programming model.
(5 Marks)
Hardware-software co-design is a design approach in which hardware and software are
developed in coordination rather than in isolation.

Hardware-software co-design
In embedded development, system requirements are partitioned into hardware and
software parts.
Hardware engineers build the required hardware.
Software engineers develop firmware/software.
Once both are ready, integration is performed.
Due to competition and need for faster design, co-development is necessary.
Co-design flow

Product requirem ents -> System -level / functional requirem ents


-> Partition into hardware and software
-> Model behavior
-> Im plem ent firm ware and hardware
-> Integrate the system

Programming model
The processing behavior of the system is captured using computational or program models.
These models help convert requirements into implementable firmware.

Importance
Helps systematic design.
Improves partitioning of work.
Supports early modelling of behavior.
Reduces design complexity.

Conclusion
Thus, hardware-software co-design combines partitioning, modelling, and coordinated
development for efficient embedded system design.

Q14. What are the fundamental issues in hardware and software co design? (5
Marks)
The notes list four fundamental issues in hardware-software co-design.

Fundamental issues
1. Selecting the model
Choosing an appropriate computational model for system behavior.
2. Selecting the architecture
Choosing the target hardware architecture or platform.
3. Selecting the language
Choosing the implementation language for firmware/software.
4. Partitioning system requirements into hardware and software
Deciding which functions go to hardware and which go to software.
Why these are important
Wrong model may represent behavior poorly.
Wrong architecture may fail performance or cost goals.
Wrong language may increase complexity.
Poor partitioning may lead to inefficient implementation.

Conclusion
Hence, successful co-design depends mainly on model selection, architecture selection,
language selection, and correct hardware-software partitioning.

Q15. List the Computational models in embedded system design. (4 Marks)


The important computational models used in embedded system design are:

1. Data Flow Graph (DFG)


2. State Machine Model
3. Concurrent communicating process model
4. Sequential program model
5. Object-Oriented model

Significance
These models are used to capture the behavior of the embedded system before
implementation.

One-line use of each


DFG: for data-driven computation
State machine: for reactive and event-driven behavior
Concurrent model: for multitasking and real-time systems
Sequential model: for step-by-step execution flow
Object-oriented model: for modularity, reuse, and maintainability

Q16. Explain dataflow model with example. (6 Marks)


The dataflow model is a computational model in which execution is driven by the movement
and transformation of data.
Definition
It is a data-driven model.
Operations transform input data into output data.
The application is represented using data flow nodes.

Features
Suitable when computation can be expressed as flow of data.
Easy to represent mathematical transformations.
Acyclic dataflow does not contain feedback for a given set of inputs.
Feedback inputs and events lead to non-acyclic behavior.

Example
Given:

x = a + b
y = x - c

Dataflow representation

a ----\
(+) ---> x ----\
b ----/ (-) ---> y
/
c -------------------/

CDFG extension
When conditional execution is involved, the model becomes a Control Data Flow Graph
(CDFG).

Example:

If flag = 1, x = a + b
Else y = a - b

Conclusion
Thus, the dataflow model is useful for representing applications where data movement
controls execution.
Module 3 – Answers
Q1. Mention the types of operating system. (4 Marks)
Based on the notes, operating systems are broadly classified into two major types.

Types of operating system


1. General Purpose Operating System (GPOS)
2. Real Time Operating System (RTOS)

1) General Purpose Operating System (GPOS)


Used in general computing systems.
Kernel is generalized and supports generic applications.
Need not be deterministic.
May introduce random delays.
Example: Windows XP, MS-DOS.

2) Real Time Operating System (RTOS)


Used in embedded systems requiring real-time response.
Deterministic in behavior.
Consumes known amount of time for kernel operations.
Executes highest-priority task according to scheduling policy.
Example: Windows CE, QNX, VxWorks, Micro C/OS-II.

Conclusion
Thus, the main types are GPOS and RTOS, distinguished mainly by determinism and real-time
response capability.

Q2. Difference between 1) Process and thread 2) Preemptive and Non-preemptive.


(8 Marks)

1) Difference between Process and Thread


Feature Process Thread

Definition Program in execution Single sequential flow of control within a process

Nature Heavyweight entity Lightweight process

Memory Has its own memory space Shares code/data/heap of the parent process

Resources Requires CPU, memory, I/O resources Shares most process resources
Feature Process Thread

Execution Sequential Multiple threads can exist in one process

Context Has its own registers, PC, stack Has its own registers, PC, stack

Communication More complex Easier because memory is shared

Efficiency Higher overhead Better CPU and memory utilization

Important point
A process is an independent execution unit, whereas a thread is a smaller execution unit
inside a process.

2) Difference between Preemptive and Non-preemptive scheduling


Feature Preemptive Non-preemptive

CPU control Scheduler can interrupt running task Running task keeps CPU until completion/block

Responsiveness Better Lower

Real-time suitability Suitable Less suitable for strict real-time

Switching Based on time slice or priority Only after task voluntarily releases CPU

Fairness Better for multiple ready tasks May let one task dominate CPU

Example Round Robin, priority preemptive FCFS-style non-preemptive behavior

Definition of preemption
Preemption is the act of moving a running task/process into the ready queue by the scheduler
without the task requesting for it.

Conclusion
Processes and threads differ in resource ownership and execution overhead, while
preemptive and non-preemptive scheduling differ in whether the scheduler can forcibly take
back CPU control.

Q3. Mention and explain the task scheduling techniques. (6 Marks)


Task scheduling is the mechanism by which the scheduler shares CPU time among ready
tasks/processes.
Scheduling techniques
The notes emphasize preemptive scheduling and discuss common techniques such as:

1. Round Robin (RR) scheduling


2. Priority-based preemptive scheduling
3. Shortest Remaining Time (SRT) scheduling

1) Round Robin scheduling


Each process in the ready queue executes for a fixed time slice.
When time slice expires, the task is preempted.
Scheduler selects the next process in the queue.
Suitable when every task should get a chance to execute.

RR representation

P1 -> P2 -> P3 -> P1 -> P2 -> ...

2) Priority-based preemptive scheduling


Scheduler selects the highest-priority task for execution.
A newly arrived higher-priority task can preempt the running task.
Common in RTOS because urgent tasks must execute first.

3) Shortest Remaining Time scheduling


Task with least remaining execution time is selected.
If a new shorter task arrives, it may preempt the current task.

Good scheduler criteria


High CPU utilization
High throughput
Low turnaround time
Low waiting time
Low response time

Conclusion
Hence, task scheduling techniques decide how CPU is shared to achieve deterministic and
efficient operation.
Q4. Explain in detail the task synchronization issues. (6 Marks)
Task synchronization deals with coordinating concurrent access to shared resources and
maintaining proper execution order among tasks.

Why synchronization is needed


When multiple tasks run concurrently, they may try to access the same shared resource or
critical section. If not controlled, this can produce incorrect results.

Synchronization issues
Concurrent access to shared resource
Race condition / racing
Deadlock
Improper sequencing between producer and consumer type tasks

Mutual exclusion
To synchronize access to a shared resource, the critical section must be accessed exclusively.

Synchronization techniques mentioned in notes


1. Busy waiting / spin lock
2. Sleep-wakeup mechanism
3. Binary semaphore (mutex)
4. Counting semaphore
5. Event-based synchronization / notification

Binary semaphore / mutex


Allows only one process/thread to own the resource at a time.
State becomes signaled when free and non-signaled when owned.
Used for exclusive access.

Counting semaphore
Used when a resource can be shared by a limited number of tasks.
Maintains a count between zero and maximum value.
Count decreases on acquire and increases on release.
Event-based synchronization
One task waits for an event.
Another task sets the event.
Useful where tasks must execute in a required sequence.

Example
In producer-consumer type interaction:

consumer waits for producer to produce data,


producer may wait until consumer consumes previous data.

Conclusion
Thus, task synchronization ensures correctness, exclusiveness, and proper coordination
among concurrently executing tasks.

Q5. What is racing and deadlock? (4 Marks)

Racing
Racing or race condition occurs when multiple tasks/processes access shared data or
resources concurrently and the final result depends on the order of execution.

Effects of racing
Unpredictable results
Data corruption
Incorrect system behavior

Deadlock
Deadlock is a condition in which two or more tasks wait indefinitely for resources held by one
another, so none of them can proceed.

Effects of deadlock
System progress stops.
Tasks remain blocked.
Resource utilization becomes ineffective.
Difference
Racing causes incorrect results due to uncontrolled concurrent execution.
Deadlock causes complete waiting condition due to circular resource dependency.

Q6. Mention the criterions to choose an RTOS. (6 Marks)


Selection of an RTOS should be based on system requirements, resource constraints, and
development support.

Criteria to choose an RTOS


Processor support
Check whether the RTOS supports the target processor architecture.
Memory requirements
RTOS needs ROM/FLASH for OS code and RAM for working memory.
It should suit the memory constraints of the embedded design.
Real-time capabilities
Scheduling policies and deterministic behavior must match application needs.
Kernel and interrupt latency
Low latency is important in systems with high response requirements.
Inter-process communication and task synchronization support
Check availability of semaphores, mutexes, message queues, and related
mechanisms.
Modularization support
Useful when only essential modules are to be selected and OS image is rebuilt.
Networking and communication support
RTOS should support required interfaces and stacks.
Development language support
Libraries and runtime support for required languages should be available.
Custom developed or off-the-shelf
Choice depends on application need and project constraints.
Cost
Development and licensing cost must be considered.
Availability of development and debugging tools
Essential for implementation and maintenance.
Ease of use
Simpler RTOS reduces development effort.
After-sales support
Important for bug fixes, patches, and production support.

Conclusion
Hence, RTOS selection should balance timing needs, hardware support, communication
support, cost, and tool availability.

Q7. Integration and testing of Embedded hardware and firmware. (6 Marks)


Integration and testing is the stage at which hardware and firmware are brought together
and verified as a complete embedded product.

Integration
Hardware team develops the required hardware.
Firmware/software team develops firmware for the target.
Once both are ready, integration is performed.
This stage checks whether firmware correctly interfaces with peripherals, memory, I/O
ports, and registers.

Testing objectives
Verify correct startup and initialization.
Check hardware-software interaction.
Confirm timing and control behavior.
Validate response under expected operating conditions.
Detect faults in interfaces and logic.

Development environment support used in testing


Emulator
Simulator
Debugging tools
Signal sources
CRO, multimeter, logic analyzer

Importance
Integration testing is necessary because independently correct hardware and firmware may
still fail when combined.
Conclusion
Thus, integration and testing ensure that the final embedded system behaves correctly,
reliably, and according to design requirements.

Q8. With block diagram explain the embedded system development


environment. (6 Marks)
The embedded system development environment includes hardware tools and software
tools used for design, coding, debugging, and validation.

Block diagram

+----------------------+
| Developm ent Com puter |
| (Host PC) |
+----------+-----------+
|
+--------------------+--------------------+
| |
+-------v--------+ +--------v--------+
| IDE Tool | | EDA Tool |
| Firm ware dev | | Hardware design |
+-------+--------+ +--------+--------+
| |
+--------------------+--------------------+
|
+-------v--------+
| Em ulator / |
| Debug interface |
+-------+--------+
|
+-------v--------+
| Target Hardware |
+-------+--------+
|
+--------------------+--------------------+
| |
+-------v--------+ +--------v---------+
| Signal sources | | Test instrum ents |
| Input stim ulus | | CRO, DMM, LA |
+----------------+ +------------------+

Elements of development environment


Development computer / Host PC
Central system used for development activities.
IDE tool
Used for firmware development and debugging.
EDA tool
Used for embedded hardware design.
Emulator hardware
Used for debugging the target board.
Signal sources
Used to simulate inputs to the target hardware.
Target hardware debugging tools
Digital CRO, multimeter, logic analyzer, etc.
Target hardware
Final board on which the embedded application runs.

Conclusion
Hence, the development environment provides complete support for embedded hardware
design, firmware development, integration, debugging, and testing.

Q9. Write a note on embedded firmware and hardware. (8 Marks)


Embedded firmware and embedded hardware together form the complete embedded system.

Embedded firmware
Embedded firmware is responsible for controlling the various peripherals of embedded
hardware.

Features of embedded firmware


Acts as the master brain of the embedded system.
Stored in ROM / non-volatile memory.
Not alterable by end users in normal use.
Controls peripherals, memory, I/O ports, and registers.
Requires knowledge of hardware interfacing and target architecture.

Firmware development steps


1. Convert firmware requirement into program model.
2. Use UML / flowchart-based modelling if needed.
3. Capture actions and tasks using suitable language.
4. Compile/assemble, link, and generate hex file.
5. Load and test on target hardware.
Firmware design approaches
Conventional procedural / superloop based
Embedded operating system based

Embedded hardware
Embedded hardware includes the physical electronic components of the system.

Hardware elements
Processor / controller
Memory
Sensors
Actuators
PCB
Oscillator
Reset circuit
RTC and watchdog support
Input-output interfaces

Hardware role
Provides platform for firmware execution.
Interfaces with physical environment.
Performs sensing, control, and actuation.

Relationship between firmware and hardware

Em bedded hardware provides the platform .


Em bedded firm ware provides the intelligence and control.

Conclusion
Thus, hardware provides the physical system resources, while firmware gives the logic and
control required for embedded system operation.

Q10. Mention and explain the techniques of task communication. (8 Marks)


Task communication refers to the exchange of information between tasks/processes/threads.
Techniques of task communication
The notes describe the following major techniques:

1. Shared memory
2. Memory mapped object based communication
3. Message passing
4. Message queues
5. Event/notification based communication

1) Shared memory
A common memory area is shared among tasks/processes.
Large amount of data can be shared efficiently.
Requires synchronization because multiple tasks may access the same memory.

2) Memory mapped object


A memory object is mapped into the virtual address spaces of communicating processes.
Used for inter-process communication.
Example mentioned in notes: Windows CE 5.0 RTOS uses memory mapped object based
shared memory for IPC.

3) Message passing
Information is exchanged through messages.
Can be synchronous or asynchronous.
Faster and has less synchronization overhead compared to shared memory for small
information exchange.
Limitation: only limited amount of data can be passed.

4) Message queues
A sending process posts messages into a FIFO queue.
Messages are stored temporarily in a system-defined memory object.
Useful for ordered communication.

5) Event / notification based communication


One task waits for an event.
Another task sets the event.
Useful for sequence-dependent communication.
Comparison table
Technique Main idea Advantage Limitation

Shared memory Common memory area Large data transfer Needs synchronization

Memory mapped Shared mapped virtual


Useful for IPC OS dependent
object memory

Message passing Send messages Fast for small data Limited data size

Ordered Queue management


Message queue FIFO message storage
communication needed

Event notification Signal-based communication Good for sequencing Carries little/no data

Conclusion
Hence, the choice of task communication technique depends on data size, speed,
synchronization overhead, and OS support.

End Note
This document covers all Module 2 and Module 3 questions from the uploaded question bank
and answers them in an exam-oriented format using the uploaded notes as the main source
of truth.

You might also like