Skip to content
Manual / Part IV / 12 RAM Logging & .ecu Files
Chapter 12 · Signals, Telemetry & Getting Data In and Out

RAM Logging & .ecu Files

C167CR RAM layout, the 25 channels worth logging, and generating an .ecu file.

Calibration symbols
LAMSONI_W LAMSBG_W PVDKS_W RKADD_W DWKRZ_0 DWKRZ_1 DWKRZ_2 DWKRZ_3 MSHFM_W NMOT_W PVDS_W TABG_W WPED_W DKV_W +12 more
ECUs covered
06A906032JJ 06A906032LP
Size
26 symbols · 0 diagrams · ~1,251 words

C167CR RAM layout, the 25 channels worth logging, and generating an .ecu file.

While standard OBD-II diagnostic tools (such as generic scan tools or standard VCDS measuring blocks) poll data via ISO 9141-2 / KWP1281 at sluggish sample rates of 2 to 4 Hz across only 3 or 4 channels simultaneously, ME7Logger utilizes proprietary Bosch engineering KWP2000 diagnostic hooks to poll internal microcontroller RAM directly via dynamic packet definition at sample rates of 20 to 50 Hz across up to 138 mixed channels.

To achieve this, ME7Logger requires an .ecu definition file that maps high-level variable names (nmot_w, rl_w, pvdks_w, dwkrz_0) to physical 24-bit C167CR microcontroller RAM addresses.

12.1. Infineon C167CR Internal RAM Architecture & Addressing Rules#

The Infineon C167CR-LM microcontroller utilizes a segmented memory architecture governed by Data Page Pointers (DPP0 through DPP3):

  • Internal RAM (IRAM): Spans physical addresses 0x380000 to 0x383FFF (16\text{ KB} total).
  • DPP2 Mapping (0x00E0): In C167CR execution, internal RAM is addressed via page register DPP2. In 16-bit operand instructions, any RAM reference must have bits 15–14 set to 0b10 (0x8000 | offset). For example, RAM offset 0x0FD2 is executed as 0x8FD2.
  • Special Function Registers (SFRs): Spans 0x00FD00 to 0x00FDFF (mapped via DPP3 = 0x0003). Operands must be prefixed with 0xFDxx.
  • ME7Logger .ecu Convention: In .ecu definition files, ME7Logger expects the full physical 24-bit linear address (0x38xxxx for RAM variables, 0x00FDxx for SFRs).

C167CR DATA PAGE POINTER (DPP) MEMORY SEGMENTATION

PointerPage ValueLinear Physical RangeTarget Hardware / Subsystem
DPP00x00000x000000 – 0x003FFFFlash ROM Bank 0 (Interrupts / Boot)
DPP10x00040x010000 – 0x013FFFFlash ROM Bank 1 (Calibration Maps)
DPP20x00E00x380000 – 0x383FFFMicrocontroller Internal RAM (16 KB)
DPP30x00030x00C000 – 0x00FFFF (SFRs)Bit-Addressable RAM & On-Chip Peripherals

12.2. Top 25 Core Live Telemetry Variables & Physical Addresses (06A906032LP)#

The table below compiles the definitive RAM registry for 06A906032LP (and 06A906032JJ / h24bw05g), establishing the foundation for in-car telemetry stations and dynamic logging profiles:

