Rabbit ECU – Adding a new Table

Calibration Tables

The Rabbit DIY ECU is calibrated using the free ECUHost Calibration Tool. The tool uses ASAM standard A2L files, which describe measurement and calibration data for ECUs. Originally mostly used for engine ECUs, they are now used for a large number of ECUs within the vehicle (1).

Data you can calibrate (known as a characteristic) using the tool are:

  1. Setting (an ASAM VALUE)
  2. Table (an ASAM CURVE)
  3. Map (an ASAM MAP)

By using a standard way of describing the data stored in the Rabbit ECU, it is easier to use other standardised calibration tools used in automotive embedded systems.


An example of a setting would be a simple integer value such as the one shown below.

Arduino, Fuel Injection, Electronics, Turbo, DIY, LSU4.2, Engine management

A setting is a single value that is stored as an 8, 16 or 32-bit singed or unsigned value, and can have scaling factors and units (such as ms, g, kph) or be dimensionless (dl).


Tables are how 2D data arrays are stored. The example table below contains values of airflow versus cranking speed. A table also contains a ‘hidden’ additional data array which is the axis data points (100 rpm, 120 rpm, 140rpm, … in the example below). Being able to tailor the axis points is a powerful because an unevenly spaced axis spread with any range can be programmed. Like the data points, the axis points data can be stored as 8, 16 or 32-bit signed or unsigned values.

Arduino, Fuel Injection, DIY, Electronics, Engine Control, STM32, ATMEL

Adding a Calibration Table

The Rabbit DIY ECU has a basic set of calibration settings, tables and maps that be downloaded as a starting point.  I recently found the need to add a table to the Z18XE project because of a lean out problem at very short injection openings. This is a common problem, particularly for batch fire injection systems and can be read about here. The best way to fix the problem is by adding a short opening compensation table that increases the injection pulse for pulses less than 2 ms. The following is a summary of how to go about adding a calibration table. To understand the code samples you might need some knowledge or experience with embedded C programming.

1. Declare the Table and Axis Spread

uint32 aUserInjShortOpeningSpread[17];
uint32 aUserInjShortOpeningTable[17];

Two 17 element arrays are declared. You can size the array any size between 2 and 33 data points using uint8, uint16 or uint32 data-type. The above lines are added to the calibration structure found in usercal.h.

2. Add the ASAM tag line

To get access to the data on the fly (modify, upload or download) through the ECUHost Calibration Tool you need to add two ASAM tag lines to usercal.h.

//ASAM mode=writeaxis_pts name=”Injector Short Opening Table_XAXIS” type=uint32 offset=5008 min=0 max=2 m=0.001 b=0 units=”ms” format=4.3 help=”Injector Short Opening X Axis” xcount=17 xindexvar=”Fuel Injector Predicted ms”
//ASAM mode=writecurve name=”Injector Short Opening Table” type=uint32 offset=5076 min=0 max=2 m=0.001 b=0 units=”ms” format=4.3 help=”Injector Short Opening Curve” xcount=17 xindexvar=”Fuel Injector Predicted ms”

To understand all of the tags in the line, I recommend reading more about ASAM A2L files here.

3. Run the parser

The parser is a program that picks up all of the ASAM tags and ties them to the MAP file addresses so the ECUHost Calibration Tool knows where to find the new table you have added to the project.

Arduino, Programming, Fuel Injection, Fuel Injector, STM32, ATMEL

The parser outputs an A2L file that completely describes your new table axis, data-type, scaling, units and address within the Rabbit DIY ECU memory.

Add the Table to the Calibration Tool

To be able to open the table from the ECU or file, edit and save, you need to link the table in the Calibration Tool layout file.

Arduino, Fuel Injection, DIY, Electronics, Engine Control, STM32, ATMEL

The first line tells the GUI that the table should be open in a new window, with title Injector Short Opening Curve. The seconds line links the string Injector Short Opening Table to the ASAM A2L file record of the same name.

With step 4 you are done! Open the ECUHost Calibration Tool and you can see the new table appear.

Air Flow Meter, Air Fuel Ratio, Arduino, DIY, Electronics, Fuel Injection, Fuel Injector, MAP Sensor, Turbo

Next post: Adding a map to the Rabbit ECU Windows tuning application.


(1) From https://automotive.softing.com/en/standards/data-descriptions/asam-mcd-2mc.html