Comer352L / FreeSSM

GNU General Public License v3.0
215 stars 67 forks source link

Extra Functionality? #70

Open rimwall opened 1 year ago

rimwall commented 1 year ago

Hi,

Great work on keeping FreeSSM running!

I have been reverse engineering a 5EAT TCU ROM and have come across what look like SSM 'hidden' features allowing clutch / brake pressure corrections, similar to those that you already have for 4ATs. I was wondering if these can be easily added to FreeSSM for folks to adjust?

For 4ATs you have:

    << "26-1;1;72;;Line Pressure Correction;%;90;110;100;-100;0"
    << "A11020;1;73;;Gear Shift Line Pressure Correction - 1st to 2nd;kgf;90;110;100;-100/50;2"
    << "A11020;1;74;;Gear Shift Line Pressure Correction - 2nd to 3rd;kgf;90;110;100;-100/50;2"
    << "A11020;1;75;;Gear Shift Line Pressure Correction - 3rd to 4th;kgf;90;110;100;-100/50;2"
    << "A11020;1;76;;Gear Shift Line Pressure Correction - 4th to 3rd;kgf;90;110;100;-100/50;2"
    << "A11020;1;77;;Gear Shift Line Pressure Correction - 4th to 2nd;kgf;90;110;100;-100/50;2"
    << "A11020;1;78;;Gear Shift Line Pressure Correction - 3rd to 2nd;kgf;90;110;100;-100/50;2"
    << "27-8;1;79;;2-4-Brake Pressure 1 Correction;%;90;110;100;-100;0"
    << "27-7;1;7A;;2-4-Brake Pressure 2 Correction - 1st to 2nd;kgf;90;110;100;-100/50;2"
    << "27-7;1;7B;;2-4-Brake Pressure 2 Correction - 2nd to 3rd;kgf;90;110;100;-100/50;2"
    << "27-7;1;7C;;2-4-Brake Pressure 2 Correction - 3rd to 4th;kgf;90;110;100;-100/50;2"
    << "27-7;1;7D;;2-4-Brake Pressure 2 Correction - 4th to 3rd;kgf;90;110;100;-100/50;2"
    << "27-7;1;7E;;2-4-Brake Pressure 2 Correction - 4th to 2nd;kgf;90;110;100;-100/50;2"
    << "27-7;1;7F;;2-4-Brake Pressure 2 Correction - 3rd to 2nd;kgf;90;110;100;-100/50;2"
    << "27-6;1;80;;Correction of Transfer Duty Ratio;%;90;110;100;-100;0"
    << "27-5;1;81;;Slope Control;;0;1;0;0=Allowance,1=No Access;"
    << "27-4;1;82;;Center Differential;%;50;150;100;*1;0"
    << "27-3;1;171;170;Correction of AWD Clutch Torque;Nm;63535;2000;0;s16/50;0";

On 5EATs, only the last of these is currently available. However, there are other variables at different SSM offsets. I haven't fully reverse engineered all the various calculations, but these corrections look similar to gear shift corrections, except they seem to be linked to the particular brake / clutch instead of the gear change, as per the following:

Offset Description
16C    Input Clutch Pressure Correction (equivalent to 3rd to 4th?)
16D    High Low Reverse Clutch Pressure Correction (equivalent to 2nd to 3rd?)
16E    Direct Clutch Pressure Correction (equivalent to 1st to 2nd?)
16F    Front Brake Pressure Correction (equivalent to 4th to 5th?)
6F0    Forward Brake Pressure Correction
6F1    4WD Pressure Correction
6F2    Low Coast Brake Pressure Correction
6F3    Temperature basis for all above Corrections 

Before being used in the ROM, the byte values are adjusted as follows 16C, D, E are multiplied by 2 and subtracted from 1000 16F, 6F0, 6F1 are multiplied by 2 only 6F2 is multiplied by 4 only 6F3 has 50 subtracted from it

When used in the ROM, the input pressure and temperature are adjusted as above, and then the actual pressure correction is looked up in a 3D table. I need to check whether the various values are signed or unsigned.

Hopefully adding this in only requires an adjustment to SSMFlagByteDefinitions_en.cpp?

Comer352L commented 1 year ago

Sorry for the late reply, I had some really hard weeks...

I have been reverse engineering a 5EAT TCU ROM and have come across what look like SSM 'hidden' features allowing clutch / brake pressure corrections, similar to those that you already have for 4ATs. I was wondering if these can be easily added to FreeSSM for folks to adjust?

