You are right.
The bug was also fixed for MSS54 nonHP in 322_1701, but never for CSL
Announcement
Collapse
No announcement yet.
CSL '0401' Program Binary Disassembly Notes
Collapse
X
-
Interesting! so BMW fixed for the standard M3 when they moved to the MSS54HP, but never bothered publishing a fix for the CSL specifically right? As you say it seems to be a pretty small bug, would be a bit of an edge case I think to cause any issue.Originally posted by ppm008 View PostKarter16
You are amazing
This bug was fixed in 323_1801 (M3 MY 04 first M3 MSS54HP)
But thats only a very small bug in SMG clutch learning behaviour
- Likes 1
Leave a comment:
-
Karter16
You are amazing
This bug was fixed in 323_1801 (M3 MY 04 first M3 MSS54HP)
But thats only a very small bug in SMG clutch learning behaviour
- Likes 1
Leave a comment:
-
Found a bug in the SMG background task:
The error check conditional checks LA1_ED twice. The second test should be LA2_ED....
- Likes 6
Leave a comment:
-
It was more of my curiosity than anything at this stage. I was just wondering if any changes could be made to the safety/operating state when sensors fail…. Eg. MAP, EGT or IAT etc.
i shall have a read of that document when I get a chance though as I’d missed that one completely.
Leave a comment:
-
Yep I have - and this funktionsrahmen document is fairly accurate if you're looking to get an understanding of how it works: https://github.com/karter16/CSL_0401...%20Concept.pdfOriginally posted by HARBER07 View PostHave you looked into how the ‘emergency program’ / limp mode operation works?. I’m wondering what changes it enables when it kicks in and any adjustability
Note that this doc doesn't talk to CSL-specific changes (specifically how rf (filling) errors are detected and escalated to the EGAS emergency program).
in terms of adjustability what would you be wanting to change?
Leave a comment:
-
Have you looked into how the ‘emergency program’ / limp mode operation works?. I’m wondering what changes it enables when it kicks in and any adjustability
Leave a comment:
-
Great work there! Sometimes my data hoarding is useful haOriginally posted by karter16 View PostSomething else that I've been looking at is a binary that terra shared with me that came from a brand new CSL DME. This DME in particular was shipped without the tune file programmed to it. In its place is what I believe is a manufacturer test software to test the unit on the (Siemens) assembly line.
the MSS54 bootloader has provision to jump to this location (there's actually a DS2 call to perform the jump) and treat the region as code.
The software appears to be a basic main loop that handles communications between the master and slave processors, as well as a very DS2-like communications protocol (literally the only differences seem to be the message ID and length bytes are swapped, the checksum calculation is different and the actual device/command IDs are different) on the same pins as DS2.
The functions that can be called all test different aspects of the DME and CPU hardware and validate their functionality.
There are also several functions for reading/writing/wiping the flash memory. Crucially the function that wipes flash sectors includes the ability to wipe and write to the bootsector. You can probably see where I'm going with this...
1: Load the code into the tune sector in place of the tune
2: DS2 call to jump to the program
3: Wipe bootsector
4: Write new bootsector
5: Reboot DME
6: Write new Program for new bootloader
7: Write new Tune for new bootloader
8: Fin.
It would be trivial to extend the MSS54 DS2 Tool to use the modified communication protocol when needed, but this introduces a different risk, which is that when the DME is in the car there are other modules listening on DS2 and the possibility can't be discounted of a packet being seen as valid by one of those other modules and causing unintended havoc. Therefore I think the way to go is a small wrapper that translates standard DS2 calls into the format required by the manufacturer test code. That way comms to the DME stays compliant with the DS2 protocol but also means very minimal change to the test software.
This will be fun to see if I can make it work, but will need to wait until I get hold of a second DME as don't want to be regularly taking my main DME apart to BDM recover it which will inevitably be required for this project.
This would enable the following functionalities:
- Change bootloader over OBDII
- Clear EWS and perform an initial sync
- It would also significantly lower the barrier to use should we want to make any bootloader-level changes as part of 0401 Community Patch in the future.
Leave a comment:
-
-
Just pay me for shipping and I'll give you a DME, as my contribution to this project :POriginally posted by karter16 View PostThis will be fun to see if I can make it work, but will need to wait until I get hold of a second DME as don't want to be regularly taking my main DME apart to BDM recover it which will inevitably be required for this project.
- Likes 2
Leave a comment:
-
Something else that I've been looking at is a binary that terra shared with me that came from a brand new CSL DME. This DME in particular was shipped without the tune file programmed to it. In its place is what I believe is a manufacturer test software to test the unit on the (Siemens) assembly line.
the MSS54 bootloader has provision to jump to this location (there's actually a DS2 call to perform the jump) and treat the region as code.
The software appears to be a basic main loop that handles communications between the master and slave processors, as well as a very DS2-like communications protocol (literally the only differences seem to be the message ID and length bytes are swapped, the checksum calculation is different and the actual device/command IDs are different) on the same pins as DS2.
The functions that can be called all test different aspects of the DME and CPU hardware and validate their functionality.
There are also several functions for reading/writing/wiping the flash memory. Crucially the function that wipes flash sectors includes the ability to wipe and write to the bootsector. You can probably see where I'm going with this...
1: Load the code into the tune sector in place of the tune
2: DS2 call to jump to the program
3: Wipe bootsector
4: Write new bootsector
5: Reboot DME
6: Write new Program for new bootloader
7: Write new Tune for new bootloader
8: Fin.
It would be trivial to extend the MSS54 DS2 Tool to use the modified communication protocol when needed, but this introduces a different risk, which is that when the DME is in the car there are other modules listening on DS2 and the possibility can't be discounted of a packet being seen as valid by one of those other modules and causing unintended havoc. Therefore I think the way to go is a small wrapper that translates standard DS2 calls into the format required by the manufacturer test code. That way comms to the DME stays compliant with the DS2 protocol but also means very minimal change to the test software.
This will be fun to see if I can make it work, but will need to wait until I get hold of a second DME as don't want to be regularly taking my main DME apart to BDM recover it which will inevitably be required for this project.
This would enable the following functionalities:
- Change bootloader over OBDII
- Clear EWS and perform an initial sync
- It would also significantly lower the barrier to use should we want to make any bootloader-level changes as part of 0401 Community Patch in the future.
- Likes 5
Leave a comment:
-
Time for an update!
After a lot of time, a few attempts, and lots of reference to the EDK/WDK module which is actually similar in some regards and helps with naming conventions etc. I've mapped out the functions for the CSL snorkel flap. Below is my equivalent of a "funktionsrahmen" for this module which, although it no doubt exists for real, I don't have it, so this will have to do. Function names, variable names and parameter names are all mine (with the exception that we know from the DS0 file disassembly that the module is called GKS), but are named logically in line with how equivalent variables and parameters are named in other modules, etc.
- Likes 8
Leave a comment:
-
Cool. I guess 'Address access time = (2.5 + WS) tcyc – tCHAV – tDICL' is probably the relevant formula? Though tCHAV has a rather large range in the datasheet so I'm not sure what to enter as a calculation. Seems like BMW is selecting flash memory that should allow for 0 wait states in most scenarios.
If I assume the target access time would be proportional to the clock speed difference, ~76ns should be acceptable (assuming 20.97MHz for MSS52/4 and 24.76 MHz for MSS54HP which I believe is correct) -- so either way I think you're right in the 70ns likely being acceptable (there are also some ancient 29f400ab's occasionally available that came in 75ns, those may work too)
Leave a comment:
-
I think this is the right diagram (from page 283 onwards here: https://github.com/karter16/CSL_0401.../MC68376.pdf):
The whole read cycle is approximately 4 clock cycles, but the data needs to be stable on the bus by the time DSACK is low for sampling. I didn't go through the table and work it out but it looks to me to be somewhere in the region of 1.25 to 1.75 clock cycles between the address being stable and data needing to be read (So as you say, less than 2 clock cycles).
I would imagine from this that 70ns is probably just fast enough to work, but I don't know whether it's too close to the edge (pun intended) or not. I'd think 90ns would likely be less successful given that's definitely more than 2 clock cycles.
- Likes 2
Leave a comment:

Leave a comment: