Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 55 Current »

It is assumed that the reader has working knowledge of how to program the product being used, and the product's features.

1. Overview

The Flashtool application provides the user with the ability to create, modify, and write flash content onsemi Imaging devices that support SPI flash and EEPROM memory.

When you start FlashTool, if a device is attached it will detect it and then load the appropriate SDAT file(s).
If no device is attached, you'll be able to manually load the appropriate SDAT file(s).

Here's a link to a "Tech Note" on NVM Record sizes.

2. Sensor Info Tab

The Sensor Info tab is presented first. This dialog lets you load the appropriate SDAT file(s) for the device you'll be working on.

It also presents some operational notes about the 2 other tabs - "Configuration" and "Generate Image and Program".
For example, if you want to program an existing binary file, simply select the "Generate Image and Program" tab.



Sensor Data File (.xsdat or .sdat)

The sensor data file is used by the application to convert the symbolic names of sensor registers and variables to numeric addresses.
ISP products (e.g. AP0102AT) have 2 SDAT files - one for the baseboard and another for the attached sensor.
SOC products (e.g. ASX350AT) have only 1 SDAT files.

3. Configuration Tab

The Configuration tab is where you load the configuration file (.fcfg), or FCFG file. It is also enables navigation to the various Table types via the "Select Table" Radio buttons.

3.1 Configuration File

FlashTool uses a text based file which describes the structure and content of the flash image. When the content of the flash has been specified, it can be saved into a configuration file through the Save and Program Page. A previously saved configuration file can be loaded into the tool in order to update its contents.
Although FlashTool has the ability to add Comments when creating and editing records, the user may manually add comments to any area of the configuration file; simply start each line with "#@" to indicate a user comment.

It is NOT recommended that users added FCFG commands manually - use the GUI!

There are per-product sample files located in the folder "flashtool" under the installation folder.


One thing to note is that not all sections are valid for all products, and they must be placed in a specific order;

Most ProductsAP0101 / AP0201/2 Only
INIT_TABLEINIT_TABLE
CALIBRATION_INIT_TABLECALIBRATION_INIT_TABLE
PATCH_INIT_TABLEPATCH_INIT_TABLE
DEWARP_INIT_TABLE or STE_INIT_TABLEPATCH_TOC
OVERLAY_INIT_TABLECOMMAND_SEQ_TOC
PATCH_TOC
OVERLAY_BITMAP_TOC
OVERLAY_STRING_TOC
COMMAND_SEQ_TOC 
DEWARP_CONFIG_TOC or STE_CONFIG_TOC
OVERLAY_COLORLUT_TOC
OVERLAY_USERCHAR_TOC

3.2 Tables

The "Select Table" section is used to select the Table that you want to modify.
Note: Distortion and Graphics Overlay do not apply to AP0101 and AP0201/2 products.

  • Global; contains register and variable settings that don't apply to the other specific areas (such as Patch or Calibration).
  • Patch; contains patches (some recommended, some optional on per-feature basis) to be applied.
  • Calibration; contains settings that are specific to calibration.
  • Distortion Correct; settings for devices that support distortion correction (also know as "DeWarp").
  • Graphics Overlay; settings to define overlays available to the product.
  • Command Sequence; settings where specific Host Commands can be defined.Vendor Specific; allows definition of custom records types.

3.3 General Table Controls and Displays

Each table contains a set of general controls to manipulate records on the far-right side.
Note: "Insert From Fcfg" doesn't apply to "Command Sequence" nor "Vendor Specific".

Each table contains a common display of the Record list on the right and the Details of the Selected Record on the left.
Some dialogs, such as Patch, Distortion Correction, and Graphics Overlay, will have an additional display at the bottom for specific items related to their operation.

The up and down arrows in the middle allow for the movement of individual records within their table; select the record to be moved, and use the arrows to move it.

3.3.1 Convert INI

This dialog lets you load INI file Preset data from an INI file, or copy/paste the info.  When using "Load Text", you must include the preset name as the first line.

Once loaded, select "Convert" to convert to records, and then "Add and Close" to add the records.

3.3.2 Add New Record

This dialog lets you create new records of various types. Select the Type, and the "Usage" will appear in the upper dialog.

You can optionally add comments in the "Record Comments" section, but you add the record data in the "Record parameters"  section.
Note: selecting "Command" record type opens an additional pull-down dialog for you to select the actual command.

