Originally posted by Bry5on
View Post
Announcement
Collapse
No announcement yet.
CSL '0401' Program Binary Disassembly Notes
Collapse
X
-
True, I guess you could mount a MAF anywhere near the actual air intake path and then calibrate for loses?
-
Easy enough to make an adapter for the non-CSL MAF to the lower snorkel, then just leave the flap closed.Originally posted by ac427 View PostAre MAF's available in the CSL snorkel diameter?
It would interesting to implement an MAF for part throttle quality research.
Apologies, i could have put these these as one post but i was using the phone on the train home.
Leave a comment:
-
What year did the E46 M3 GTR come out?
It was a V8. I'm not sure which ECU it used though.
Also, which DME did the E39 M5 have, probably a previous generation MSS5x ECU.
Leave a comment:
-
I can't say for sure but all the code I've seen is capable of handling 8 cylinders (eg all the TZ and TI arrays are for 8 cyl etc), plus has 2x HFM A/D converters. Standard M3 just uses HFM1 (pin 1 on X60003), HFM2 is pin 18 and 0401 uses this for the MAP sensor and HFM1 for flap pot. As it stands 0401 as is wouldn't run it because HFM2 is assumed to be MAP sensor, but certainly could have been a derivative I would imagine.
Pretty sure a lot of the code is fairly common across MSS54 and MSS52, plus funktionsrahmen suggests at least some fmodules are ported to/from MSS60 project.
Edit: to be clear, MSS54 software in general has provision for 8 cylinders, which I presume is due to similarity with MSS52 software.Last edited by karter16; 03-05-2025, 09:47 PM.
- Likes 4
Leave a comment:
-
Dream E46 M3 right there and it was SMG too. LOVE IT!
Leave a comment:
-
karter16
Is there anything that would suggest BMW used some of the code to develop the one-off E46 M3 CSL V8? I think that Terra said that the MSS54/HP has spots on the circuit board to drive two extra cylinders. Also, the S62 did run on MAFs.
Last edited by Slideways; 03-05-2025, 08:56 PM.
- Likes 1
Leave a comment:
-
I'll bet they tuned the car with an HFM in the loop at some point to get the cam baselines
- Likes 1
Leave a comment:
-
Fun fact (which other people may already know, I just didn't) - the final RF calculation function in 0401 actually has provision for use of an HFM (MAF) sensor. The HFM sensor is assumed to to be plugged in to HFM1 (which in 0401 default config is the potentiometer for the CSL flap), but there are a number of parameters which can be set which configures the HFM1 A/D converter and ring buffer for a MAF sensor and derives the final RF from the ML value from HFM1. This is interesting as the final RF function in 0401 is not a copy/paste job from the standard MSS54HP code (e.g. it's an intentional inclusion, not a failure to omit). What I haven't looked into yet is whether any of the HFM tables differ from MSS54HP. I'm presuming that it would be calibrated for the standard M3 HFM sensor and cross-sectional area.
Here's the relevant line from the final RF calc function which I've posted before:
And here's the function which reads the A/D converter ring buffer:
- Likes 2
Leave a comment:
-
Have identified the curve at 0xD002 - it describes the maximum torque to be applied by the Moment Manager in the event of a CAN SMG error state being stored in CAN_ED_SMG. The x axis is V (in km/h) and the y axis is torque (in Nm).
I've named the curve kl_md_can_ed_smg_max.
The curve is referenced in the function at 0x0001b0c2 which I have named md_can_ed_smg_max_calc()
This function in turn is run in one of the timed tasks (pretty sure it's the 20ms task but not 100% sure yet) if the gearbox type is SMGII.
and md_can_ed_smg_max itself is used in the Torque Limitation function of the Moment Manager.
- Likes 2
Leave a comment:
-
Have published the XDF - figured it was worth it's own post so you can find that, along with the download link, here: https://nam3forum.com/forums/forum/s...p-csl-0401-xdf
- Likes 3
Leave a comment:
-
And no overflows! Impressive
.
In my other car, I wrote my own motor controller code and found a sneaky overflow bug that commanded full throttle when a calculation overflowed above 55mph. I’d missed ONE mathematical operation in my giant excel sheet that hunted for overflows. Sure was freaky when that electric motor all of a sudden took off on my drive to work, and I was glad to have good brakes.
- Likes 2
Leave a comment:
-
It occurred to me that it may or may not be immediately apparent to everyone as to why the program code contains so many scaling factors and offsets hardcoded into the program flow.
The reason for this is that the MSS54 CPU does not have an FPU (floating point unit). This means that the CPU is unable to natively perform floating point calculations and therefore all calculations are done with integer values. This is where all the bitshifts (multiplication/division by powers of 2) multiplication/division/addition/subtraction of parameters and consts comes in.
Say for example you have a filtered pressure reading from your MAP sensor of 800mbar. You now need to apply a correction factor of 1.03 (e.g. 800 * 1.03 = 824). The problem is that you can't represent 1.03 as floating point value, so you need to store it as a value that can be represented as an integer.We can't just round 1.03 to 1 because then we'll get 800 * 1 = 800, which isn't what we want. What we can do is represent 1.03 as 103 in an integer just fine, so we do that, we add a parameter into the partial binary and give it a value of DEC 103. Now we can apply our correction factor (e.g. 800 * 103 =82400). However now our result is 100 times too big. So what we do is modify the code to multiply our pressure by our correction factor and then divide the result by 100. This gives us (800 * 103 = 82400) and then we divide that by 100 to get 824. We've managed to get to the right end result without having to use floating point numbers.
This is a simple example, but you can easily envisage calculations which require lots of these scenarios and it can quickly get complicated, like this:
Last edited by karter16; 02-26-2025, 06:09 PM.
- Likes 2
Leave a comment:
-
No worries - with the caveat that I haven't been through every reference to TABG (exhaust gas temp) I believe it is mostly used for calculating cat heating (including TKATM which is the cat temperature model) and the cat protection factor. Most of cold start factors that I have come across reference TMOT (and from memory TOEL in a couple of places, although I might be wrong). When I get a chance I'll look into this more and give you a more definitive answer.
- Likes 1
Leave a comment:

Leave a comment: