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

Version 1 Next »








Demo Headboard EEPROM
Revision: 4.0.0
Date: January 31, 2011
TABLE OF CONTENTS
1.0 Overview
2.0 Format
3.0 Types of Data
3.1 Headboard ID
3.2 Sensor ID
3.3 Lens Type
3.4 Time Stamp
3.5 Hardware Lens Shading Correction (PGA) Setting
3.6 Software Lens Shading Correction (SWPGA) Setting
3.7 Hardware Color Correction (CCM) Setting
3.8 Software Color Correction (SWCCM) Setting
3.9 Software Stereo Alignment (SWSTEREO) Setting
3.10 ICP-HD Scratchpad Calibration Data
4.0 miprom Tool
4.1 List the data records in the EEPROM
4.2 Convert the settings in the EEPROM to an ini file
4.3 Add or change the headboard ID record
4.4 Add or change the sensor ID record
4.5 Add or change the lens type record
4.6 Add or change the time stamp to the current time
4.7 Add a hardware lens correction setting from an ini file
4.8 Add a software lens correction setting from an ini file
4.9 Add a hardware color correction setting from an ini file
4.10 Add a software color correction setting from an ini file
4.11 Add a software stereo alignment setting from an ini file
4.12 Add a scratchpad data record from from an XML file
4.13 Delete all data records in the EEPROM
4.14 Delete a specific data record
4.15 Dump the contents of the EEPROM to the console
4.16 Copy the contents of the EEPROM to a binary file
4.17 Copy a binary image from a file to the EEPROM
5.0 DevWare
5.1 Loading Data from EEPROM with Ini File Commands
5.2 EEPROM Presets Dialog
5.2.1 Load: Load a Preset
5.2.2 Save: Update a Preset
5.2.3 New: Add a New Record
5.2.4 Delete: Delete a Record
5.2.5 Rename: Rename a Preset

Overview

Aptina Demo System sensor headboards have an 8KB EEPROM which can be used to store information for that particular headboard.
This document describes what kinds of data can be stored in the EEPROM, and how to use the software tools.



Format

The EEPROM has 8K addresses, from 0x0000 to 0x1FFF. The address range is divided into two areas. The addresses from 0x0000 to 0x1FEF are used for variable length records. Most of the data stored here will be sensor image tuning settings. The addresses from 0x1FF0 to 0x1FFF are reserved for use by the auto-detect feature of DevWare or other special use by the software. The meaning of these bytes is sensor-specific, and not discussed in this document. The rest of this document discusses the variable-length records stored in the first address range.
The first five bytes will be programmed with the values 0x4D 0x49 0x45 0x45 0x01. If those bytes don't have those values then the device is considered to be unformatted and empty. If the bytes match those values then it is formatted.
The data records are stored one after the other starting at address 0x0005. Each record begins with a record type byte to identify the type of data followed by a two-byte length, followed by the record data itself. The length is stored in big-endian byte order. The length does not include the record type byte or the length field bytes, only the data payload length. A record type byte of 0xFF marks the end of the data. There is no length field after 0xFF.

Types of Data

The following sections describe the different types of data that can be stored in the EEPROM.

Headboard ID

An ASCII string intended for a headboard serial number. There should be only one headboard ID record in the EEPROM.

Sensor ID

An ASCII string. Could be used as a copy of the sensor FuseID. There should be only one sensor ID record in the EEPROM.

Lens Type

An ASCII string intended for a description of the lens. There should be only one lens type record in the EEPROM.

Time Stamp

An ASCII string intended to hold the date and time in UTC when the factory settings were written to the EEPROM. There should be only one time stamp record in the EEPROM.

Hardware Lens Shading Correction (PGA) Setting

There are two types of lens shading correction record, the hardware setting and the software setting. A hardware PGA setting is a list of register addresses and values. This type is intended for SOC devices or stand-alone sensors that have a lens shading correction block in hardware.
There can be any number of PGA settings in the EEPROM. Each PGA record includes a label that can be up to eight characters in length. The label for the factory default PGA setting is FACTORY. Users should not delete the factory settings.

Software Lens Shading Correction (SWPGA) Setting

