What is this?
'Community Patch' consists of the stock CSL '0401' program and tune binaries, with a collection of core modifications that have been made to serve the needs of the community. The intent of Community Patch is to consolidate the knowledge that has been gained into a single pair of binaries that can be used as the foundation of CSL conversions. I say "pair of binaries" because I intend to maintain Community Patch for both those running 2500 CSL boot loader and the 2300 M3 boot loader.
Version 1 of Community Patch includes a few core improvements/consolidations that I think will be useful to the community as a whole. The goal would be to maintain future versions of Community Patch where those additions would benefit the community at large.
Disclaimer
Modification of your DME's code is inherently risky. Use of any modified program or binary is at your own risk. The binaries provided here are intended for off-road uses only. Every reasonable effort has been taken to ensure that the changes made are sound and free of error, however the author takes no responsibility for any issues and/or negative outcomes arising from the use of these binaries.
It should be noted that the nature of the changes made do not interact with or impact the safety mechanisms built into the OE software in any way. If you are concerned or have any specific questions I am happy to provide more information.
Acknowledgements
This is the latest iteration of years of effort from many in the community. In particular I believe it was Paffy who figured out the initial trick to get the CSL software working with the M3 boot loader, and then Terra who figured out the fix for reading codes. I'm honoured to be able to add my own contributions to the work of legends such as these.
Why would I want to use this?
Community Patch is for those who want to run the CSL program on their DME. The main reason you would want to do this is if you are installing a CSL airbox and MAP sensor in your M3.
How do I use it?
Instructions on the various ways to program your DME, get setup for it, etc. are currently outside the scope of this post. The key steps are below:
1: Take a backup of your current program and tune files
2: Flash the appropriate program binary for your bootloader
3: Take the Tune (partial) binary and make any changes that you need to to it (common changes are things like VANOS offsets, disabling certain DTCs, etc.).
3a If you currently run a CSL program and tune and are converting to Community Patch you can use your existing tune, with the following caveats: (1: if using the M3 boot loader you need to set K_FR_T_ADAPT to 0x100. 2: If you are currently sending the Alternator (GEN_ST) signal over CAN you need to set K_GEN_CFG, K_GEN_TP and K_GEN_HYS accordingly. The easiest way to do this is to use the XDF reference below and apply the appropriate patches)

