Every module is an electronic unit managed by a microcontroller (MCU), kind of small computer. Module has a flash memory that keeps executable code and program data. These code and data are represented by firmware files. Figure 1a explains how it may look like:
Picture 1a. FMFU memory organization
Division by ROM and EEPROM illustrated on this picture is conditional and relative to Ford Module Firmware Update process (FMFU). Both ROM and EEPROM segments are located in MCU Flash memory, but ROM segments are not available for reprogramming within FMFU. Also, the picture is simplified: there can be several ROM segments that may split EEPROM segments.
First block is always a Primary Boot Loader (PBL). PBL is usually hardcoded in ROM and cannot be reprogrammed. Its' goal is to launch (get control) when module is powered on and then load the application – executable that implements main module functionality. It also implements some basic functions to communicate with dealership equipment.
Application that implements the core module function (engine management for PCM, brake control for ABS etc) is represented by a firmware file called “Strategy”. Other firmware files contain data necessary for the work process of the application. Data can be represented by different type of firmware - “Calibration”, “Configuration” etc. For example, IPC images are stored in Calibration firmware, and BCM settings are stored in Configuration files.
Normal boot process works as the following:
1. Power is on, module MCU runs PBL
2. PBL tries to find and launch an application (executable)
3. If application is launched properly, module is online in normal mode of work.
In normal mode of work FMFU functions are not available. In order to start FMFU, module has to be switched to special programming mode and Secondary Boot Loader (SBL) has to be loaded into the RAM by diagnostic equipment. SBL unlocks flash EEPROM erase and reprogramming functions.
Normal firmware update process with FORScan works as the following:
A. Module is in normal mode of work, FORScan switches it to special programming mode, loads SBL into module memory and launches it.
B. FORScan is starting to program firmware file #1:
B.1. Open and analyse the firmware file . Firmware file contains one or more blocks.
B.2. Erase a part of module’s flash memory dedicated to this firmware file
B.3. Upload firmware file by blocks. First block is uploaded as the following:
B.3.1. Request start of the block upload from the module. Module confirms the upload and returns size of data packet size that has to be used for the upload.
B.3.2. Send the block data in packets of required size. Module has to confirm receiving every packet.
B.3.3. When the block is transferred, module returns a checksum of the received data, and FORScan compares it with the checksum available in the firmware file.
B.4. If firmware has more than one block, all subsequent blocks are uploaded in exactly the same way (steps B.3.*)
C. If more firmware files are available, they are loaded in the same way and run all the same steps (B.1…B.3).
D. When all of the firmware files are uploaded, FORScan asks the module if a valid application is available and shows result to user, then exit the programming mode.
Note: the “upload/download” terms are a bit tricky because may be used differently. It depends on how the items are “stacked”: if scanner is on the top and module is on the bottom, the process of the programming is called “downloading”, because it “flows” down. If module is on the top and scanner is on the bottom, process is called “uploading”, because it “flows” up. We consider that scanner is down so we call it “uploading”.