Variable NamePhysical RAM AddressSize & TypeSignedScale FactorAdditive OffsetPhysical UnitsDescription
nmot_w0x380A902 Bytes (u16)No0.250.0\text{rpm}Engine Speed (Crankshaft)
rl_w0x380D2A2 Bytes (u16)No0.0234380.0\%Relative Engine Load
zwist0x380D8C1 Byte (u8)Yes0.75-48.0\text{°BTDC}Actual Current Ignition Angle
dwkrz_00x380EA01 Byte (u8)No0.750.0\text{°KW}Knock Retard Cyl 1
dwkrz_10x380EA11 Byte (u8)No0.750.0\text{°KW}Knock Retard Cyl 2
dwkrz_20x380EA21 Byte (u8)No0.750.0\text{°KW}Knock Retard Cyl 3
dwkrz_30x380EA31 Byte (u8)No0.750.0\text{°KW}Knock Retard Cyl 4
wped_w0x3809AC2 Bytes (u16)No0.0015260.0\%Accelerator Pedal Position
dkv_w0x3809C22 Bytes (u16)No0.0015260.0\%Throttle Plate Angle
pvdks_w0x380D4C2 Bytes (u16)No0.0390630.0\text{hPa}Charge Pressure Before Throttle (MAP)
pvds_w0x380D4E2 Bytes (u16)No0.0390630.0\text{hPa}Intake Manifold Pressure
plsol0x3812C42 Bytes (u16)No0.0390630.0\text{hPa}Target Specified Boost Pressure
ldtv0x3813101 Byte (u8)No0.3906250.0\%Wastegate Duty Cycle (N75)
ti_b10x380D6E2 Bytes (u16)No0.0026670.0\text{ms}Effective Injection Pulse Width
fr_w0x380E622 Bytes (s16)Yes0.00003051.0\lambdaShort-Term Lambda Controller
fra_w0x382F8C2 Bytes (s16)Yes0.00003051.0\lambdaMultiplicative LTFT (Fuel Trim)
rkadd_w0x382F902 Bytes (s16)Yes0.0078130.0\%Additive LTFT (Idle Trim)
lamsoni_w0x380E5E2 Bytes (u16)No0.0002440.0\lambdaActual Wideband Lambda (LSU 4.2)
lamsbg_w0x380E582 Bytes (u16)No0.0002440.0\lambdaTarget Specified Lambda
mshfm_w0x380A402 Bytes (u16)No0.10.0\text{kg/h}Air Mass Flow Rate (MAF)
tmot0x3809801 Byte (u8)Yes0.75-48.0\text{°C}Engine Coolant Temperature
tans0x3809821 Byte (u8)Yes0.75-48.0\text{°C}Intake Air Temperature
tabg_w0x38148C2 Bytes (u16)No0.10.0\text{°C}Modeled Exhaust Gas Temp (EGT)
vfzg0x3809E81 Byte (u8)No1.250.0\text{km/h}Vehicle Road Speed
gangi0x3809FA1 Byte (u8)No1.00.0-Current Engaged Gear (0\dots 6)

12.3. Automated ME7Logger .ecu Configuration File Structure#

Adhering strictly to user:workspace-standards, an .ecu definition file consists of a metadata header, communication timings, and variable descriptors:

[General]
ECUName = 06A906032LP
Description = VW Golf MK4 GTI 1.8T AWP 180PS (6-Speed Manual 02M)
PartNumber = 06A906032LP
SoftwareNumber = 1037366194
SoftwareVersion = 0005
CommunicationMode = KWP2000
BaudRate = 125000

