Firmware (Software for Hardware)

 Embedded Firmware Design Document


Firmware is often referred to as “software for hardware”. Firmware provides instructions to help hardware start up, communicate with other devices, and perform basic input/output tasks. 

There are typically three levels of firmware:

  1. Low-level firmware: This firmware is usually stored in non-volatile memory chips like read-only memory (ROM) and one-time programmable (OTP) memory. These chips cannot be rewritten or updated, and the firmware is intrinsic to the hardware, such as a computer.
  2. High-level firmware: This firmware is deployed within flash memory chips and comes with more complex instructions that allow updates to be made.
  3. Subsystems: These are semi-independent devices that are part of a more extensive system. Firmware at this level is embedded within central processing units (CPUs), flash chips, and liquid crystal display (LCD) units.

Types of firmware : 


BIOS (Basic Input/Output System) :-


The Basic Input/Output System (BIOS) has been a critical component of computers since the very early days. The BIOS sits on a chip in a computer’s motherboard and issues a set of instructions that enables the device’s operating system to load. It is also responsible for looking after a device’s hardware components and ensuring they function correctly upon startup.

When a computer is turned on, the BIOS launches instructions that check the machine’s startup process for potential errors. It starts by checking the random access memory (RAM) and processor for faults, then checks connected devices, such as a keyboard and mouse, for any problems. It then checks for a boot sequence, such as Boot from Compact Disc Read-Only Memory (CD-ROM) and Boot from Hard Drive. Finally, the BIOS connects to the bootloader program, which wakes up the computer’s operating system and loads it in the RAM.

Aside from the device startup process, the BIOS is responsible for checking the Complementary Metal Oxide Semiconductor (CMOS), which is a piece of memory that stores BIOS settings, and other chips on a device. It also checks signals that are sent to the RAM, such as when a user presses a key, to help the operating system understand what action to take. 


EFI (Extensible Firmware Interface) :-

Extensible Firmware Interface (EFI) is a new generation of firmware that issues the instructions that a device’s CPU uses to start the hardware and initiate the bootloader. EFI is a replacement for BIOS and is used in new computers. It offers advantages like ensuring a device only boots trusted software and other cybersecurity benefits.

The original EFI firmware is used in Macs and can only support Intel processors. Unified EFI (UEFI) is a piece of firmware designed to replace the BIOS in new Windows computers and supports AMD and Intel processors. UEFI is used to load and start up operating systems in devices that run Windows 8 and beyond.   


1. Introduction
Provide an overview of the embedded system and the purpose of the firmware. Describe the key objectives, target hardware platform, and the intended audience of the document.

2. System Architecture
Explain the overall architecture of the embedded system, highlighting the role and interactions of the firmware. Include block diagrams or flowcharts to visually represent the whole system.

3. Functional Requirements
List and describe the functional requirements that the firmware should fulfill. Each requirement should be clearly defined and mapped to specific features or behaviors of the firmware. Include relevant use cases or scenarios to illustrate the desired functionality.

4. Non-functional Requirements
Specify the non-functional requirements that the firmware should meet. This may include performance expectations, memory constraints, power consumption targets, and any specific standards or certifications to comply with.

5. High-Level Design
Present the high-level design of the firmware, outlining its main modules, interfaces, and data structures. Discuss the architectural patterns or methodologies used and explain how they contribute to achieving the desired functionality and maintainability.

6. Detailed Design
Provide a more in-depth description of each firmware module. For each module, include the purpose, inputs, outputs, and internal logic. Document the algorithms, data structures, and relevant configuration parameters used within each module.

7. Communication Interfaces
Detail the communication interfaces employed by the firmware, both for internal communication between firmware components and external communication with other devices or systems. Specify the protocols, message formats, and any relevant timing or synchronization requirements.

8. Error Handling and Exception Handling
Describe how the firmware handles errors, exceptions, and unexpected situations. Explain the strategies for error detection, error recovery, and fault tolerance. Include any error codes or error reporting mechanisms used.

9. Testing and Verification
Outline the testing approach and methodologies to be used for verifying the firmware's functionality. Document the test cases, including inputs, expected outputs, and any specific test configurations or environments. Specify the tools or frameworks used for automated testing, if applicable.

10. Deployment and Maintenance
Provide guidelines for deploying the firmware onto the target hardware platform. Include instructions for firmware flashing, configuration settings, and any dependencies or preconditions. Describe the recommended maintenance practices, such as version control, bug tracking, and release management.

Comments

Popular posts from this blog

Setting up a USB thermal printer with a Raspberry Pi 3B+

Autostart an app on reboot - Raspberry Pi

Basic Input/Output C Program