Siemens MS45

From MS4X Wiki

The MS45 and MS45.1 are a more advanced version of the MS43, and a precursor to the newer MSV70 DMEs found in newer BMWs such as the e90 platform cars.

The primary differences between MS45.0 and MS45.1 are that the MS45.1 adds wideband pre-cat O2 sensors and uses a MAF in the SAP. MS45.1 was primarily an emissions update and was only used in north american cars.

Getting Started

Software & Tools

The MS45 external flash is comprised of a large 1024kb block, which contains both the program space and the parameter space. If using PASoft to read from the DME, for example, a "full read" of the 1024kb block would be done from address 0x00000 to 0xFFF3F. The parameter space is a subsection located within that larger block and is approximately 128kb in size found from 0x40000 to 0x5CF7F. However some tools such as the Frieling Racing flash tool will write a full 128kb from 0x40000 to 0x5CFFF, which is fine, the extra bytes aren't used they are just filler basically.

At this time all your tuning changes will be in the 128kb parameter space.

Flashing software

These are the tools you would use to read or write a tune to your car. Their only job is to take a file, or tune, and get it onto the car, or read the current tune from the car so you can use a different piece of software to edit that tune.

  1. Bimmer Tuning Tools MS45 Quickflash Fully working flasher for MS45 that can write and read partials and full tunes. It can also delete EWS, do logging, read/clear DTCs/adaptations among many other things. And best part is that it works with standard OBDII-to-USB adapter with FTDI chip.
  2. MS45 Flasher by hassmaschine & TerraPhantm: see here for information:
  3. BDM - Requires you to remove the DME from the car and have a bench setup with a laptop. The BDM100 uses a connector that is soldered to a BDM port on the back of the DME and will grant you full access to all of the onboard flash in the DME. Each time you flash a new tune to your car, you'll have to remove your DME, put it on the bench, flash it, and then reinstall in the car. Not very practical, and best used if you are going to begin deep disassembly of the DME, and at that point you dont need this wiki :)
  4. Frieling Racing - This is a tool that is licensed to tuners, not something a hobbyist would likely have or use. If you contact a tuner and they tell you they can tune your MS45/MS45.1 car remotely, this is the tool they are using. The tuner will send you a special OBDII-to-USB adapter and a small piece of software to load on a laptop so when they send you a ".mod" file you can simply load it on the car. Its fast and it works reliably, but again, typically only tuners use this software due to the licensing costs and its "encryption" of the tune files they send you to prevent sharing. It will correct the most basic checksum covering a majority of the parameter space, but does not automatically fix the checksum covering some torque monitoring parameters, you'll need to adjust those on your own.
  5. - Still in development, and partially available, has the ability to take your tune in binary format (.bin) and convert it to a .0da file complete with fixed checksums (all of them). That is the exact file used by the BMW WinKFP tool to flash updated OEM BMW firmware to your DME. It does require you have a working installation of "BMW Tools" on your laptop (the suite of software from BMW that contains INPA, WinKPF, EDIBIAS, etc). It will provide you with a conveniently packaged batch file (.bat) that you can double click on that will automatically launch WinKFP and start the flash process without you needing to do anything else. It's very fast and uses a standard basic OBDII-to-USB cable that you can find on eBay, amazon, or for about $30.
  6. BimTun BimmerFlasher - First Android flashing utility for MS41-MSV70 Siemens ECUs
  7. Renovelo ByteTuner Will flash a tune and update the firmware to the latest version. But only flashes tunes created with ByteTuner, will not flash a .bin file.

Tuning software

The tuning software is not necessarily required, as you can technically make all the changes to the file with a HEX editor as well, but then you probably wouldn't need this wiki ;)

Many tuning packages rely on definition files, or maps. These are not publicly available, and many tuners only have access to a very limited or partial map pack. The MS45 DME has over 2500 parameters! That said, only a fraction of those typically are changed when tuning these cars.

Most of these tools expect that you already have a way to read and write to your DME using a flashing tool.

  1. WinOLS - This package is fairly expensive to license, although there is a freeware demo version that has some limitations. Its a general tuning package not specific to BMW or any particular DME. Requires a map pack, which is not provided by WinOLS. You have to either find your own maps or try to buy a map pack from someone. Really great tool for a professional tuner, but not ideal for the hobbyist due to cost and lack of map pack availability.
  2. TunerPro - TunerPro is freeware and there are a lot of community provided definitions (XDF files). For MS45.1 take a look over in our Definition Files.
  3. RomRaider - RomRaider is free open source software and there are community provided definitions available. Take a look over in our Definition Files.
  4. BimTun - Somewhat affordable and does not require a map pack, the maps are built-in, but the number of maps available are limited. Offers support for changing some of the more popular settings such as fueling, timing, etc. Does not have access to all parameters in the MS45, but does have a hex editor if you know what bytes you want to change.
  5. Renovelo ByteTuner - This tool has full MS45.0 and MS45.1 support giving you access to all 2500+ parameters. It is different than the other tuning packages listed here because it can both edit tuning parameters AND flash to the car in one software package. It also corrects all the checksums for you and will update your DME to the latest firmware version during the flash process.