[Measurements]
; Format: Name, Address, Size (bytes), Signed (S/U), Factor, Offset, Units, LongName
nmot_w, 0x380A90, 2, U, 0.25, 0.0, rpm, Engine Speed
rl_w, 0x380D2A, 2, U, 0.023438, 0.0, %, Relative Engine Load
zwist, 0x380D8C, 1, S, 0.75, -48.0, deg BTDC, Current Ignition Angle
dwkrz_0, 0x380EA0, 1, U, 0.75, 0.0, deg KW, Knock Retard Cyl 1
dwkrz_1, 0x380EA1, 1, U, 0.75, 0.0, deg KW, Knock Retard Cyl 2
dwkrz_2, 0x380EA2, 1, U, 0.75, 0.0, deg KW, Knock Retard Cyl 3
dwkrz_3, 0x380EA3, 1, U, 0.75, 0.0, deg KW, Knock Retard Cyl 4
wped_w, 0x3809AC, 2, U, 0.001526, 0.0, %, Accelerator Pedal Position
dkv_w, 0x3809C2, 2, U, 0.001526, 0.0, %, Throttle Plate Angle
pvdks_w, 0x380D4C, 2, U, 0.039063, 0.0, hPa, Charge Pressure Before Throttle
plsol, 0x3812C4, 2, U, 0.039063, 0.0, hPa, Specified Boost Pressure
ldtv, 0x381310, 1, U, 0.390625, 0.0, %, Wastegate Duty Cycle N75
ti_b1, 0x380D6E, 2, U, 0.002667, 0.0, ms, Effective Injection Time
lamsoni_w, 0x380E5E, 2, U, 0.000244, 0.0, lambda, Actual Wideband Lambda
lamsbg_w, 0x380E58, 2, U, 0.000244, 0.0, lambda, Target Specified Lambda
mshfm_w, 0x380A40, 2, U, 0.1, 0.0, kg/h, Mass Air Flow Rate
tmot, 0x380980, 1, S, 0.75, -48.0, C, Engine Coolant Temperature
tans, 0x380982, 1, S, 0.75, -48.0, C, Intake Air Temperature
tabg_w, 0x38148C, 2, U, 0.1, 0.0, C, Modeled Exhaust Gas Temperature
vfzg, 0x3809E8, 1, U, 1.25, 0.0, km/h, Vehicle Road Speed
gangi, 0x3809FA, 1, U, 1.0, 0.0, -, Current Engaged Gear

12.4. Automated DAMOS-to-ECU Definition Generator (me7_damos_to_ecu.py)#

Below is the standalone Python utility that parses any Bosch ASAP2 DAMOS (.dam) or A2L file and generates a fully compliant ME7Logger .ecu configuration file:

#!/usr/bin/env python3
"""
Bosch ME7.5 DAMOS-to-ME7Logger Definition Generator
Converts .dam / .a2l internal ASAP2 symbol records into .ecu logging profiles.
"""

import re
import sys

