Flash Writer Implementation for Embedded Systems

Developing a Robust Flash Memory Programming Solution for Multi-Core Boot Systems

By Myung Guk Lee in Theme Features

April 29, 2024

Project Overview

Developed a sophisticated Flash Writer application for initializing flash memory in new embedded systems. This critical tool enables the programming of secondary boot loaders (SBL) and establishes the foundation for multi-core boot sequences.

Technical Architecture

Boot Sequence Architecture

The boot sequence follows a carefully orchestrated process, starting from ROM and progressing through multiple stages:

Boot Sequence Architecture Figure 1: Complete boot sequence flow showing ROM, Flash Writer, and SBL stages

Flash Writer Operation Flow

Initial Download Phase

Flash Writer Download Process Figure 2: Flash Writer download and initialization sequence

SBL Programming Phase

SBL Download Process Figure 3: Secondary Boot Loader download and programming sequence

RTOS Loading Phase

RTOS Download Process Figure 4: RTOS/Bare Metal application loading process

How to implment the flash writer

  • Step 1: Active SPI HW block and Read SFDP(Serial Flash Discoverable - Parameter) on the flash memory
  • Step 2: Allocate Input/Output Queue memory for Serial IO communication, and init UART port.
  • Step 3: Init the UART port such as baud rate, pins enable and register the Input/Output queue with TX/RX DMA channels.
  • Step 4: Open the UART port and waiting a message from an host PC.
  • Step 5: When a message is received, it decodes the command ID and processes it according to the command ID.
  • Step 6: All messages are transfered from the PC successfully, then try to load the SBL written on the flash memory into a RAM memory.
  • Step 7: Start the SBL by call from the entry point of the SBL loaded into the RAM memory.

Conclusion

The Flash Writer serves as a critical initial programming tool specifically designed for downloading and writing the Secondary Boot Loader (SBL) into blank flash memory via UART communication. Its role is temporary but essential in the boot sequence initialization.

Primary Functions

Flash Writer Role Figure: Flash Writer’s role in boot sequence initialization

Posted on:
April 29, 2024
Length:
2 minute read, 292 words
Categories:
Theme Features
Series:
Embedded Systems Boot Systems
Tags:
Flash Memory Bootloader Embedded Systems RTOS System Programming
See Also:
PCIe AHCI Device Driver Development