4: Flash the Tune (partial) binary to the car.
5: Enjoy.
Why would I want to migrate?
The key reasons you might want to migrate are:
1: You are running / want to run the CSL boot loader and want to also be able to send the Alternator signal over CAN. Community Patch supports this use case.
2: You are running the M3 boot loader and would like to resolve the Filling Regulator adaption issue.
3: You have encountered issues with emissions computer connectivity and would like this to be resolved.
4: You happen to want to read rf_psau over DS2 (e.g. via TestO or similar).
Changelog
211325000401PD31_Community_Patch_v1 (CSL Bootloader)
- Ability to configure sending of GEN_ST signal in DME4 CAN message (adapted from Terra's approach to this in his M3 boot loader binary).
- Fix for emissions computer connectivity as per SIB_12_11_06.
- Fix for rf_psau in DS2 serial frame as per https://nam3forum.com/forums/forum/s...he-csl-program.
211323000401PD31_Community_Patch_v1 (M3 Bootloader)
- Program ROM version changed to reflect 32300 bootloader.
- K_FR_T_ADAPT (Filling Regulator adaptation lockout time) changed from 0x96 (1.5 seconds) to 0x100 (2.56 seconds) to facilitate playing nicely with the 32300 bootloader.
- Ability to configure sending of GEN_ST signal in DME4 CAN message (adapted from Terra's approach to this).
- Fix for emissions computer connectivity as per SIB_12_11_06.
- Fix for rf_psau in DS2 serial frame as per https://nam3forum.com/forums/forum/s...he-csl-program.
​
Notes
- Note that the configuration parameters K_GEN_CFG, K_GEN_TP and K_GEN_HYS are in a different location in Community Patch to that of Terra's Modified Binary, therefore if migrating from Terra's Modified Binary you will need to configure these values as per the XDF.
Download
211325000401PD31_Community_Patch_v1 (CSL Bootloader)​
Please Note: I have binaries ready, but because I am not running the CSL boot loader currently I can't personally test it until I have time to swap over to the CSL boot loader. If you wish to volunteer to be the beta tester for this please let me know. Otherwise I'll make the files available as soon as I've personally tested them.
211323000401PD31_Community_Patch_v1 (M3 Bootloader)​
211323000401PD31_Community_Patch_v1.bin.zip
211323000401PD31_Community_Patch_v1_Partial.bin.zi p
XDF
CSL_0401_Community_Patch_v1.xdf.zip
I have technical questions
Q1: What's with the boot loaders?
A1: The boot loader in the DME is used to perform initial setup of the DME before it boots into the operating system. The CSL boot loader (v2500) and the M3 boot loader (v2300) differ. The differences are EXTREMELY limited. The only differences between the two are the version strings and references to K_FSP_CONCEPT in both the Master and Slave tunes. The CSL and M3 tunes have these parameters stored in different places. This is what Terra figured out a workaround for to make reading codes function correctly. Aside from that there are no other differences between the two.
Community Patch for the M3 (2300) boot loader contains the modified version checks that Paffy originally designed, as well as a fix for K_FSP_CONCEPT (although this differs somewhat from Terra's fix in order to avoid a resultant bug).
Q2: How exactly does the fix for reading codes work?
A2: On both the Master and Slave the M3 boot loader looks in incorrect (for the CSL tune) locations for K_FSP_CONCEPT. The check in the boot loader code is for != 0 so we just need the byte where it is looking to be anything other than zero. On the Slave this is fine as the byte it looks at happens to be the first byte of the DTC configuration item for SMG CAN failure. This is a non-zero value so works as expected.
On the Master however it looks at the high byte of what is K_FR_T_ADAPT, which is a 2byte word that defines how long a set of conditions needs to be true before the Filling Regulator module will perform an adaptation. This value by default is 0x0096 which equates to about 1.5 seconds. The fix that Terra applied was to turn K_FR_T_ADAPT into a single byte coding 0x96, and use the previous byte, set as 0x01, for K_FSP_CONCEPT. Unfortunately this had the side effect of K_FR_T_ADAPT actually being treated as the value 0x9600. This meant that the conditions that should trigger a Filling Regulator adaption pretty much never occurred.
Community Patch fixes this in a more straightforward way (thanks to bmwfnatic). By setting K_FR_T_ADAPT to 0x100 the byte that the boot loader is looking at is now !=0 as required, and K_FR_T_ADAPT is now ~2.5 seconds instead of 1.5s. For the purposes of triggering the Filling Regulator adaption this change is essentially irrelevant.
'Community Patch' consists of the stock CSL '0401' program and tune binaries, with a collection of core modifications that have been made to serve the needs of the community. The intent of Community Patch is to consolidate the knowledge that has been gained into a single pair of binaries that can be used as the foundation of CSL conversions. I say "pair of binaries" because I intend to maintain Community Patch for both those running 2500 CSL boot loader and the 2300 M3 boot loader.
Version 1 of Community Patch includes a few core improvements/consolidations that I think will be useful to the community as a whole. The goal would be to maintain future versions of Community Patch where those additions would benefit the community at large.
Disclaimer
Modification of your DME's code is inherently risky. Use of any modified program or binary is at your own risk. The binaries provided here are intended for off-road uses only. Every reasonable effort has been taken to ensure that the changes made are sound and free of error, however the author takes no responsibility for any issues and/or negative outcomes arising from the use of these binaries.
It should be noted that the nature of the changes made do not interact with or impact the safety mechanisms built into the OE software in any way. If you are concerned or have any specific questions I am happy to provide more information.
Acknowledgements
This is the latest iteration of years of effort from many in the community. In particular I believe it was Paffy who figured out the initial trick to get the CSL software working with the M3 boot loader, and then Terra who figured out the fix for reading codes. I'm honoured to be able to add my own contributions to the work of legends such as these.
Why would I want to use this?
Community Patch is for those who want to run the CSL program on their DME. The main reason you would want to do this is if you are installing a CSL airbox and MAP sensor in your M3.
How do I use it?
Instructions on the various ways to program your DME, get setup for it, etc. are currently outside the scope of this post. The key steps are below:
1: Take a backup of your current program and tune files
2: Flash the appropriate program binary for your bootloader
3: Take the Tune (partial) binary and make any changes that you need to to it (common changes are things like VANOS offsets, disabling certain DTCs, etc.).
3a If you currently run a CSL program and tune and are converting to Community Patch you can use your existing tune, with the following caveats: (1: if using the M3 boot loader you need to set K_FR_T_ADAPT to 0x100. 2: If you are currently sending the Alternator (GEN_ST) signal over CAN you need to set K_GEN_CFG, K_GEN_TP and K_GEN_HYS accordingly. The easiest way to do this is to use the XDF reference below and apply the appropriate patches)
4: Flash the Tune (partial) binary to the car.
5: Enjoy.
Why would I want to migrate?
The key reasons you might want to migrate are:
1: You are running / want to run the CSL boot loader and want to also be able to send the Alternator signal over CAN. Community Patch supports this use case.
2: You are running the M3 boot loader and would like to resolve the Filling Regulator adaption issue.
3: You have encountered issues with emissions computer connectivity and would like this to be resolved.
4: You happen to want to read rf_psau over DS2 (e.g. via TestO or similar).
Changelog
211325000401PD31_Community_Patch_v1 (CSL Bootloader)
- Ability to configure sending of GEN_ST signal in DME4 CAN message (adapted from Terra's approach to this in his M3 boot loader binary).
- Fix for emissions computer connectivity as per SIB_12_11_06.
- Fix for rf_psau in DS2 serial frame as per https://nam3forum.com/forums/forum/s...he-csl-program.
211323000401PD31_Community_Patch_v1 (M3 Bootloader)
- Program ROM version changed to reflect 32300 bootloader.
- K_FR_T_ADAPT (Filling Regulator adaptation lockout time) changed from 0x96 (1.5 seconds) to 0x100 (2.56 seconds) to facilitate playing nicely with the 32300 bootloader.
- Ability to configure sending of GEN_ST signal in DME4 CAN message (adapted from Terra's approach to this).
- Fix for emissions computer connectivity as per SIB_12_11_06.
- Fix for rf_psau in DS2 serial frame as per https://nam3forum.com/forums/forum/s...he-csl-program.
​
Notes
- Note that the configuration parameters K_GEN_CFG, K_GEN_TP and K_GEN_HYS are in a different location in Community Patch to that of Terra's Modified Binary, therefore if migrating from Terra's Modified Binary you will need to configure these values as per the XDF.
Download
211325000401PD31_Community_Patch_v1 (CSL Bootloader)​
Please Note: I have binaries ready, but because I am not running the CSL boot loader currently I can't personally test it until I have time to swap over to the CSL boot loader. If you wish to volunteer to be the beta tester for this please let me know. Otherwise I'll make the files available as soon as I've personally tested them.
211323000401PD31_Community_Patch_v1 (M3 Bootloader)​
211323000401PD31_Community_Patch_v1.bin.zip
211323000401PD31_Community_Patch_v1_Partial.bin.zi p
XDF
CSL_0401_Community_Patch_v1.xdf.zip
I have technical questions
Q1: What's with the boot loaders?
A1: The boot loader in the DME is used to perform initial setup of the DME before it boots into the operating system. The CSL boot loader (v2500) and the M3 boot loader (v2300) differ. The differences are EXTREMELY limited. The only differences between the two are the version strings and references to K_FSP_CONCEPT in both the Master and Slave tunes. The CSL and M3 tunes have these parameters stored in different places. This is what Terra figured out a workaround for to make reading codes function correctly. Aside from that there are no other differences between the two.
Community Patch for the M3 (2300) boot loader contains the modified version checks that Paffy originally designed, as well as a fix for K_FSP_CONCEPT (although this differs somewhat from Terra's fix in order to avoid a resultant bug).
Q2: How exactly does the fix for reading codes work?
A2: On both the Master and Slave the M3 boot loader looks in incorrect (for the CSL tune) locations for K_FSP_CONCEPT. The check in the boot loader code is for != 0 so we just need the byte where it is looking to be anything other than zero. On the Slave this is fine as the byte it looks at happens to be the first byte of the DTC configuration item for SMG CAN failure. This is a non-zero value so works as expected.
On the Master however it looks at the high byte of what is K_FR_T_ADAPT, which is a 2byte word that defines how long a set of conditions needs to be true before the Filling Regulator module will perform an adaptation. This value by default is 0x0096 which equates to about 1.5 seconds. The fix that Terra applied was to turn K_FR_T_ADAPT into a single byte coding 0x96, and use the previous byte, set as 0x01, for K_FSP_CONCEPT. Unfortunately this had the side effect of K_FR_T_ADAPT actually being treated as the value 0x9600. This meant that the conditions that should trigger a Filling Regulator adaption pretty much never occurred.
Community Patch fixes this in a more straightforward way (thanks to bmwfnatic). By setting K_FR_T_ADAPT to 0x100 the byte that the boot loader is looking at is now !=0 as required, and K_FR_T_ADAPT is now ~2.5 seconds instead of 1.5s. For the purposes of triggering the Filling Regulator adaption this change is essentially irrelevant.

Comment