3.3.3 Insert from Fcfg

This dialog will add the records as defined in a .fcfg file.  Note that the entire .fcfg file contents will be added as there is no way for FlashTool to determine which record types would apple to the given Table.

3.3.4 Edit Record and Delete Record

Self-explanatory really; edit or delete existing records.  Note: no warning is given when selecting "Delete Record", and there is no "Undo" function.

3.4 Global Table

This dialog is used to define register and variable settings that don't apply to the other specific areas (such as Patch or Calibration).

3.5 Patch Table

In this table specify the list of firmware patches that need to be included in the flash image. Please note that when you locate a .bin file which includes the patch, the tool will also look for a file with a similar name ending with the extension .info. The .info file has to be the correct information file for the intended patch file.

Select the Command "Load_Patch" to create the record and use the associated index from the "Patch Table", and then add the associated patch to match that record.
Use "Rel. Path" to use a path relative to the FCFG file; not selecting this will use the full path.

3.6 Calibration Table

This table contains the calibration-specific settings for the device.

3.7 Distortion Correction Table

This table contains records for defining multiple Lens Distortion Correction settings. This will contain with DeWarp or STE Command records, and associated Lens Distortion Correction Table entries (either from .bin or .xml files) as created by either the Distortion Correction or STE plugins.

Each of the assets that have been included in their corresponding tables will be referenced using their index number. The indexes start with 0. A host command which makes use of one of these assets will use as part of its parameter list a reference to the asset index in the appropriate table.

Use "Rel. Path" to use a path relative to the FCFG file; not selecting this will use the full path.

It is assumed that the reader of this document has understanding of the Lens Distortion features and controls of the product they are working on.

3.8 Graphics Overlay

This table lets you define the records for load of the various types of overlays; Bitmaps, Strings, and Userchar.

  • Bitmap; use this table to specify the list of graphics overlay bitmap file paths that need to be included in the flash image. The bitmap files have to be in Aptina RLE format, and they can be created using DevWare or makeover.exe.
  • String; use this table to specify the list of graphics overlay string file paths that need to be included in the flash image. The string files have to be in binary format. They can be created using DevWare.
  • Userchar; use this table to specify binary file containing the "Userchar" settings.

Use "Rel. Path" to use a path relative to the FCFG file; not selecting this will use the full path.

It is assumed that the reader of this document has understanding of the Overlay features and controls of the product they are working on.

3.9 Command Sequence

This table lets you define individual sequences of commands. Start by add a new Sequence in the "Sequences" dialog.
Select it, and then added the individual commands to be contained in that sequence via the "Add New Record" button.

Navigate between sequences via the "Sequences" table.

3.10 Vendor Specific

Use this dialog to define records specific to a vendor's definition. Then use "Edit Record" to customize the record.

Vendor-Specific Records in Initialization Tables
The flash contents specification defines the VENDOR_SPECIFIC_00 to VENDOR_SPECIFIC_15 record types, which may contain any arbitrary data of your choosing. When creating a vendor-specific record, select the sub-type of the record from 00 to 15, and enter the data in the Parameters window as a list of byte values.
Unfortunately, as of this writing, the firmware on the Aptina SOC chips does not recognize the vendor-specific record type, and triggers an error condition if it encounters one. It is possible to include vendor-specific records in an initialization table if the vendor-specific records are preceded by a Command record

  • Config_Command_Seq_Processor 0

and followed by the command record

  • Config_Command_Seq_Processor 1

That will turn off error checking and allow the firmware to skip over the vendor-specific records without generating an error condition. The Flash Tool does not automatically generate these Command records, you have to enter them.
Vendor-Specific Records Outside of Tables
It is also possible to put vendor-specific records at user-defined addresses in the flash memory, outside of any tables. To do this, select the Vendor-Specific button at the lower left of the window, and add the records to the list.
Note that the first parameter of an out-of-table vendor-specific record is the address where it is to be placed in flash. This is different from an in-table record where the only parameters are the data. The address must be greater than 0x00000030 so it does not interfere with the main Table of Contents. The Flash Tool will make sure the init tables and other flash data do not overlap the out-of-table records. If you create more than one vendor-specific record, you must ensure that they do not overlap.

3.11 How to create an initialization sequence