For 4ATs you have:

  << "26-1;1;72;;Line Pressure Correction;%;90;110;100;-100;0"
  << "A11020;1;73;;Gear Shift Line Pressure Correction - 1st to 2nd;kgf;90;110;100;-100/50;2"
  << "A11020;1;74;;Gear Shift Line Pressure Correction - 2nd to 3rd;kgf;90;110;100;-100/50;2"
  << "A11020;1;75;;Gear Shift Line Pressure Correction - 3rd to 4th;kgf;90;110;100;-100/50;2"
  << "A11020;1;76;;Gear Shift Line Pressure Correction - 4th to 3rd;kgf;90;110;100;-100/50;2"
  << "A11020;1;77;;Gear Shift Line Pressure Correction - 4th to 2nd;kgf;90;110;100;-100/50;2"
  << "A11020;1;78;;Gear Shift Line Pressure Correction - 3rd to 2nd;kgf;90;110;100;-100/50;2"
  << "27-8;1;79;;2-4-Brake Pressure 1 Correction;%;90;110;100;-100;0"
  << "27-7;1;7A;;2-4-Brake Pressure 2 Correction - 1st to 2nd;kgf;90;110;100;-100/50;2"
  << "27-7;1;7B;;2-4-Brake Pressure 2 Correction - 2nd to 3rd;kgf;90;110;100;-100/50;2"
  << "27-7;1;7C;;2-4-Brake Pressure 2 Correction - 3rd to 4th;kgf;90;110;100;-100/50;2"
  << "27-7;1;7D;;2-4-Brake Pressure 2 Correction - 4th to 3rd;kgf;90;110;100;-100/50;2"
  << "27-7;1;7E;;2-4-Brake Pressure 2 Correction - 4th to 2nd;kgf;90;110;100;-100/50;2"
  << "27-7;1;7F;;2-4-Brake Pressure 2 Correction - 3rd to 2nd;kgf;90;110;100;-100/50;2"
  << "27-6;1;80;;Correction of Transfer Duty Ratio;%;90;110;100;-100;0"
  << "27-5;1;81;;Slope Control;;0;1;0;0=Allowance,1=No Access;"
  << "27-4;1;82;;Center Differential;%;50;150;100;*1;0"
  << "27-3;1;171;170;Correction of AWD Clutch Torque;Nm;63535;2000;0;s16/50;0";

On 5EATs, only the last of these is currently available. However, there are other variables at different SSM offsets.

It has been a very long time since I was looking into this... As you can see, support for some of these values is signaled with flag bits. The gear shift line pressures are supported by all E-4AT TCUs with Sys ID A11020. Well, at least at the time I added them... Can you confirm that your TCU has the flag bits set as above ?

I haven't fully reverse engineered all the various calculations, but these corrections look similar to gear shift corrections, except they seem to be linked to the particular brake / clutch instead of the gear change, as per the following:

Offset Description
16C    Input Clutch Pressure Correction (equivalent to 3rd to 4th?)
16D    High Low Reverse Clutch Pressure Correction (equivalent to 2nd to 3rd?)
16E    Direct Clutch Pressure Correction (equivalent to 1st to 2nd?)
16F    Front Brake Pressure Correction (equivalent to 4th to 5th?)
6F0    Forward Brake Pressure Correction
6F1    4WD Pressure Correction
6F2    Low Coast Brake Pressure Correction
6F3    Temperature basis for all above Corrections 

Before being used in the ROM, the byte values are adjusted as follows 16C, D, E are multiplied by 2 and subtracted from 1000 16F, 6F0, 6F1 are multiplied by 2 only 6F2 is multiplied by 4 only 6F3 has 50 subtracted from it

Many thanks for this information. I'm pretty sure they were not supported at the time I added them.

When used in the ROM, the input pressure and temperature are adjusted as above, and then the actual pressure correction is looked up in a 3D table. I need to check whether the various values are signed or unsigned.

Hopefully adding this in only requires an adjustment to SSMFlagByteDefinitions_en.cpp?

Indeed. But first I would like to find out which TCUs support the adjustments. I don't have a good feeling if people write to addresses which are not supported by their TCUs...

Do you have any clues ? Could also depend on the ROM-ID... Can you send me a dump file of your TCU IDs and flag bits ? Just press the keys Ctrl+Alt+Return when you are in the main menu and a file called dump.dat will show up in your home directory. Please send me the file directly via email (you'll find the address in the "About" dialog.

rimwall commented 1 year ago

Thanks for replying! I shot you an email...