Compare commits
2 Commits
oem_pwm_ph
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 606090d08c | |||
| 40bda00efa |
@@ -25,7 +25,7 @@
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1645530980" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.2021318695" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32G431KBUx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../Drivers/STM32G4xx_HAL_Driver/Inc | ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy | ../Drivers/CMSIS/Device/ST/STM32G4xx/Include | ../Drivers/CMSIS/Include || || || USE_HAL_DRIVER | STM32G431xx || || Drivers | Core/Startup | Core || || || ${workspace_loc:/${ProjName}/STM32G431KBUX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1251078204" name="Cpu clock frequence" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="160" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.converthex.1315450990" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.converthex" value="true" valueType="boolean"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.converthex.1315450990" name="Convert to Intel Hex file (-O ihex)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.converthex" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.723718408" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
||||
<builder buildPath="${workspace_loc:/KBU6_tests}/Debug" enabledIncrementalBuild="true" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.140640651" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
|
||||
<tool command="gcc -gdwarf-4" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1812956542" name="MCU/MPU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
|
||||
|
||||
@@ -192,7 +192,7 @@ static const uint8_t STARTUP_PAYLOAD_2[8] = {0x81, 0x7F, 0x1C, 0x38, 0x1C, 0xFC,
|
||||
static const uint8_t EPS_0024_PAYLOAD[8] = {0x64, 0x01, 0x01, 0x00, 0x00, 0x00, 0x5B, 0x37}; //0x75 immo 1 0x71 immo 0
|
||||
static const uint8_t EPS_00B2_PAYLOAD[8] = {0x64, 0x01, 0x01, 0x00, 0x00, 0x21, 0x5B, 0x37};*/
|
||||
#elif defined(T06211)
|
||||
static const uint8_t STARTUP_PAYLOAD[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; //0x75 immo 1 0x71 immo 0
|
||||
static const uint8_t STARTUP_PAYLOAD[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
#elif defined(T06209) || defined(T06216)
|
||||
static const uint8_t STARTUP_PAYLOAD[8] = {0x00, 0x00, 0x21, 0xD7, 0x46, 0xBA, 0xE9, 0x5F}; //0x75 immo 1 0x71 immo 0
|
||||
|
||||
@@ -8,23 +8,20 @@
|
||||
#ifndef INC_ID_H_
|
||||
#define INC_ID_H_
|
||||
|
||||
/* 504 012 */
|
||||
|
||||
/* DEBUG PARAMETERS*/
|
||||
#define T06301 //ford 004 -> 002 004 006 || 504 -> 010 018
|
||||
//#define T06301 //ford 004 -> 002 004 006 || 504 -> 010 018
|
||||
//#define T06215 //bmw rover 004 -> 005 014 015 016 017 || 504 -> 005 007 017 || 006 -> 001 002 003 004 007 008
|
||||
//#define T15021 //audi 506 -> 030 033
|
||||
//#define T31804 //audi 506 -> 037 038
|
||||
//#define T06209 //eq: T06216
|
||||
//#define T06211
|
||||
#define T06211
|
||||
|
||||
//#define _004006
|
||||
//#define _004004
|
||||
#define _004002
|
||||
//#define _504003
|
||||
//#define _504009
|
||||
//#define _504010
|
||||
#define _504012
|
||||
|
||||
/* FORD */
|
||||
#define FORD_SYNC_PULSE_OUT 1
|
||||
#define FORD_SYNC_PULSE_OUT 0
|
||||
|
||||
#define ENABLE_AUDI_IMMO 0
|
||||
#define HAS_PREINJECTION 0
|
||||
@@ -32,28 +29,28 @@
|
||||
#define CYLINDERS 4
|
||||
|
||||
/* TIMING COMPENSATIONS */
|
||||
#define PHI1 24.914
|
||||
#define PHI1 41.016
|
||||
|
||||
#define TEIN_NOMINAL 0
|
||||
#define TEIN_FAULT 950.5
|
||||
#define TEIN_NOMINAL 1550
|
||||
//(phiad - injangle with fault tein)*totime = teinnom
|
||||
#define TEIN_FAULT 950
|
||||
|
||||
/* ALL FBKW */
|
||||
#define FBKW_DEM_M 0.5
|
||||
#define FBKW_DEM_TEMP_M -0.0145
|
||||
#define FBKW_DEM_TEMP_N 0.53
|
||||
#define FBKW_DEM_TEMP_M 0
|
||||
#define FBKW_DEM_TEMP_N -7.7
|
||||
|
||||
#define FBKW_DEM_A1 1.42
|
||||
#define FBKW_DEM_A2 1.45
|
||||
#define FBKW_DEM_A3 -0.459
|
||||
//rpm comp
|
||||
#define FBKW_DEM_A1 0
|
||||
#define FBKW_DEM_A2 0
|
||||
#define FBKW_DEM_A3 0
|
||||
|
||||
#define FBKW_DEM_ME_M 0.0031
|
||||
#define FBKW_DEM_ME_N 0.527
|
||||
#define FBKW_DEM_MIN -6
|
||||
|
||||
#define FBKW_DEM_MIN 0
|
||||
#define FBKW_FEEDBACK_ZERO 53.75
|
||||
#define FBKW_FEEDBACK_MIN -5.367
|
||||
#define FBKW_FEEDBACK_MAX 21.27
|
||||
|
||||
#define FBKW_FEEDBACK_ZERO 7.617
|
||||
#define FBKW_FEEDBACK_MIN -3.188
|
||||
#define FBKW_FEEDBACK_MAX 17.813
|
||||
#define FBKW_FEEDBACK_IC_DT 27
|
||||
|
||||
#define FBKW_PID_KP 90 //16
|
||||
@@ -68,7 +65,7 @@
|
||||
#define FBKW_PWM_MIN 5
|
||||
|
||||
#define FBKW_MAX 90 //en 504 parece que era 506
|
||||
#define FBKW_MAX_REAL_DEM 165
|
||||
#define FBKW_MAX_REAL_DEM 165 //wtf is this
|
||||
|
||||
/* CAN DEFINITIONS */
|
||||
#define CAN_BAUDRATE 500
|
||||
@@ -76,9 +73,9 @@
|
||||
#define CAN_EMPF2_INSTANT 0
|
||||
|
||||
/* ALL FUELMAP */
|
||||
#define FM_N_RPM 10
|
||||
#define FM_N_ME 12
|
||||
#define FM_N_T 6
|
||||
#define FM_N_RPM 6
|
||||
#define FM_N_ME 11
|
||||
#define FM_N_T 5
|
||||
|
||||
|
||||
/* PEAK AND HOLD */
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
//#define T06209 //eq: T06216
|
||||
#define T06211
|
||||
|
||||
#define _504012
|
||||
|
||||
/* FORD */
|
||||
#define FORD_SYNC_PULSE_OUT 0
|
||||
|
||||
|
||||
@@ -48,13 +48,18 @@ static KL_FaultCode s_dtc_list[KL_DTC_TOTAL_RECORDS];
|
||||
static size_t s_dtc_count = 0;
|
||||
|
||||
/* Default test DTCs */
|
||||
static const KL_FaultCode s_default_dtcs[] = {
|
||||
/*static const KL_FaultCode s_default_dtcs[] = {
|
||||
{ 0x5B, 0x20, 0x55 },
|
||||
{ 0x50, 0x20, 0x03 },
|
||||
{ 0x56, 0x20, 0x56 },
|
||||
{ 0x5E, 0x30, 0x60 },
|
||||
};*/
|
||||
static const KL_FaultCode s_default_dtcs[] = {
|
||||
{ 0x00, 0xFF, 0xFF },
|
||||
{ 0x00, 0xFF, 0xFF },
|
||||
{ 0x00, 0xFF, 0xFF },
|
||||
{ 0x00, 0xFF, 0xFF },
|
||||
};
|
||||
|
||||
/* ================================================================
|
||||
* Password / login bodies (from old kline.c)
|
||||
* ================================================================ */
|
||||
|
||||
@@ -77,19 +77,25 @@ static const RomStrEntry_t s_rom_str_table[] = {
|
||||
* Stored as a flat array so any-length chunk reads reconstruct correctly.
|
||||
* Byte values derived from protocol capture.
|
||||
*/
|
||||
/*static const uint8_t s_dtc_eeprom_block[64] = {
|
||||
0x50, 0x20, 0xAB, 0x0A, 0x0E, 0x09, 0x01, 0xED, 0x5A, 0x20, 0xDF, 0x2D, 0x05,
|
||||
0x00, 0x02, 0x33, 0x5B, 0x20, 0xDF, 0x2D, 0x05, 0x00, 0x03, 0x34, 0x52, 0x20,
|
||||
0xDF, 0x2D, 0x00, 0x00, 0x04, 0x30, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
|
||||
}*/
|
||||
static const uint8_t s_dtc_eeprom_block[64] = {
|
||||
/* 0x0000-0x000C (13 bytes, DTC MSG 1) */
|
||||
0x50, 0x20, 0xAB, 0x0A, 0x0E, 0x09, 0x01, 0xED, 0x5A, 0x20, 0xDF, 0x2D, 0x05,
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
/* 0x000D-0x0019 (13 bytes, DTC MSG 2) */
|
||||
0x00, 0x02, 0x33, 0x5B, 0x20, 0xDF, 0x2D, 0x05, 0x00, 0x03, 0x34, 0x52, 0x20,
|
||||
0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF,
|
||||
/* 0x001A-0x0026 (13 bytes, DTC MSG 3) */
|
||||
0xDF, 0x2D, 0x00, 0x00, 0x04, 0x30, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
/* 0x0027-0x0033 (13 bytes, DTC MSG 4) */
|
||||
0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF,
|
||||
/* 0x0034-0x003F (12 bytes, DTC MSG 5) */
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
|
||||
};
|
||||
|
||||
/*
|
||||
* DeltaPhi calibration array (0x009A-0x00BD, 36 bytes = 18 x int16 LE).
|
||||
* 0x8000 entries are "not calibrated" placeholders.
|
||||
|
||||
@@ -46,6 +46,12 @@
|
||||
#define PSG_KUNDENNUMMER1_STR "139031 "
|
||||
#define PSG_KUNDENNUMMER2_STR " "
|
||||
#define PSG_MOD_INDEX_STR "000000"
|
||||
#elif defined(_504012)
|
||||
#define PSG_IDENT_STR "0470504012"
|
||||
#define PSG_KUNDENNUMMER_STR " "
|
||||
#define PSG_KUNDENNUMMER1_STR " "
|
||||
#define PSG_KUNDENNUMMER2_STR " "
|
||||
#define PSG_MOD_INDEX_STR "000000"
|
||||
|
||||
#else
|
||||
/* Modification index — 6 ASCII chars, ROM 0x93A7 */
|
||||
|
||||
@@ -534,8 +534,6 @@ struct fuelMapIndexes fuelMapI = { //probar este mapa
|
||||
#elif defined(_004002)
|
||||
struct AlphaStruct fuelmap_m12 = { //probar este mapa
|
||||
{
|
||||
{ 5.367, 7.371, 7.453, 7.465, 7.512, 8.414, 10.570, 11.320, 11.625, 11.930, 13.383, 14.543}, //RPM = 99
|
||||
{ 5.133, 7.242, 7.746, 7.898, 8.344, 9.059, 11.191, 11.836, 12.234, 12.621, 13.852, 14.414}, //RPM = 199
|
||||
{ 5.332, 7.313, 7.395, 7.406, 7.465, 8.379, 10.535, 11.309, 11.602, 11.883, 13.336, 14.496}, //RPM = 99
|
||||
{ 5.098, 7.219, 7.395, 7.559, 7.992, 9.023, 11.168, 11.754, 11.953, 12.164, 13.395, 14.379}, //RPM = 199
|
||||
{ 4.125, 6.340, 6.656, 7.008, 7.992, 9.059, 10.898, 11.426, 11.930, 12.434, 13.957, 15.188}, //RPM = 425
|
||||
@@ -620,7 +618,7 @@ struct AlphaStruct fuelmap_80 = { //probar este mapa
|
||||
};
|
||||
|
||||
struct fuelMapIndexes fuelMapI = { //probar este mapa
|
||||
{ 100, 200, 425, 500, 950, 1000, 1400, 1500, 2000, 2200}, //N_RPM = 17
|
||||
{ 100, 200, 425, 500, 900, 1000, 1400, 1500, 2000, 2200}, //N_RPM = 17
|
||||
{ 0.375, 0.500, 1.625, 2.500, 5.000, 10.000, 30.000, 35.000, 40.000, 45.000, 60.000, 72.000},
|
||||
{ -15.5, -5.5 ,6.3, 27.5, 47.8, 75}
|
||||
};
|
||||
@@ -820,6 +818,64 @@ struct fuelMapIndexes fuelMapI = { //probar este mapa
|
||||
{ 0.031, 0.406, 1.656, 2.406, 8.313, 24.906, 37.313, 45.688, 60.000, 72.000},
|
||||
{ -15.0, 5.1 ,30, 50, 74.5}
|
||||
};
|
||||
#elif defined(_504012)
|
||||
struct AlphaStruct fuelmap_m12 = { //probar este mapa
|
||||
{
|
||||
{ 0.434, 9.152, 9.352, 9.469, 10.430, 10.945, 11.402, 12.246, 13.137, 13.793, 13.887}, //RPM = 99.75
|
||||
{ 0.480, 9.668, 10.395, 10.465, 11.027, 12.023, 12.598, 13.852, 14.895, 15.867, 15.973}, //RPM = 199.75
|
||||
{ 0.539, 10.969, 11.215, 11.367, 12.504, 14.109, 14.309, 14.625, 15.797, 16.641, 16.652}, //RPM = 399.75
|
||||
{ 0.949, 14.871, 15.281, 15.492, 17.109, 18.656, 19.605, 21.832, 23.906, 25.641, 25.641}, //RPM = 999.75
|
||||
{ 1.441, 19.441, 19.781, 19.945, 21.434, 23.508, 24.961, 27.926, 31.313, 31.887, 31.898}, //RPM = 1599.75
|
||||
{ 1.559, 21.316, 21.855, 21.984, 23.309, 26.672, 28.266, 31.793, 34.453, 34.465, 34.488}, //RPM = 1999.75
|
||||
}
|
||||
};
|
||||
struct AlphaStruct fuelmap_m5 = { //probar este mapa
|
||||
{
|
||||
{ 0.586, 9.305, 9.504, 9.621, 10.582, 11.203, 11.707, 12.668, 13.535, 14.191, 14.273}, //RPM = 99.75
|
||||
{ 0.621, 9.809, 10.535, 10.605, 11.168, 12.246, 12.891, 14.191, 15.328, 16.277, 16.383}, //RPM = 199.75
|
||||
{ 0.691, 11.121, 11.355, 11.508, 12.645, 14.344, 14.766, 15.480, 16.652, 17.508, 17.496}, //RPM = 399.75
|
||||
{ 1.031, 14.953, 15.363, 15.574, 17.191, 18.797, 19.887, 22.254, 24.457, 26.180, 26.191}, //RPM = 999.75
|
||||
{ 1.453, 19.453, 19.793, 19.957, 21.445, 23.777, 25.254, 28.500, 32.039, 32.625, 32.625}, //RPM = 1599.75
|
||||
{ 1.582, 21.316, 21.879, 22.008, 23.320, 26.953, 28.688, 32.496, 35.309, 35.297, 35.320}, //RPM = 1999.75
|
||||
}
|
||||
};
|
||||
struct AlphaStruct fuelmap_10 = { //probar este mapa
|
||||
{
|
||||
{ 0.738, 9.457, 9.656, 9.773, 10.723, 11.461, 12.000, 13.090, 13.934, 14.590, 14.684}, //RPM = 99.75
|
||||
{ 0.762, 9.949, 10.676, 10.746, 11.309, 12.469, 13.195, 14.531, 15.750, 16.711, 16.816}, //RPM = 199.75
|
||||
{ 0.844, 11.273, 11.520, 11.672, 12.797, 14.602, 15.246, 16.406, 17.578, 18.434, 18.422}, //RPM = 399.75
|
||||
{ 1.113, 15.035, 15.445, 15.656, 17.273, 18.949, 20.191, 22.734, 25.043, 26.777, 26.777}, //RPM = 999.75
|
||||
{ 1.477, 19.477, 19.816, 19.980, 21.469, 24.070, 25.594, 29.109, 32.848, 33.422, 33.434}, //RPM = 1599.75
|
||||
{ 1.617, 21.387, 21.914, 22.031, 23.367, 27.258, 29.145, 33.293, 36.258, 36.270, 36.281}, //RPM = 1999.75
|
||||
}
|
||||
};
|
||||
struct AlphaStruct fuelmap_25 = { //probar este mapa
|
||||
{
|
||||
{ 0.855, 9.574, 9.773, 9.891, 10.852, 11.684, 12.234, 13.441, 14.262, 14.918, 15.012}, //RPM = 99.75
|
||||
{ 0.879, 10.066, 10.793, 10.863, 11.426, 12.645, 13.441, 14.824, 16.102, 17.063, 17.168}, //RPM = 199.75
|
||||
{ 0.973, 11.402, 11.648, 11.789, 12.926, 14.813, 15.645, 17.156, 18.328, 19.184, 19.172}, //RPM = 399.75
|
||||
{ 1.184, 15.105, 15.516, 15.727, 17.344, 19.078, 20.449, 23.121, 25.535, 27.270, 27.246}, //RPM = 999.25
|
||||
{ 1.500, 19.500, 19.840, 20.004, 21.492, 24.316, 25.875, 29.625, 33.516, 34.102, 34.102}, //RPM = 1599.75
|
||||
{ 1.629, 21.410, 21.926, 22.043, 23.379, 27.516, 29.520, 33.949, 37.055, 37.066, 37.066}, //RPM = 1999.75
|
||||
}
|
||||
};
|
||||
struct AlphaStruct fuelmap_60 = { //probar este mapa
|
||||
{
|
||||
{ 1.020, 9.738, 9.938, 10.055, 11.016, 11.965, 12.551, 13.887, 14.695, 15.340, 15.434}, //RPM = 99.75
|
||||
{ 1.031, 10.219, 10.945, 11.004, 11.566, 12.879, 13.758, 15.188, 16.559, 17.520, 17.613}, //RPM = 199.75
|
||||
{ 1.125, 11.555, 11.801, 11.953, 13.090, 15.082, 16.160, 18.117, 19.289, 20.133, 20.145}, //RPM = 399.75
|
||||
{ 1.277, 15.199, 15.609, 15.820, 17.438, 19.242, 20.766, 23.613, 26.156, 27.891, 27.891}, //RPM = 999.75
|
||||
{ 1.523, 19.523, 19.863, 20.027, 21.516, 24.621, 26.215, 30.281, 34.359, 34.945, 34.945}, //RPM = 1599.75
|
||||
{ 1.664, 21.434, 21.949, 22.078, 23.414, 27.832, 30.000, 34.793, 38.051, 38.039, 38.063}, //RPM = 1999.75
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
struct fuelMapIndexes fuelMapI = { //probar este mapa
|
||||
{ 100, 200, 400, 1000, 1600, 2000}, //N_RPM = 17
|
||||
{ 0.031, 0.406, 1.656, 2.406, 8.313, 20.813, 29.094, 45.688, 60.000, 70.594, 72.000},
|
||||
{ -14.2, 5.25, 29.9, 50, 75.3}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user