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 (The IDE will contain an editor,
compiler, linker, debugger, simulator, etc. IDEs are
different for different family of
processors/controllers. For example, Keil micro
vision3 IDE is used for all family members of 8051
microcontroller, since it contains the generic 8051
compiler C51).
2. Write the program in Assembly language using the
instructions supported by your application’s target
processor/controller ,assemble link and load
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
• The reset signal to the processor can be applied
at power ON through an external passive reset
circuit comprising a Capacitor and Resistor or
through a standard Reset IC like MAX810 from
Maxim Dallas
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 below
a specified voltage.
• It is essential for battery powered devices
since there are greater chances for the battery
voltage to drop below the required threshold.
• The processor behaviour may not be predictable if the
supply voltage falls below the recommended operating
voltage. It may 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.
• Certain processors/controllers support built in brown-
out protection circuit which monitors the supply
voltage internally.
• If the processor/controller doesn’t integrate a built-in
brown-out protection circuit, the same can be
implemented using external passive circuits or
supervisor ICs
Oscillator Unit
• The instruction execution of a microprocessor/
controller occurs in sync with a clock signal.
• The oscillator unit of the embedded system is
responsiblefor generating the precise clock for
the processor.
• Certain processors/controllers integrate a built-
in oscillator unit and simply require an external
ceramic resonator/quartz crystal for producing
the necessary clock signals.
Watchdog Timer
• A watchdog timer, or simply a watchdog, is a
hardware timer for monitoring the firmware
execution.
• It reset the system processor/microcontroller
when the program execution hangs up.
• 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
programmer 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.
• If the processor/controller doesn’t contain a
built in watchdog timer, the same can be
implemented using an external watchdog
timer IC circuit.
• modern systems running on embedded
operating systems, the watchdog canbe
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.