Checksums and Signatures

There are at least two checksums in the MS45, and one of them is not very straightforward. You will either need to correct these checksums by hand, or you'll need your flashing tool to correct them for you on the fly during the flash process.

The primary checksum you'll deal with when editing values in the parameter space is found at 0x40100. The default checked region is 0x40200-0x5CFFF. It is a 32-bit CRC, using polynomial 04C11DB7, default initial value is 0xFFFFFFFF, no reflection, XOR out 00000000.

A second checksum, primarily for logical switches, is stored in the middle of the tune. This is equivalent to the "additional checksum" on the MS43. Like the MS43, this checksum can be disabled (change val_mo3_swi_cal_cks -> 0xA5 to disable).

The MS45 uses an RSA signature to validate flashed data. The parameter RSA signature is stored at 0x40170. The default signed regions are 0x40000 - 0x4016F and 0x40200 - 0x5CFFF. To flash over OBDII, a valid RSA signature is required.


The acronyms are Siemens mapnames from the Funktionsbeschreibung.

The following list contains a selection of the most used terms. It's crucial to understand at least the major engine states like _is_, _pl_ and _fl_ to make sense out of the cryptical naming of the maps.


Enginestate Description
as after start
cs cold start
es engine stopped
fl full load
is idle speed
pl part load
pu trailing throttle
puc trailing throttle fuel cut-off
r restart
st start


Fuel calculations start with creating a desired lambda setpoint based on measured MAF values which is then adjusted with a predicted value base on the Intake Manifold model. These are converted to fuel mass values and further adjusted for cold start warmup correction, adaptations are applied, and then adjustments are made based on a fuel mass correction table. Finally injection time is calculated by applying the injector valve characteristic to the calculated fuel mass.

Fuel Injection Maps

The lambda sensors for closed loop operation are narrowband for the MS45 and wideband for the MS45.1. Fuel trim learning for the MS45.0 only happens during closed loop operation, but the learned fuel trims do affect full throttle fueling as well. MS45.1 has a set of learned fuel trims for normal partial load driving and a separate set for full load conditions.

Normal partial load fueling is derived from the Intake Manifold Model for base fuel mass calculations (resulting in stoic or lambda = 1) and then modified based on the lambda set points in the following tables:

  • ip_lamb_bas_1 & ip_lamb_bas_2 (Lambda set-point at partial load)

There are several parameters that limit when "full load" is determined, such as a minimum RPM, minimum operating temp, etc. but full load is primarily dependent on pedal angle (ip_pv_max_fl__n). During full load the following table is used to define a lambda set-point:

  • ip_lamb_fl__n (Lambda full load enrichment)

MS45.1 will eventually assign long term fuel trims during full load operation to try to hit the lambda targets in ip_lamb_fl__n.

Additional fueling tweaks can be performed on the mass fuel flow correction tables (ip_mff_cor_1 and ip_mff_cor_2). The correction factors in these tables are applied after the base fuel mass calculations are adjusted for lambda. But adjustments to these tables shouldn't normally be necessary and changing these tables will surely skew lambda adaptations.

If the first 30 seconds of your cold starts are rough, you can try adjusting these values to add more cold startup fuel before the wideband O2 sensors kick in for lambda control. These values are multiplied by the fuel mass (not lambda) calculated by the DME:

  • ip_fac_ti_tco_wup (Warm up basic factor)

When enriching the fuel mixture you need to set c_lamb_min_ls_act_test_afr to a value below your richest value, otherwise the DME will keep reporting "System too rich" DTC

Non Stock Injector Maps

If you will be changing your fuel injectors, such as when charging your engine, some parameters will need to be adjusted accordingly.

The injector size is calibrated in two parameters (one for each cylinder bank) and stored in a value of ms/(mg/stk):

  • c_fac_mff_ti_stnd_1 & c_fac_mff_ti_stnd_2 (Injection valve characteristic for fuel mass flow to injection time at standard conditions)

One way to set these values is to calculate the difference in percentage of volume flow between stock and your new injectors and adjust these values accordingly, and test.