How to create an initialization sequence

  1. Select the table: select one of the tables Global, Patch, Calibration, Distortion Correction or Graphics Overlay.
  2. Create records: records can be created either directly by pressing the button New, or by importing DevWare presets using the Import button.
    1. Import


The import dialog allows the user to create flash records out of DevWare presets. Importing can be done either from an INI file or by directly typing or pasting text into the dialog window using the Load Text option.
If section presets are detected, the content of the preset can be viewed in the Preset Contents window. Some notes on using a text file with a Preset:

  • The preset must have a standard name in brackets; for example, "[Timing settings]".
  • Only lines that can be converted into flash records will be displayed; other lines are ignored.
  • Lines will only be processed until the next preset name is found, or end-of-file is reached.

Pressing the Convert button will cause the tool to display the converted records. Until you press the Add and Close button, these records will not be added to the flash content.
The tool attempts to group the individual preset lines into a single flash record, in order to reduce the overhead associated with the record structure. The order of preset lines is maintained during the conversion process.

During the conversion process the above warning message may be displayed. This warning indicates that that records that perform operations on bitfields were detected. The warning does not indicate a problem, but only the fact that the syntax for specifying the value to be written is different between the DevWare presets and the flash tool. This is only important if you are trying to verify the conversion process and notice a change in the values used in the bitfield records.

    1. New Record


Select the type of record. You may add comments in the comments section, and the parameter list in the Record Parameters section, if applicable. The top most section will show some helpful hints about the selected record type, and any additional information.
For records which require numeric parameters, you may enter a sequence of parameters as necessary with a space or a comma delimiter between them.
The Test button allows you to verify the record in terms of consistency of the parameter list with the requirements for the record. If an incorrec number of parameters is provided for the record you will get an error.
When finished press the Finish button in order to insert the new record into the selected table.
Once the records of a table have been created it is possible to change their relative location by uding the Up and Down arrow buttons. It is also possible to edit or delete records as necessary.
In order to view the content of a record, select it. Its contents will be displayed inside the window Details of Selected Record. The record content will be displayed in the format of the configuration file which the flash tool uses to store and restore its contents.
Comments that may have been entered for the record will appear at the top of the record details where each comment line starts with the symbols #@.

4 Generate Image and Program Tab

This page allows the user to define the Memory Device parameters,  produce a binary image for the current configuration, and program the flash with a previously created flash image.

Note: "Generate Configuration from Image" is available only to onsemi employees; please contact them if you need these features.

4.1 Configure Memory Device

The the Memory Type (SPI Flash or EEPROM), the memory and maximum image sizes, and sector/block and page sizes.  Memory type options associated with the selected device are displayed.

4.2 Generate Image

4.2.1 Image Type

Choose Base Image to create a complete image, which includes all tables and assets. This option is necessary in order to produce a valid initial flash image.

Choose Image Extension in order to produce a binary image of the assets only. This includes the patches, graphics overlay bitmaps and strings, and distortion correction configurations. An extension file is needed in order to add assets into an existing base image.

Choose Global Offset to produce a binary image that begins at a starting address greater than zero.  Allows for the binary image to be customized offline.

4.2.2 Enable Spaces Mode 

Adds extra Blank Records in the Table of Contents, Init Table, and all COMMAND_SEQ_V1. This allows extensibility after initial programming, but is a change from the original format. Please refer to Encoding Specification Section 6.4 for details.

The mode status is displayed on the main dialog screen (top-center). If this mode is enabled, a warning dialog will appear when the "Generate Binary Image" button is pressed, with the option to cancel the operation.

Note: this mode is not applied to the configuration file.

4.2.3 Memory Map

Enabling this will create a text file that contains a map of where in binary each item is located.  The file will stored in the same location as the binary image.

4.2.4 Set Memory Map

This dialog allows you to specify specific locations for each of the Tables and TOC (Table of Contents).

The "Help" button displays the binary image format.

4.2.5 Generate Binary Image

Select to generate a binary image (.bin) of the flash memory configuration. This image can be written into flash using this or other tools. Note; if Spaces Mode is enabled (see "Global Settings/Enable Spaces Mode"), a warning dialog will appear when the "Generate Flash Image" button is pressed, with the option to cancel the operation

4.3 Program Memory Device

This dialog is used to write a binary file to the attached device using the parameters in the "Configure Memory Device" section.
Note: the fields will be greyed-out if no device is attached.

