Embedded firmware is the control algorithm and configuration settings programmed into the memory of embedded systems, developed using high-level languages or assembly. Key components include reset circuits, brown-out protection circuits, oscillators, real-time clocks, and watchdog timers, which ensure proper functioning and reliability of the system. The PCB serves as the foundation for mounting components and testing the firmware.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0 ratings0% found this document useful (0 votes)
13 views13 pages
ESD Unit-3
Embedded firmware is the control algorithm and configuration settings programmed into the memory of embedded systems, developed using high-level languages or assembly. Key components include reset circuits, brown-out protection circuits, oscillators, real-time clocks, and watchdog timers, which ensure proper functioning and reliability of the system. The PCB serves as the foundation for mounting components and testing the firmware.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 13
Embedded Firmware
Embedded firmware refers to the control algorithm (Program instructions) and or the
configuration settings that an embedded system developer dumps into the code (Program)
memory of the embedded system.
There are various methods available for developing the embedded firmware:
1. Write the program in high level languages like Embedded C/C++ using an Integrated
Development Environment (IDE).
2. Write the program in Assembly language using the instructions supported by your
application's target processor/controller.
The process of converting the program written in either a high level language or
processor/controller specific Assembly code to machine readable binary code is called "HEX File
Creation’
The methods used for 'HEX File Creation’ is different depending on the programming
techniques used.Embedded Firmware (continued)
+ For a beginner in the embedded software field, it is strongly recommended to use the high
level language based development technique.
+ The embedded software development process in assembly language is tedious and
time consuming.
HIGH LEVEL
LANGUAGE
er
anguage
* Two types of control algorithm design exist in embedded firmware development:
+ The first type of control alg
ithm development is known as the infinite loop or ‘super loop’ based
approach, where the control flow runs from top to bottom and then jumps back to the top of the program
in a conventional procedure.
+ The second method deals with splitting the functions to be executed into tasks and running these
tasks using a scheduler which is part of a General Purpose or Real Time Embedded Operating System
(6POS/RTOS),Other System Components
* The other system components refer to the components/circuits/ICs which are necessary
for the proper functioning of the embedded system
+ E.g.: Watchdog timer, Reset IC (or passive circuit), brown-out protection IC (or
passive circuit), etc.
1. Reset Circuit
+ The reset circuit is essential to ensure that the device is not operating at a voltage
level where the device is not guaranteed to operate, during system power ON.
* The reset signal brings the internal registers and the different hardware systems of
the processor/controller to a known state and starts the firmware execution from
the reset vector.
+ Normally from vector address 0x0000 for conventional processors/controllers,
+ The reset signal can be either active high or active low.Reset Circuit (continued)
external passive reset circuit - Capacitor and
Resistor
Select the reset IC based on the type of reset
signal and logic level (CMOS/TTL) supported
by the processor/controller in use.
* Figure illustrates a resistor capacitor based
passive reset circuit for active high and low
configurations.
+ The reset pulse width can be adjusted by
changing the resistance value R and Figs RC basedreset cuit
capacitance value C.2. Brown-out
Protection Circuit
* Brown-out protection circuit prevents the processor/controller from unexpected
program execution behaviour when the supply voltage to the processor/controller falls
belowa specified voltage.
+ Itis essential for battery powered devices.
+ Itmay lead to situations like data corruption.
* A brown-out protection circuit holds the processor/controller in reset state, when the
operating voltage falls below the threshold, until it rises above the threshold voltage.Brown-out Protection Circuit (continued)
+ Figure illustrates a brown-out circuit implementation using
Zener diode and transistor for processor/controller with
active low Reset logic.
+ The Zener diode D,and transistor Q forms the heart of this circutt.
+ The transistor conducts always when the supply voltage Vccis greater
than that of the sum of Vseand V; (Zener voltage). +
* The transistor stops conducting when the supply voltage falls below =” “TS
the sum of Vecand Vs.
+ Select the Zener diode with required volta
threshold value for V,
for setting the low
+ The values of R1, R2, and R3 can be selected based on the electrical Fit,
characteristics ofthe transistor in use.
+ Microprocessor Supervisor ICs like DS1232 from Maxim also
provides Brown-out protection.com
3. Oscillator Unit
The instruction execution of a microprocessor/controller occurs in syne with a clock
signal
The oscillator unit of the embedded system is responsible for generating the
precise clock for the processor.
Quartz crystals and ceramic resonators
The speed of operation of a processor is primarily dependent on the clock frequency.Oscillator
Unit (continued)
The total system power consumption is directly proportional to the clock frequency.
The accuracy of program execution depends on the accuracy of the clock signal
The accuracy of the crystal oscillator or ceramic resonator is normally expressed in
terms of +/-ppm (Parts per million).
Figure illustrates the usage of quartz crystal/ceramic resonator and external
oscillator chip for clock generation
f
=
ryusing quartz crystaland quar4. Real- Time Clock (RTC)
+ Real-Time Clock (RTC) is a system component responsible for keeping track of time
= un en iy
iM] cD
+ RICis oie’ to function even in the absence of power. SUNDY
* RTCs are available in the form of Integrated Circuits from different semiconductor
manufacturers like Maxim/Dallas, ST Microelectronics ete.
+ The RTC chip contains a microchip for holding the time and date related information and
backup battery cell for functioning in the absence of power, in a single IC package.
+ For Operating System based embedded devices, a timing reference is essential for
synchronizing the operations of the OS kernel5. Watchdog Timer
+ A watchdog timer, or simply a watchdog, is a hardware timer for monitoring the
firmware execution and resetting the system processor/microcontroller when the
program execution hangs up.
* Depending on the internal implementation, the watchdog timer increments or
decrements a free running counter with each clock pulse and generates a reset signal
to reset the processor if the count reaches zero for a down counting watchdog, or the
highest count value for an up counting watchdog
WDT TimerWatchdog Timer (continued) @ @ oe
* If the watchdog counter is in the enabled state, the firmware can write a zero to it
before starting the execution of a piece of code and the watchdog will start counting.
* If the firmware execution doesn't complete due to malfunctioning, within the time
required by the watchdog to reach the maximum count, the counter will generate a
reset pulse and this will reset the processor.
* If the firmware execution completes before the expiration of the watchdog timer
you can reset the count by writing a 0 to the watchdog timer register.
* Most of the processors implement watchdog as a built-in component and provides
status register to control the watchdog timer and watchdog timer register for writing
the count value.
* If the processor/controller doesn't contain a built in watchdog timer, the same can be
implemented using an external watchdog timer ICWatchdog Timer (continued)
+ The Microprocessor supervisor IC DS1232 integrates a hardware watchdog timer init.
+ In modern systems running on embedded operating systems, the watchdog can be
implemented in such a way that when a watchdog timeout occurs, an interrupt is
generated instead of resetting the processor.
+ The interrupt handler for this handles the situation in an appropriate fashion
* Figure illustrates the implementation of an external watchdog timer based
microprocessor supervisor circuit for a small scale embedded system.
ig: Watchdog timer forPCB and Passive Components
Printed Circuit Board (PCB) is the backbone of every embedded system.
After finalising the components and the inter-connection among them, a schematic
design is created and according to the schematic, the PCB is fabricated
PCB acts as a platform for mounting all the necessary components as per the design
requirement.
Also it acts as a platform for testing the embedded firmware.
Apart from the subsystems mentioned already, passive electronic components like
resistor, capacitor, diodes, etc. are also found on the board