Alternatively, you can also use the global injection time correction parameter to adjust fuel flow based on the new injector sizes. The stock value for c_ti_as is 1.0, so if your new injectors flow twice as much fuel, try setting this value to 0.5. I've found .508 to be a pretty good value for the Bosch 42lb green giants.

  • c_ti_as (Global injection time correction)

Either one of these approaches should work, however c_ti_as is a correction value applied towards the end of all fueling calculations, whereas c_fac_mff_ti_stnd_i will be used as a basis for fuel calculations and adjustments (e.g. adjustments for catalyst heating, diagnostics, torque interventions, etc). Pick one and use it, but do not use both to adjust for different sized injectors.

The injector latency compensation (injector dead times) and minimum injection times should be set based on your injector's specifications from their manufacturer so you have good on/off throttle drivability and idle.

  • ip_ti_add_dly (Injector dead time correction)

c_ti_min_thd is the threshold when c_ti_min is applied, so it should be set with a value slightly higher than c_ti_min:

  • c_ti_min (minimum injection time limitation)
  • c_ti_min_thd (minimum threshold of the injection time limitation)


Basic Timing Maps

"Basic ignition angle for RON 98" is the main table used with a healthy engine (so no VANOS fault codes, normal warmed up operating temperature) running RON98/PON93 gasoline.

There is a knock based interpolation between the RON91 and RON98 RON tables. The other tables should be kept safe.

  • ip_iga_bas_ron_98__n__maf (Basic ignition angle for RON 98)
  • ip_iga_bas_ron_91__n__maf (Basic ignition angle for RON 91)

In the event of a VANOS fault code, or otherwise variable valve timing is inoperative, the following table is used:

  • ip_iga_bas__n__maf (Basic ignition angle IVVT passive)

Boosted Applications

When running boost the amount of air flowing through the engine is greatly increased. In order for throttle control and fueling to work properly the Intake Manifold Model has to be adjusted to compensate, as well as a couple torque maps. These two go hand-in-hand. If you increase the Intake Manifold Model alone, the car will never go into full throttle. If you do not increase the Intake Manifold Model the car will go to full throttle way too soon.

To make things easier use this excel sheet to calculate the Intake Manifold Model & Torque Maps tables: File:Torque Tables Calculator.xlsx

Intake Manifold Model

The Intake Manifold Model is used by throttle control and fueling calculations. Therefore it is very important that it is configured correctly.

For throttle control the DME calculates a pressure quotient using the Intake Manifold Model in order to determine if the throttle should be fully opened or not. If the air volume in the model is too low compared to actual values, then the car will go into full throttle too soon during the throttle pedal travel. If it's too high, you'll never reach wide open throttle.

For fueling the DME will use the measured MAF values along with a predicted MAF value derived from the Intake Manifold Model to set fueling values, which are then further modified based on lambda adaptations and various other factors.

These tables will set the volume of air in the manifold for a given manifold pressure. You ideally want to increase these tables based on the percent increase in air you are seeing at the MAF at various stages through the RPM band compared to stock or NA form:

  • ip_eff_vol_slop_max (Slope of gasflow into cylinder at WOT and standard conditions)
  • ip_eff_vol_slop_cam_vo (Slope of the cylinder air-mass flow dependant on valve overlap, VIM_AV = 0%)
  • ip_eff_vol_slop_cam_vo_vim (Slope of the cylinder air-mass flow dependant on valve overlap, VIM_AV = 100%)

If your boosted application removes the DISA valve, then set ip_eff_vol_slop_cam_vo and ip_eff_vol_slop_cam_vo_vim to the same values, there's no need for them to be different.

VIM_AV = 100% means DISA valve is closed and intake manifold volume is lower.

Torque Maps

Throttle is controlled based on torque demand. Therefore, among other things, these maps control how far open the throttle plate moves in relation to the pedal travel. The strategy here is to leave the torque values themselves the same as stock, but adjust the engine load values to match the higher airflow we are moving with our charger.

First adjust the mg/stk values here:

  • ip_maf_sp (Setpoint mass air flow depending on slow torque setpoint)

Then adjust the mg/stk axis values here to match the changes to ip_maf_sp:

  • ip_tqi_ref__n__maf (Indicated engine torque at reference conditions)

And finally align the mg/stk axis values in the following monitoring table to match the changes to ip_tqi_ref__n__maf:

  • ip_tqi_ref_mon (Indicated engine torque at reference conditions (process monitoring))

IAT Sensor Scaling