A software PGA setting is a list of DevWare internal variable values that control the lens shading correction in the DevWare software color pipeline. This type is intended for stand-alone sensors that do not have a lens shading correction block in hardware.
There can be any number of SWPGA settings in the EEPROM. Each SWPGA record includes a label that can be up to eight characters in length. The label for the factory default SWPGA setting is FACTORY. Users should not delete the factory settings.

Hardware Color Correction (CCM) Setting

There are two types of color correction record, the hardware setting and the software setting. A hardware CCM setting is a list of register addresses and values. This type is intended for SOC devices that have color correction in hardware.
There can be any number of CCM settings in the EEPROM. Each CCM record includes a label that can be up to eight characters in length. The label for the factory default CCM setting is FACTORY. Users should not delete the factory settings.

Software Color Correction (SWCCM) Setting

A software CCM setting is a list of DevWare internal variable values that control the color correction in the DevWare software color pipeline. This record type is intended for stand-alone sensors that do not have color correction in hardware.
There can be any number of SWCCM settings in the EEPROM. Each SWCCM record includes a label that can be up to eight characters in length. The label for the factory default SWCCM setting is FACTORY. Users should not delete the factory settings.

Software Stereo Alignment (SWSTEREO) Setting

A software stereo setting is a list of DevWare internal variable values that control the alignment of stereo images in the DevWare software color pipeline. This record type is intended for stereo headboards.
There can be any number of SWSTEREO settings in the EEPROM. Each record includes a label that can be up to eight characters in length. The label for the factory default SWSTEREO setting is FACTORY. Users should not delete the factory settings.

ICP-HD Scratchpad Calibration Data

A scratchpad record is a scratchpad_calib section of an XML file as used by DevWare to initialize ICP-HD. The scratchpad data is intended to be loaded only at a particular point in the ICP-HD startup procedure.
There can be any number of SWSTEREO settings in the EEPROM. Each record includes a label that can be up to eight characters in length. By convention, the label is the ICP-HD model ID as four hex digits, '0EC1'.

miprom Tool

Miprom.exe is a versatile command line tool for programming the EEPROM.
The sections below show some of the uses of the tool. For a complete list of the command line parameters run miprom with no parameters.
The command line parameters are themselves commands to the miprom tool to view, add, delete or modify the data records in the EEPROM.
The commands execute in the order in which they appear on the command line. All commands execute on a copy of the EEPROM image in the host memory, and no changes are committed to the EEPROM unless and until a –burn command is encountered. If there is no –burn command on the command line, then the EEPROM will not be changed. There may be any number of editing commands before the –burn command, and the –burn command will commit all accumulated edits. A –verify command after a –burn command will read back the data to verify it was written successfully.

List the data records in the EEPROM

miprom –dir
For each record, the listing shows the address in the EEPROM where it's located, the type of record, and the label or text contents as appropriate.

Convert the settings in the EEPROM to an ini file

miprom –list >filename.ini
The –list command is like the –dir command, but also prints out the contents of the sensor settings in the EEPROM as ini file commands. If the output is redirected to a file, it creates a valid ini file.

Add or change the headboard ID record

miprom –headid "ID string"

Add or change the sensor ID record

miprom –sensorid "ID string"

Add or change the lens type record

miprom –lens "lens type string"

Add or change the time stamp to the current time

miprom –time
The time stamp will be the current time UTC with the format "2009/05/22 14:20:50".

Add a hardware lens correction setting from an ini file

miprom –label "name" –pga filename.ini
Only the first preset in the ini file is loaded. If there is already a PGA record with same label, the old record is replaced with the new one. The –label parameter must come first.
Settings created by Aptina when the headboard is manufactured will use the label "FACTORY". The factory settings are unique to each individual headboard, so you should be careful not to alter or remove them.

Add a software lens correction setting from an ini file

miprom –label "name" –swpga filename.ini
Only the first preset in the ini file is loaded. If there is already a PGA record with same label, the old record is replaced with the new one. The –label parameter must come first.
Settings created by Aptina when the headboard is manufactured will use the label "FACTORY". The factory settings are unique to each individual headboard, so you should be careful not to alter or remove them.

Add a hardware color correction setting from an ini file

miprom –label "name" –ccm filename.ini
Only the first preset in the ini file is loaded. If there is already a CCM record with same label, the old record is replaced with the new one. The –label parameter must come first.
Settings created by Aptina when the headboard is manufactured will use the label "FACTORY". The factory settings are unique to each individual headboard, so you should be careful not to alter or remove them.

