| Line | Branch | Decision | Exec | Source |
|---|---|---|---|---|
| 1 | /* | |||
| 2 | * @file bmw_m73_mre.cpp | |||
| 3 | * | |||
| 4 | * https://github.com/rusefi/rusefi/wiki/BMW_e38_750 | |||
| 5 | * | |||
| 6 | * https://rusefi.com/wiki/index.php?title=Hardware:OEM_connectors#134_pin | |||
| 7 | * https://github.com/rusefi/rusefi/wiki/HOWTO_electronic_throttle_body | |||
| 8 | * Ignition module https://rusefi.com/forum/viewtopic.php?f=4&t=286 | |||
| 9 | * https://github.com/rusefi/rusefi/wiki/Hardware_microRusEfi_wiring | |||
| 10 | * | |||
| 11 | * 1/2 plugs black | |||
| 12 | * 2/2 plugs grey | |||
| 13 | * | |||
| 14 | * | |||
| 15 | * ********* | | OEM | rusEfi | function | |||
| 16 | * | |||
| 17 | * Plug #1 9 pin | |||
| 18 | * ECU pin 4: GND BRN/ORG BLK | |||
| 19 | * ECU pin 6: GND BRN BLK | |||
| 20 | * ECU pin 7: IN RED RED +12v hot at all times | |||
| 21 | * ECU pin 8: IN RED/BLU RED +12v from ECU relay | |||
| 22 | * | |||
| 23 | * Plug #2 24 pin | |||
| 24 | * ECU pin 23: OUT BRN/BLK BLK ECU relay control, low-side | |||
| 25 | * | |||
| 26 | * | |||
| 27 | * | |||
| 28 | * | |||
| 29 | * Plug #3 52 pin | |||
| 30 | * ECU pin 2: OUT ORG injector #4 | |||
| 31 | * ECU pin 6: GND ECU | |||
| 32 | * ECU pin 15: OUT ORG injector #2 | |||
| 33 | * ECU pin 21: GND BRN BLK CLT sensor (only on first ECU) | |||
| 34 | * ECU pin 22: IN RED/BRN BLU CLT sensor (only on first ECU) | |||
| 35 | * ECU pin 27: OUT GRN injector #6 | |||
| 36 | * ECU pin 28: OUT BLU injector #5 | |||
| 37 | * ECU pin 32: IN WHT VR positive crankshaft sensor | |||
| 38 | * ECU pin 34: IN IAT sensor (only on second ECU) | |||
| 39 | * ECU pin 40: OUT BRN/BLK GRN injector #3 | |||
| 40 | * ECU pin 41: OUT BRN/WHT BLU injector #1 | |||
| 41 | * ECU pin 46: IN BLK BLU VR negative crankshaft sensor | |||
| 42 | * ECU pin 47: GND BRN IAT sensor (only on second ECU) | |||
| 43 | * | |||
| 44 | * Plug #4 40 pin | |||
| 45 | * ECU pin 6: IN ORG start signal from ignition key. Custom wiring: pulled-up thermistor wire on MRE | |||
| 46 | * ECU pin 26: IN GRN/BLK RED +12v hot in start & run | |||
| 47 | * ECU pin 40: OUT YEL/BRN GRN starter enable | |||
| 48 | * | |||
| 49 | * | |||
| 50 | * Plug #5 9 pin | |||
| 51 | * ECU pin 3: OUT BLK ORG coil signal | |||
| 52 | * ECU pin 5: GND BRN ground | |||
| 53 | * ECU pin 6: OUT BLK ORG coil signal | |||
| 54 | * ECU pin 9: OUT BLK ORG coil signal | |||
| 55 | * | |||
| 56 | * BMW_M73_MRE | |||
| 57 | * set engine_type 104 | |||
| 58 | * BMW_M73_MRE_SLAVE | |||
| 59 | * set engine_type 105 | |||
| 60 | * | |||
| 61 | */ | |||
| 62 | ||||
| 63 | #include "pch.h" | |||
| 64 | ||||
| 65 | #include "bmw_m73.h" | |||
| 66 | ||||
| 67 | ✗ | void setEngineBMW_M73_microRusEfi() { | ||
| 68 | ✗ | m73engine(); | ||
| 69 | // 13641435991 injector | |||
| 70 | ✗ | engineConfiguration->injector.flow = 180; // cc/min, who knows if this number is real - no good source of info | ||
| 71 | ||||
| 72 | ✗ | strcpy(engineConfiguration->vehicleName, "microRusEFIx2"); | ||
| 73 | ||||
| 74 | ✗ | engineConfiguration->globalTriggerAngleOffset = 90; | ||
| 75 | ✗ | engineConfiguration->cylindersCount = 6; | ||
| 76 | ✗ | engineConfiguration->displacement = 5.4 / 2; | ||
| 77 | ✗ | engineConfiguration->firingOrder = FO_1_5_3_6_2_4; | ||
| 78 | ||||
| 79 | ✗ | engineConfiguration->ignitionMode = IM_ONE_COIL; | ||
| 80 | ||||
| 81 | ✗ | engineConfiguration->injectionMode = IM_BATCH; | ||
| 82 | ||||
| 83 | ✗ | engineConfiguration->etb.pFactor = 2.00; | ||
| 84 | ✗ | engineConfiguration->etb.iFactor = 0.35; | ||
| 85 | ||||
| 86 | // 22 - AN Temp 4, orange wire | |||
| 87 | ✗ | engineConfiguration->startStopButtonPin = Gpio::A3; | ||
| 88 | ||||
| 89 | #if (BOARD_TLE8888_COUNT > 0) | |||
| 90 | // "43 - GP Out 4" | |||
| 91 | engineConfiguration->starterControlPin = Gpio::TLE8888_PIN_24; | |||
| 92 | #endif /* BOARD_TLE8888_COUNT */ | |||
| 93 | ||||
| 94 | ||||
| 95 | // set_analog_input_pin pps PA7 | |||
| 96 | // EFI_ADC_7: "31 - AN volt 3" - PA7 | |||
| 97 | ✗ | engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_7; | ||
| 98 | ||||
| 99 | ✗ | engineConfiguration->enableVerboseCanTx = true; | ||
| 100 | ||||
| 101 | ✗ | engineConfiguration->trigger.type = trigger_type_e::TT_TOOTHED_WHEEL_60_2; | ||
| 102 | ||||
| 103 | ✗ | engineConfiguration->tpsMin = 891; | ||
| 104 | ✗ | engineConfiguration->tpsMax = 177; | ||
| 105 | ✗ | } | ||
| 106 |