rusefi/firmware/config/engines/bmw_m73_mre.cpp

109 lines
3.1 KiB
C++
Raw Normal View History

2020-03-11 17:48:09 -07:00
/*
* @file bmw_m73_mre.cpp
*
* https://github.com/rusefi/rusefi/wiki/BMW_e38_750
2020-03-11 21:16:32 -07:00
*
* https://rusefi.com/wiki/index.php?title=Hardware:OEM_connectors#134_pin
* https://github.com/rusefi/rusefi/wiki/HOWTO_electronic_throttle_body
2020-03-17 21:12:31 -07:00
* Ignition module https://rusefi.com/forum/viewtopic.php?f=4&t=286
* https://github.com/rusefi/rusefi/wiki/Hardware_microRusEfi_wiring
2020-03-11 21:16:32 -07:00
*
* 1/2 plugs black
* 2/2 plugs grey
*
*
* ********* | | OEM | rusEfi | function
*
* Plug #1 9 pin
* ECU pin 4: GND BRN/ORG BLK
* ECU pin 6: GND BRN BLK
* ECU pin 7: IN RED RED +12v hot at all times
* ECU pin 8: IN RED/BLU RED +12v from ECU relay
*
* Plug #2 24 pin
2020-03-18 14:46:46 -07:00
* ECU pin 23: OUT BRN/BLK BLK ECU relay control, low-side
2020-03-11 21:16:32 -07:00
*
*
*
*
* Plug #3 52 pin
2020-03-17 21:12:31 -07:00
* ECU pin 2: OUT ORG injector #4
* ECU pin 6: GND ECU
* ECU pin 15: OUT ORG injector #2
2020-04-03 14:44:55 -07:00
* ECU pin 21: GND BRN BLK CLT sensor (only on first ECU)
* ECU pin 22: IN RED/BRN BLU CLT sensor (only on first ECU)
2020-03-17 21:12:31 -07:00
* ECU pin 27: OUT GRN injector #6
* ECU pin 28: OUT BLU injector #5
2020-03-11 21:16:32 -07:00
* ECU pin 32: IN WHT VR positive crankshaft sensor
2020-04-03 14:44:55 -07:00
* ECU pin 34: IN IAT sensor (only on second ECU)
2020-03-11 21:16:32 -07:00
* ECU pin 40: OUT BRN/BLK GRN injector #3
* ECU pin 41: OUT BRN/WHT BLU injector #1
* ECU pin 46: IN BLK BLU VR negative crankshaft sensor
2020-04-03 14:44:55 -07:00
* ECU pin 47: GND BRN IAT sensor (only on second ECU)
2020-03-11 21:16:32 -07:00
*
2020-03-18 14:46:46 -07:00
* Plug #4 40 pin
* ECU pin 6: IN ORG start signal from ignition key. Custom wiring: pulled-up thermistor wire on MRE
2020-03-19 21:36:22 -07:00
* ECU pin 26: IN GRN/BLK RED +12v hot in start & run
2020-03-18 14:46:46 -07:00
* ECU pin 40: OUT YEL/BRN GRN starter enable
2020-03-11 21:16:32 -07:00
*
*
* Plug #5 9 pin
2020-03-19 21:36:22 -07:00
* ECU pin 3: OUT BLK ORG coil signal
* ECU pin 5: GND BRN ground
2020-04-06 14:24:20 -07:00
* ECU pin 6: OUT BLK ORG coil signal
* ECU pin 9: OUT BLK ORG coil signal
2020-03-11 17:48:09 -07:00
*
* BMW_M73_MRE
* set engine_type 104
2020-03-31 17:08:30 -07:00
* BMW_M73_MRE_SLAVE
* set engine_type 105
2020-03-11 17:48:09 -07:00
*
*/
#include "pch.h"
2020-03-11 17:48:09 -07:00
#include "bmw_m73.h"
void setEngineBMW_M73_microRusEfi() {
2021-12-19 12:57:19 -08:00
m73engine();
2020-03-11 21:16:32 -07:00
// 13641435991 injector
engineConfiguration->injector.flow = 180; // cc/min, who knows if this number is real - no good source of info
strcpy(engineConfiguration->vehicleName, "microRusEFIx2");
2020-05-08 14:31:03 -07:00
2020-04-02 19:59:01 -07:00
engineConfiguration->globalTriggerAngleOffset = 90;
engineConfiguration->cylindersCount = 6;
engineConfiguration->displacement = 5.4 / 2;
engineConfiguration->firingOrder = FO_1_5_3_6_2_4;
2020-03-11 21:16:32 -07:00
engineConfiguration->ignitionMode = IM_ONE_COIL;
engineConfiguration->injectionMode = IM_BATCH;
2020-03-17 21:12:31 -07:00
engineConfiguration->etb.pFactor = 2.00;
engineConfiguration->etb.iFactor = 0.35;
2020-03-24 20:17:54 -07:00
// 22 - AN Temp 4, orange wire
engineConfiguration->startStopButtonPin = Gpio::A3;
2020-03-18 14:46:46 -07:00
2020-03-20 17:45:35 -07:00
#if (BOARD_TLE8888_COUNT > 0)
2020-03-19 21:36:22 -07:00
// "43 - GP Out 4"
engineConfiguration->starterControlPin = Gpio::TLE8888_PIN_24;
2020-03-20 17:45:35 -07:00
#endif /* BOARD_TLE8888_COUNT */
2020-03-19 21:36:22 -07:00
2020-03-17 21:12:31 -07:00
2020-04-01 21:33:12 -07:00
// set_analog_input_pin pps PA7
// EFI_ADC_7: "31 - AN volt 3" - PA7
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_7;
2020-04-01 21:33:12 -07:00
engineConfiguration->enableVerboseCanTx = true;
2020-03-31 13:49:19 -07:00
engineConfiguration->trigger.type = trigger_type_e::TT_TOOTHED_WHEEL_60_2;
2020-04-02 21:44:54 -07:00
2020-03-17 21:12:31 -07:00
//set tps_min 891
engineConfiguration->tpsMin = 891;
2020-03-17 21:12:31 -07:00
//set tps_max 177
engineConfiguration->tpsMax = 177;
2020-03-11 17:48:09 -07:00
}