ECU Tech
ECU Reverse Engineering
I came across an oddity in the MSB000080 and MSB101360 code while trying to understand why the map structure in those ECU's is slightly different to other MSB and NNN EU2 maps. |
Given my recent posts about bugs in the Nanocom's handling of injector idle codes I thought I'd pull together some background information. |
I'm sure you've heard that the reason NNN ECU's get bricked when uploads fail is due to some variation on the "Bad Land Rover Engineering" theme. The spiel on many LR forums is familiar: "NNN: Worst flash programming ever. Blame the incompetent Land Rover engineers." It turns out that is a myth. |
NOTE: This post has been updated to reflect that the driver chips NOT related to injector control. Rather these chips are used for things like PWM outputs to the instrument panel. One of the very early posts one this site shows a diagram of the firmware layout used on the Td5 NNN ECU's. |
I was having a look at the MSB diagnostics a couple of days ago and came across the request for switching between maps. |
I've been working on a disassembly of a K-Series engine map that runs on an NNN petrol MEMS ECU for last day or so. While there is a basic level of commonality with the Td5 this is very much restricted to low level drivers and some utility functions, like map lookup and interpolation, basic kline drivers, CANBUS drivers, etc, etc. |
I've been looking at the difference between the contents of the Nanocom .map format and the firmware image for an ECU loaded with the same variant and fuel mapping. |
Update: After doing further work on ECU I've discovered that the none of the speculation originally reported in this post is accurate and should be ignored. After locating the code that handles clock setup for the OBD-II communications I've been able to determine the crystal is actually 4.0768Mhz and the system clock runs at 16.3072Mhz. Old content begins here: |
I've spent a bit of time over the past few months trying to get my head around the firmware for the TD5 ECU. It's been a long tedious process but things are slowly falling into place. |
I've been having a bit of trouble getting my head around what is happenning of the SPI bus of the Td5 ECU, so I've given in and ordered a Saleae Logic 8 channel logic analyser as a solstice present to myself. |
This is a fairly niche modification. EU2 and EU3 engines are fitted with significantly different airbox sensors. The EU2 uses a three wire Ambient Air Pressure sensor, while the EU3 uses a four wire Ambient Air Pressure/Ambient Air Temp sensor. |
Td5 Tuning
Note link to calculator spreadsheet added at bottom of post BackgroundThe 1.42 bar boost limitation of the stock Land Rover Td5 engine management system has been a long standing issue when increasing boost levels as a performance upgrade. |
The 3.0 release of the XDFs includes two additional EU3 specific limiters. Both limiters use ambient air temperature (AAT) as part of the calculation of the parameter value. This makes them slightly problematic as Nanocom omits this value from display and logs despite reading the data from the ECU. |
From the earliest versions the donor XDF’s have included an undocumented patch which is simply named MAF Patch. A few people have asked what it does, and my response always includes something along the lines of “I really should document that!”. |
The main of the function of the Fuel Temperature Sensor is to correct for the decrease in fuel density as fuel temperature increases. RAVE states this quite clearly so no real surprises.... |
A couple of months ago I posted on how the Wastegate Modulator operates when energised and de-energised. That research was necessary because the “common forum wisdom” that the WGM operated to reduce boost seemed to be completely at odds with what the WGM control code appeared to be doing. |
This is a bit of background on how the physical waste gate modulator unit operates. |
This is the first of what should be a series of posts which provide a little more detail about how the maps fit together. The individual flowcharts are too large to embed while maintaining any kind of legibility so the full content is attached as a pdf at the end of the post. |
How map tables work…
It’s not entirely obvious how the individual tables are used in the Td5 ECU, and I don’t think I’ve explained this anywhere else. The BasicsAll tables are looked up using linear interpolation. This is done by searching along an axis to find the values on each side of the target value. |
I've had a few requests for details on how to disable the timeout on EU3 maps when the MAF sensor is disconnected. |
The "Old School" mod of choice..
Modifications to the inject duration maps are a key element of "old school" tuning. |
Note: There was a bit of doubt about the airmass units on my part. This has now been resolved and milligrams/stroke is the winner. The first "secret' of the Td5 engine maps is that nothing is quite what it seems at first glance. |
The donor XDF's identify a map that limits fuelling when overboost occurs, which I've named "Overboost Fuel Cut". |
Axis Extending the Smoke Limit map is the secret weapon of the new school remap. |