Start Address - Specify the flash address to begin writing the image to.
Erase Before Writing - The flash device content will be erased prior to programming the new content into it. Uncheck to suppress erasing the flash device content, this may be desirable if the area in the address space of the device has been erased before.
Program Image into Flash - Select the button to write an existing image to flash.

4.3.1 Post Program

Use the "Verify" button to compare the binary file data to what has just been write to the device.

Use the "Reset Sensor" button to perform a Reset procedure on the attached device.

4.4 Advanced

The Advanced area contains a couple of useful features.

4.4.1 Read Image from Flash

Select the button to read the flash memory image and save it to a binary (.bin) file.

4.4.2 Generate Configuration from Image

These features are internal-only due to their detailed nature of their usage and/or resulting files, the operation of which is best left to onsemi personnel.

There are 2 options here;

  • Convert .bin to .fcfg File; this operation will decode the information in the given binary file and create an associated FCFG file.
    Note that resulting file will not be an exact match to the original FCFG file; comments, original patch file names, and other items are not stored in the binary file.
    And if an STE Transform was present, an XML file will be created but the FW Variables will be placed in the FCFG and not in the XML file.
  • Convert current .fcfg to DevWare .ini File; this operation converts the FCFG commands in to the associated INI file commands.
    The resulting INI file can then be used within DevWare with the product.
    Note: This option is for debugging purpose only. The programming structure between FCFG and INI file is different. Not all Host command is supported by flashtool. User should use the converted INI file together with DevWare Host Command Interface plugin to get the correct results.

5 Miscellaneous Controls and Displays

The top row of FlashTool displays some useful information, as well as has a few more buttons.

On the right-hand side, the selected product and its revision are displayed.
Also, the Total number of records is displayed, along with the "Space mode" status.

5.1 Advanced Configure

The "Advanced Configure" button enables controls to add multiple configurations to be included in a single binary image.

When enabled, 3 additional buttons appear;

  • Add Configurations; this button creates additional "Configuration" tabs where new FCFG files can be loaded or created.
    Each tab represents a full and unique configuration.
  • Open .mfcfg File; opens the configuration file that contains the list FCFG files and loads them in the order listed in the file.
    This file can be edited manually to adjust the load order of the FCFG files.
    Note: each line includes the full-path to the FCFG file, so a valid path must be maintained.
  • Save .mfcfg File; save the current list of FCFG files opened in FlashTool.
    The order in which each tab was created is preserved.

Once the content and order of the FCFG files is completed, use the "Generate Image and Program" tab to create the single binary image.

Note that when using this feature that "Set Memory Map" will be ignored.

5.2 Other Buttons

The remaining buttons are

  • About; displays the version information.
  • Help; opens this Web site.
  • Exit; exits FlashTool

6 Recovery from Corrupted Binary

If the sensor headboard fails to accept new programming, it could be due to a corrupted binary.

The following procedure can be used to cause the part to reboot and bypass the programmed image.
Note: this procedure applies to all parts except MT9V126/7/8.

  1. Start DevWareX and "Probe" to identify the part. When the "Startup Wizard" dialog appears, deselect all options and select "Finish".
  2. In the Registers dialog, select the "SYSCTRL Registers" page.
  3. Set Register 0x20 bit 5 to 1; this will disable access to the Flash/EEPROM.
  4. Toggle Register 0x1A bit 0 on/off; this preforms a soft reset on the sensor.
  5. Verify that Register 0x1C = 0x3000; indicates a successful reboot.  Leave DevWareX running.
    Note: Register 0x1C is "Reserved" and can only be read via "View / Register All Access (Peek & Poke) / Simple Register".
  6. Run FlashTool and attempt to program the Flash/EEPROM.
  7. Select "Verify" to ensure the binary was programmed correctly.
  8. Go back to DevWareX and clear Register 0x20 bit 5 and toggle Register 0x1A bit 0 on/off.
  9. From the Command Menu item, select "Check Sensor State", then select "Play" - you should see a stream image.

7 Clearing Out Flash/EEPROM

An "empty" binary image is provided to clear-out the Flash/EEPROM device.

It is located in the based "flashtool" folder, "blank.bin".  The binary is actually 6 bytes of 0, which the FW will recognize as unprogrammed / in host mode.

Follow the regular programming settings, and select blank.bin as the file to program.


  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.