Hardware
The MS42 is the Siemens engine control unit (DME) of the BMW M52TU six-cylinder (E46, E39, E36/7 Z3, E38). BMW's production diagnostic file calls it "MS 42.0 fuer M52 mit EWS 3" (MS420DS0.prg, rev 1.32) [verified].
| CPU | Infineon C167CR (C166 core, 16-bit, little-endian). nfsx's DS2 profile names a C167CR_SR, and its bootmode path expects the C167CR BSL ID 0xC5 [verified, nfsx bench run on an MS42] |
| Flash | 512 KB external flash, AMD Am29F400BB (bottom boot, 11 sectors). nfsx's bootmode probe stub reads the chip ID, and a full erase / program / verify has been bench-verified on an MS42 [verified, nfsx] |
| Flash write gate | port pin P3.7 is an active-low write-enable gate on the MS42 PCB. Address lines A19–A23 aren't connected, so CPU segments 0x08, 0x10 and 0x80 all alias the flash [verified, nfsx bootmode notes] |
| EEPROM | nfsx's bootmode notes say the MS42 has no SPI EEPROM (the JMG blob's SPI commands are "MS43 only"). The immobiliser data (ISN, EWS pairing) sits in flash, see nfsx tune [per nfsx] |
| Diagnostics | K-line, DS2 at 9600 baud 8E1, ECU address 0x12. See DS2 protocol [verified] |
| CAN | PT-CAN to ASC/DSC, instrument cluster and, on automatics, EGS (X60004/36–37, X60002/3–4) [verified, WDS] |
| Immobiliser | EWS 3 over a dedicated line (X60004/33), see EWS 3 |
| Connector | 5 modules, 134 pins: X60001…X60005, see Pinout [verified, WDS] |
Variants and hardware numbers
The E46 SP-Daten drop (data/MDS42, Zusbau tables dated 06.06.2003) pairs every Zusbau number (ZB) with one program file (HW-NR → <HW-NR>A.0PA) and one data file (SW-NR → P<SW-NR>.0DA) [verified]. Unlike the MS43 drop, the MS42 calibration ships as separate .0DA files (105 of them), which matches the separately erasable 32 KB calibration block.
Program (.0PA) | Program ZL reference | .0PA date | Data ZL reference (.0DA) | ZB numbers |
|---|---|---|---|---|
| 7500255 | 11101102C600 (MS42E30, M52 LEV MJ98) | 20.11.1998 | 11101100C6010000 | 3 |
| 7505859 | 11101102C700 | 14.09.1999 | 11101100C7010000 | 1 |
| 7526753 | 11101102C900 | 13.09.2002 | 11101100CA010000 | 101 |
- Every ZL reference starts with
111011. That's the same 6-character key nfsx reads through the0x0Dhardware-reference pointer to recognise an MS42 (MS43 =111430) [verified, nfsxecu-tables.ts]. - Characters 9–10 name the software level. A stock 0110C6 image (the version the wiki's XDFs target) carries
0110C6and11101100C601…at the start of its calibration (0x48000) and11101102C600plus7500255in the program header around0x5002E. So 0110C6 = program 7500255 with C6 data [verified on one 0110C6 image]. The newest program in this drop, 7526753, is paired withCAdata. - The hardware history (
MDS42.HWH) lists older, superseded numbers (4509413,1429810,1430268,1430273,1430785,1430844) that have no.0PAin this drop.1430844is the HWNR nfsx's docs use for its MS42 test ECU. nfsx's IDENT fallback signatures for MS42 are1430844and7503355. - For the binary differences between software versions (0110AD vs 0110C6), see Variants.
Related SGBDs and INPA scripts
| File | INFO | Jobs | Notes |
|---|---|---|---|
MS420DS0.prg | MS 42.0 fuer M52 mit EWS 3, rev 1.32 | 186 | production SGBD. d_0012.grp selects it for ID_HW_NR 15 / diag index 1510. Used by INPA ms420.ipo and Ms420_n.ipo. Basis of the DS2 and fault-code pages |
MS420DS1.PRG | MS 42.0 fuer M52 mit EWS 3, rev 1.00 | 174 | older revision, a strict subset of MS420DS0 (no PRUEFSTEMPEL_*, STATUS_DIGITAL_OBDII, STEUERN_TESTPLATZ, …). Not referenced by d_0012.grp |
Ms43_sp2.prg | MS 43.0 fuer M52 mit EWS 3, rev 0.01 | 20 | supplementary SGBD. INPA Ms42_n.ipo ("Überdrehzahl M52/MS42", MS 42.0 1.00) loads it for the over-rev statistics STATUS_MAX_/BETRIEB_/ZAEHLER_UEBERDREHZAHL. Whether an MS42 firmware answers those requests wasn't checked [inferred] |
The copies of MS420DS0.prg in INPA EDIABAS/Ecu and E46_v74/ecu are byte-identical (MD5 8750d159…).
Memory overview
The MS42 maps the flash 1:1: ECU (bus) address = file offset in the 512 KB BIN. nfsx uses these ranges [verified, nfsx ecu-tables.ts]:
| ECU address = file offset | Size | Content | DS2 read / write (nfsx) |
|---|---|---|---|
0x00000–0x0BFFF | 48 KB | boot area (boot software, ISN / EWS data, boot checksum) | read only |
0x0C000–0x10FFF | 20 KB | not accessed over DS2 (0x0C000–0x0FFFF is hidden by the C167 internal RAM/SFR window) | – |
0x11000–0x3FFFF | 188 KB | lower program | read + write |
0x40000–0x47FFF | 32 KB | not accessed over DS2 | – |
0x48000–0x4FFFF | 32 KB | calibration (data). The last 16 bytes are a checksum trailer and aren't written | read + write |
0x50000–0x7FFFF | 192 KB | upper program. The first 0x2C bytes are a header that isn't written | read + write |
nfsx's comment calls 0x00000–0x0BFFF "C167 internal flash", but its bootmode path erases and programs all 11 sectors of the external Am29F400BB, including the boot sector at 0x00000, and the image is byte-identical on read-back. That range is therefore the bottom of the external chip, and the label is probably inaccurate [inferred]. nfsx's docs give the lower program as 192 KB; 0x11000–0x3FFFF is 188 KB. Full details: Memory map and Checksums.
Connectors
Five black connector modules on the DME [verified, WDS E46_PA6000A]:
| Connector | Module | Pins | Main contents |
|---|---|---|---|
| X60001 | 1 | 9 | supply: terminal 15 output to the unloader relay, terminal 30, fused supply, grounds |
| X60002 | 2 | 24 | lambda sensors and heaters, main relay control. Automatics add CAN + TXD to the EGS |
| X60003 | 3 | 52 | engine sensors and actuators: HFM, camshaft and crank sensors, throttle housing (pedal sensor, throttle pots, MDK motor), temperatures, knock, injectors, VANOS, idle actuator, DISA, purge, map thermostat |
| X60004 | 4 | 40 | vehicle side: cluster signals, brake/clutch switches, MFL, CAN, K-line (TXD), EWS, fuel pump relay, A/C, e-fan, LDP (USA) |
| X60005 | 5 | 9 | ignition coils 1–6 and ground |
Bench supply for C167 bootmode: +12 V on X60001/7 (terminal 30) and X60004/26 (terminal 15), ground on X60001/4, K-line on X60004/32. nfsx documents these pins for the MS43; the MS42 WDS page has the same functions on the same pins [verified: WDS pin table]. The BOOT pin isn't on the harness; it has to be pulled low on the PCB. See Flashing.
EWS 3
The MS42 is paired with an EWS 3 immobiliser through a start value ("Startwert"). Evidence in MS420DS0 [verified, SGBD]:
STEUERN_SYNC_MODE(12 05 6C <mode>): start-value synchronisation. Its texts are DME bereit fuer Empfang Startwert, In der DME ist bereits ein Startwert gespeichert, In der DME ist noch kein Startwert gespeichert and Startwert ist nicht plausibel.STATUS_SYNC_MODE(12 04 6D): Startwert verstanden und akzeptiert, Startwert verstanden, EWS und DME passen nicht zusammen, Startwert nicht verstanden, Uebertragungsfehler, Keine Startwert-Initialisierung im aktuellen Fahrzyklus durchgefuehrt.- Fault codes
0x80Schnittstelle DME - EWS (timeout, parity error),0xD0Drehzahlueberwachung nicht plausibel EWS (EWS-Drehzahl = 0, …) and0xD1Manipulationsschutz EWS (Startwert nicht akzeptiert). IDENTreportsID_EWS_SS= 3.
The MS43's STATUS_PROG_STAT_EWS (0B 95) and MEHRFACHSTARTWERTABGLEICH have no MS42 counterpart. nfsx's tune feature virginize clears the ISN and pairing region in a BIN (66 bytes at 0x3EDE for MS42) so the ECU can be re-paired. The calibration has an EWS timeout constant, see EWS maps. The rolling-code algorithm itself isn't documented here.