If running an aftermarket MAF sensor for a boosted application, you will have to use a different intake air temperature sensor than the one integrated into the factory MAF assembly. An easy option is using an MS42/MS43 IAT sensor (BMW part # 13621739510) and rescaling the IAT sensor definition table (ip_tia__v_tia) for it.

MS42/3 IAT sensor:

V °C
0.215 142.5
0.274 129.8
0.469 110.3
0.606 99.8
0.782 90.0
1.017 80.3
1.310 69.8
1.662 60.0
2.092 50.3
3.089 30.0
4.008 9.8
4.341 0.0
4.595 -9.8
4.751 -20.3
4.927 -39.8
4.966 -48.0

MS45 stock IAT sensor (integrated into MAF assembly):

V °C
0.195 129.8
0.274 114.8
0.450 95.3
0.567 84.8
0.743 75.0
1.232 54.8
1.564 45.0
1.975 35.3
2.952 15.0
3.891 -5.3
4.243 -5.3
4.517 -15.0
4.517 -24.8
4.712 -35.3
4.771 -39.8
4.966 -48.0

Deleted DISA and the Variable Intake Manifold

Some custom intake manifold applications remove the DISA valve. The DISA valve controls the variable intake manifold as it changes from 0% to 100% (closes and opens). There is no way to disable the DISA valve or turn off the variable intake manifold capability directly. Instead, the differences between an open and closed DISA can be minimalized by making vim and non-vim tables identical, and the DISA valve error counter can be shut off so it does not trigger an SES light.

  • c_det_inc_vim (Anti-debounce counter increment for VIM driver diagnosis)

The only VIM-effected tables appear to be within the Intake Manifold Model, detailed in a prior section of this wiki

Extra Features

Cat Delete

Exhaust configuration is a learned variant with MS45.1 based on c_conf_cat, but there is no configuration that removes the cats without also disabling the upstream wideband control O2 sensors along with it, which are necessary for fuel control and adaptations. Therefore, there are a few parameters that need to be changed when your cats are removed from the car.

To quiet down the cold startup cycle you can disable the cat heating function by zero'ing out the values in:

  • ip_t_ch_tq_add (Activation time for CAT heating function 'IGA')
  • ip_t_ch_tq_add_is (Activation time for CAT heating function 'IGA at first idle phases')
  • ip_t_ch_n_sp_is (Activation time for CAT heating function 'idle speed setpoint')
  • ip_t_ch_ivvt (Activation time for CAT heating function 'VANOS')

If you completely remove your lower O2 sensors from the car you can configure c_conf_cat to 0 so the car only tries to find the two upstream O2 sensors and assumes the lower downstream O2 sensors are removed.

  • c_conf_cat (configuration bit for CAT/exhaust type)
Note: if you change c_conf_cat you must reset your learned variants, this does not happen automatically.  Learned variants can be reset by changing lc_ad_clr_var to 1. 

Alternatively, if you don't use c_conf_cat, you can turn off the diagnostics and heating functions of the lower downstream O2 sensors directly:

  • lc_lsh_down_1 (Boolean variable to enable oxygen sensor heating)
  • lc_lsh_down_2 (Boolean variable to enable oxygen sensor heating)
  • lc_inh_ls_down_man_deac (Manual deactivation of downstream oxygen sensor diagnosis)

You can force catalyst readiness by changing "switch to set the fault of the CAL data ROM test inactive" to 1. At the next engine start, the catalyst monitor should show readiness. This may or may not allow you to pass your emissions tests, as various states have different requirements.

  • lc_ls_cat_diag_cdn_man_act (switch to set the fault of the CAL data ROM test inactive)

Secondary Air Pump

The secondary air pump (SAP) and secondary air valve (SAV) are learned variants, and are learned only once during a new DME initialization, or if lc_ad_clr_var is set to 1.

During the learned variant process the DME will attempt to detect a SAP or SAV, and if found, will enable diagnostics and set LV_SAP and LV_SAV to 1. Otherwise, diagnostics are disabled and LV_SAP and LV_SAV are set to 0.

The OBD configuration can be changed to show SAP as not available by changing the 4th bit in c_obd_state_2. Some tuning applications represent this parameter in decimal form. For example, 109. You need to convert this to binary and change the 4th bit to 0, which, for example, would change 109 to 101.

  • c_obd_state_2

This should be all you need to do to disable the SAP. However, there are additional steps that can be take if you're having trouble:

The SAP can be prevented from ever turning on by zero'ing out the "Time delay to terminate SA function" table:

  • ip_t_sa_off_0 (Time delay to terminate SA function)

There is also a ip_t_sa_off_1 table, but it does not appear to be used by the DME.

These parameters disable diagnostics of the SAP:

  • lc_inh_sa_man_deac = 1 (Manual deactivation of SA diagnosis inhibition conditions)
  • lc_inh_safm_man_deac = 1 (Constant to switch of the inhibition (=1))
  • lc_sa_swi_acq = 0 (whether to use model or SAFM, 1 uses SAFM, 0 uses model)

There is a parameter that would seem to turn off the autolearning of SAP, and it does. However, when auto-learning of SAP is disabled it forces LV_SAP to 1, meaning it turns ON the SAP, which in our cases is often counter-productive. It is left here for reference:

  • lc_sap_det_di (disable flag for auto learning of SAP)

Vehicle Speed Limiter

Speed limiter is controlled by "Vehicle speed limitation threshold":

  • c_vs_max - Vehicle speed limitation threshold

Set this to 255km/h to have unrestricted vehicle speed

Engine Speed Limiter

Maximum engine speed is controlled via the electronic fuel pump control: (Switch mt with at or amt for appropriate transmissions)

  • id_n_max_mt = (Table for basic engine speed limit)
  • id_n_max_h_mt = ("Increased" engine speed limit (set to same value))

Idle Speed

A handful of maps need to be edited if you want to change your idle speed.

Increase the lowest values in these tables up to your desired idle speed:

  • ip_n_sp_is (Nominal idle speed without additional load on the engine)
  • ip_acin_n_sp_is (Nominal idle speed with air conditioner switched on)
  • ip_dri_acin_n_sp_is (Nominal idle speed with DRIVE (A/T) engaged and air conditioner switched on)
  • ip_dri_n_sp_is (Nominal idle speed with DRIVE (A/T) engaged)

Increase all of these values equally (e.g. if you want to raise your idle by 100RPM, then increase all values in these tables by 100)

  • ip_n_sp_is_pl (Nominal idle speed at PL on the engine)
  • ip_n_sp_is_cs (Idle speed setpoint for drive-off-support - manual transmission)
  • ip_dri_n_sp_ch (Max. idle speed during CAT heating with drive engaged)
  • ip_n_sp_ch (Max. idle speed during CAT heating with no drive engaged)

Special Functions

Exhaust Pop Modifications

When tuning for exhaust pops there are two approaches that can be taken

Toggleable exhaust pops

This approach disables the trailing throttle fuel cut by raising the minimum engine speed threshold for trailing throttle fuel cut to an engine speed that the engine can't reach, this will produce continuous exhaust pops as soon as the throttle is lifted.

As the MS45.x has two separate tables for when the AC is on/off for both manual and automatic gearbox, we can use that logic to for example only activate exhaust pops when the AC is on.

  • ip_n_min_puc__tco__gr_mt - Minimum engine speed for trailing throttle fuel cut activation with AC off (Manual Gear box)
  • ip_n_accout_min_puc__tco__gr_mt - Minimum engine speed for trailing throttle fuel cut activation with AC on (Manual Gear box)
  • ip_n_min_puc__tco__gr_at - Minimum engine speed for trailing throttle fuel cut activation with AC off (Automatic Gear box)
  • ip_n_accout_min_puc__tco__gr_at - Minimum engine speed for trailing throttle fuel cut activation with AC on (Automatic Gear box)

To tune the intensity of the exhaust pops the following ignition tables can be used, by retarding the ignition at lower loads (50/75 mg/stk) and up to (100 mg/stk) if you are boosted.

  • ip_iga_bas_ron_91__n__maf (Basic ignition angle for RON 91)
  • ip_iga_bas_ron_98__n__maf (Basic ignition angle for RON 98)

Timered exhaust pops

This approach uses a built-in timer function in the MS45.x which delays the activation of the trailing throttle fuel cut by a set amount of time.

With this approach it's possible to achieve a set amount of pops before the trailing throttle fuel cut is activated.

  • c_t_min_pu_vs - Delay before activating trailing throttle fuel cut when car is stationary
  • c_t_min_pu - Delay before activating trailing throttle fuel cut when cruise is active or clutch is pressed
  • c_t_min_pu_rng_l - Delay before activating trailing throttle fuel cut when cruise is active or clutch is pressed (in low range)
  • ip_t_min_pu__n__tco - Delay before activating trailing throttle fuel cut
  • ip_t_min_pu_rng_l__n__tco - Delay before activating trailing throttle fuel cut (in low range)

To tune the intensity of the exhaust pops the following ignition tables can be used, by retarding the ignition at lower loads (50/75 mg/stk) and up to (100 mg/stk) if you are boosted.

  • ip_iga_bas_ron_91__n__maf (Basic ignition angle for RON 91)
  • ip_iga_bas_ron_98__n__maf (Basic ignition angle for RON 98)