def parse_damos_and_generate_ecu(dam_path, output_ecu_path, ecu_name="ME7_CUSTOM"):
    # Target symbols to extract from DAMOS
    target_symbols = {
        'nmot_w': ('Engine Speed', 'rpm', 0.25, 0.0, 2, 'U'),
        'rl_w': ('Relative Engine Load', '%', 0.023438, 0.0, 2, 'U'),
        'zwist': ('Actual Ignition Timing', 'deg BTDC', 0.75, -48.0, 1, 'S'),
        'dwkrz_0': ('Knock Retard Cyl 1', 'deg KW', 0.75, 0.0, 1, 'U'),
        'dwkrz_1': ('Knock Retard Cyl 2', 'deg KW', 0.75, 0.0, 1, 'U'),
        'dwkrz_2': ('Knock Retard Cyl 3', 'deg KW', 0.75, 0.0, 1, 'U'),
        'dwkrz_3': ('Knock Retard Cyl 4', 'deg KW', 0.75, 0.0, 1, 'U'),
        'wped_w': ('Accelerator Pedal', '%', 0.001526, 0.0, 2, 'U'),
        'dkv_w': ('Throttle Angle', '%', 0.001526, 0.0, 2, 'U'),
        'pvdks_w': ('Boost Pressure (MAP)', 'hPa', 0.039063, 0.0, 2, 'U'),
        'plsol': ('Specified Boost', 'hPa', 0.039063, 0.0, 2, 'U'),
        'ldtv': ('Wastegate Duty Cycle', '%', 0.390625, 0.0, 1, 'U'),
        'ti_b1': ('Injection Pulse Time', 'ms', 0.002667, 0.0, 2, 'U'),
        'lamsoni_w': ('Actual Lambda', 'lambda', 0.000244, 0.0, 2, 'U'),
        'lamsbg_w': ('Specified Lambda', 'lambda', 0.000244, 0.0, 2, 'U'),
        'mshfm_w': ('Mass Air Flow', 'kg/h', 0.1, 0.0, 2, 'U'),
        'tmot': ('Coolant Temperature', 'C', 0.75, -48.0, 1, 'S'),
        'tans': ('Intake Air Temp', 'C', 0.75, -48.0, 1, 'S'),
        'tabg_w': ('Exhaust Gas Temp', 'C', 0.1, 0.0, 2, 'U'),
        'vfzg': ('Vehicle Speed', 'km/h', 1.25, 0.0, 1, 'U'),
        'gangi': ('Engaged Gear', '-', 1.0, 0.0, 1, 'U')
    }

    found_entries = []
    print(f"Scanning {dam_path} for RAM symbols...")

    with open(dam_path, 'r', encoding='latin-1', errors='ignore') as f:
        content = f.read()

    # Search for ASAP2 /SPZ records: /SPZ SymbolName Address
    for sym, meta in target_symbols.items():
        # Match pattern: /SPZ sym $Address or /SPZ sym 0xAddress
        match = re.search(rf'/SPZ\s+{sym}\s+[\$0x]*([0-9A-Fa-f]+)', content)
        if match:
            raw_addr = int(match.group(1), 16)
            # Normalize to 24-bit physical RAM address (0x380000 base)
            if raw_addr < 0x010000:
                ram_addr = 0x380000 | (raw_addr & 0x3FFF)
            elif (raw_addr & 0xF00000) == 0x800000:
                ram_addr = 0x380000 | (raw_addr & 0x3FFF)
            else:
                ram_addr = raw_addr

            found_entries.append((sym, ram_addr, meta))
            print(f"Found {sym:<10} -> 0x{ram_addr:06X} ({meta[0]})")
        else:
            print(f"Symbol {sym} not found in DAMOS.")

    # Write output .ecu file
    with open(output_ecu_path, 'w') as f:
        f.write("[General]
")
        f.write(f"ECUName = {ecu_name}
")
        f.write(f"Description = Auto-Generated ME7Logger Definition from {dam_path}
")
        f.write("CommunicationMode = KWP2000
")
        f.write("BaudRate = 125000

")
        f.write("[Measurements]
")
        f.write("; Name, Address, Size, Signed, Factor, Offset, Units, LongName
")
        for sym, addr, meta in found_entries:
            desc, units, factor, offset, size, signed = meta
            f.write(f"{sym}, 0x{addr:06X}, {size}, {signed}, {factor}, {offset}, {units}, {desc}
")

    print(f"Generated {output_ecu_path} with {len(found_entries)} telemetry channels.")

if __name__ == '__main__':
    if len(sys.argv) < 3:
        print("Usage: python3 me7_damos_to_ecu.py <input.dam> <output.ecu> [ECUName]")
        sys.exit(1)
    name = sys.argv[3] if len(sys.argv) > 3 else "06A906032LP"
    parse_damos_and_generate_ecu(sys.argv[1], sys.argv[2], name)

Cross-referenced on shared calibration symbols, not on subject matter — these are the chapters that touch the same maps.

← Previous chapter · Contents · Next chapter →

Related

Cross-referenced on shared calibration symbols, not on subject matter — these are the chapters that touch the same maps.

31 MAFless / Speed Density
MSHFM_WTI_B1DKV_WTANSFR_WLAMSONI_W
60 Post-Dyno Verification
LAMSBG_WPVDS_WLAMSONI_WFRA_WTABG_WZWIST
35 High-Speed Logging
PLSOLLDTVDWKRZ_0LAMSONI_WPVDKS_WZWIST
25 Troubleshooting & Failsafes
DKV_WTANSFRA_WWPED_WN75NMOT_W
10 Serial EEPROM & Immo
RKADD_WDWKRZ_3DWKRZ_0FRA_W
13 121-Pin Harness
VFZGGANGITABG_WN75