Add a software color correction setting from an ini file

miprom –label "name" –swccm filename.ini
Only the first preset in the ini file is loaded. If there is already an SWCCM record with same label, the old record is replaced with the new one. The –label parameter must come first.
Settings created by Aptina when the headboard is manufactured will use the label "FACTORY". The factory settings are unique to each individual headboard, so you should be careful not to alter or remove them.

Add a software stereo alignment setting from an ini file

miprom –label "name" –swstereo filename.ini
Only the first preset in the ini file is loaded. If there is already an SWSTEREO record with same label, the old record is replaced with the new one. The –label parameter must come first.
Settings created by Aptina when the headboard is manufactured will use the label "FACTORY". The factory settings are unique to each individual headboard, so you should be careful not to alter or remove them.

Add a scratchpad data record from from an XML file

miprom –label "name" –scratchpad filename.xml
The scratchpad_calib section is stored in the EEPROM. If there is already an SCRATCHPAD record with same label, the old record is replaced with the new one. The –label parameter must come first.
The label is normally the model ID of ICP-HD in hex, '0EC1'. This way, an EEPROM can have scratchpad data for multiple companion chips.

Delete all data records in the EEPROM

miprom –format
Formatting deletes all data records including factory settings. The auto-detection data is not affected.

Delete a specific data record

miprom –del record_type:label
Record_type is one of the record types as shown by the –dir command, for example CCM. The record_type can be one of:
PGA
SWPGACCM
SWCCM
SWSTEREO
SCRATCHPAD
SENSOR_IDHEADBOARD_ID
LENS_TYPE
TIME_STAMP

Dump the contents of the EEPROM to the console

miprom –dump
The output is a typical hex/ASCII data dump. The data will include the effects of any editing commands before the –dump command even if they have not been committed to the EEPROM yet.

Copy the contents of the EEPROM to a binary file

miprom –bindump filename.bin
The data will include the effects of any editing commands before the –bindump command even if they have not been committed to the EEPROM yet.

Copy a binary image from a file to the EEPROM

miprom –binload filename.bin
This will replace the previous contents of the EEPROM with the data from the file.

DevWare

DevWare also has features to let you view, add, execute, delete or modify records in the EEPROM. For example you could save the current lens correction registers from the sensor to the EEPROM.
DevWare does not let you delete or modify the factory settings.

Loading Data from EEPROM with Ini File Commands

The LOAD_PROM= command will load a PGA, SWPGA, CCM, SWCCM or SWSTEREO setting. Specify the base address of the EEPROM, usually 0xA8, and the type and label of the setting to load. If the label is not specified, the first record of that type is loaded.
Examples:
LOAD_PROM= 0xA8, PGA
LOAD_PROM= 0xA8, CCM, FACTORY

EEPROM Presets Dialog

The EEPROM Presets dialog is similar to the ini file Presets dialog. You can add, execute, delete or modify records in the EEPROM.

Load: Load a Preset

To load a preset from the EEPROM into the sensor or DevWare, select it in the list and click Load, or double-click the preset.

Save: Update a Preset

To update a preset to the current sensor state or DevWare colorpipe state, select the preset in the list and click Save. A preset with the label FACTORY cannot be updated.

New: Add a New Record

To add a new preset or data record to the EEPROM click New…. In the New EEPROM Preset dialog select the type of record to create. If you are creating a sensor setting (PGA or CCM) or software colorpipe setting (SWPGA or SWCCM) enter the label. If you are creating a new string type data record (headboard ID, lens type, etc.) enter the text content. If you are creating a time stamp, the edit box will be automatically populated with the current date and time. You can edit it if desired. Finally, click OK. If you are creating a sensor setting the current sensor register values will be saved to the EEPROM. If you are creating a software colorpipe setting, the current colorpipe state will be saved to the EEPROM.
You can add a preset with the label FACTORY if it doesn't already exist, but once created it can't be deleted or changed.

Delete: Delete a Record

To delete a record, select it in the list and click Delete. A preset with the label FACTORY cannot be deleted.

Rename: Rename a Preset

To change the label or text content of an existing preset or data record, select it and click Rename.
You can rename a preset to FACTORY if a preset with that label doesn't already exist, but it can't be deleted or changed afterward.

  • No labels