rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions
gm_sbc.cpp File Reference

Functions

void setStepperHw ()
 
static void gmRailSensor ()
 
void setGmSbc ()
 
static void setGmGdi ()
 
static void setGmEcotec3 ()
 
static void set4CylGmEcotec3 ()
 
void setGmLcv ()
 
void setGmLnf ()
 
void setGmLtg ()
 
void setGmSbcGen5 ()
 

Function Documentation

◆ gmRailSensor()

static void gmRailSensor ( )
static

◆ set4CylGmEcotec3()

static void set4CylGmEcotec3 ( )
static

Definition at line 189 of file gm_sbc.cpp.

Referenced by setGmLcv(), and setGmLtg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGmEcotec3()

static void setGmEcotec3 ( )
static

Definition at line 182 of file gm_sbc.cpp.

Referenced by set4CylGmEcotec3(), and setGmSbcGen5().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGmGdi()

static void setGmGdi ( )
static

Definition at line 135 of file gm_sbc.cpp.

135 {
138 engineConfiguration->vvtMode[0] = VVT_BOSCH_QUICK_START;
140 gmRailSensor();
141
142 // is this oddly high or OKis?
145
146#ifdef HW_HELLEN_4K_GDI
149
150 engineConfiguration->triggerInputPins[0] = Gpio::H144_IN_SENS2; // Digital Input 3
151 engineConfiguration->camInputs[0] = Gpio::H144_IN_SENS3; // Digital Input 4
153 engineConfiguration->sentInputPins[0] = Gpio::H144_IN_AUX2_DIGITAL;
155
156 // engineConfiguration->starterControlPin = high side :()
157#endif // HW_HELLEN_4K_GDI
158
159#ifdef HW_HELLEN_8CHAN
160 engineConfiguration->sentInputPins[0] = Gpio::MM176_IN_D3;
161 engineConfiguration->starterControlPin = Gpio::MM176_IGN5; // 14C
162
163 engineConfiguration->map.sensor.hwChannel = MM176_IN_CRANK_ANALOG; // 1A Aux Analog 1. Important to use analog without muxing!
164 engineConfiguration->fuelPumpPin = Gpio::MM176_OUT_IO2; // 6C - High Side 2 orange/brown
165 engineConfiguration->hpfpValvePin = Gpio::MM176_GP17; // 19D Injector 9
166
170
171 engineConfiguration->starterControlPin = Gpio::PIN_5C; // 5C - High Side 1, ignition output is not enough at least on HHR
173#endif // HW_HELLEN_8CHAN
174
175 setPPSCalibration(1, 4.25, 0.5, 2.14);
176
177 strcpy(engineConfiguration->engineMake, ENGINE_MAKE_GM);
178 engineConfiguration->etbFunctions[1] = DC_None;
180}
@ Unassigned
void setGDIFueling()
void setPPSCalibration(float primaryUp, float primaryDown, float secondaryUp, float secondaryDown)
static constexpr persistent_config_s * config
static void gmRailSensor()
Definition gm_sbc.cpp:61
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT]
void setGmCltSensor(ThermistorConf *thermistorConf)

Referenced by setGmEcotec3(), and setGmLnf().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGmLcv()

void setGmLcv ( )

Definition at line 197 of file gm_sbc.cpp.

Referenced by applyEngineType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGmLnf()

void setGmLnf ( )

Definition at line 204 of file gm_sbc.cpp.

204 {
205 setGmGdi();
207 strcpy(engineConfiguration->engineCode, "LNF");
208 setTPS1Calibration(880, 129, 118, 870);
209
211
212 // todo: engineConfiguration->hpfpCam = HPFP_CAM_IN1;
213#ifdef HW_HELLEN_8CHAN
214 engineConfiguration->vvtMode[1] = VVT_BOSCH_QUICK_START;
217 engineConfiguration->highPressureFuel.hwChannel = MM176_IN_MAP1_ANALOG; // 2A Aux Analog 4
218
219 engineConfiguration->vvtPins[0] = Gpio::MM176_OUT_PWM1;
220 engineConfiguration->vvtPins[1] = Gpio::MM176_OUT_PWM2;
221#endif // HW_HELLEN_8CHAN
222}
void setTPS1Calibration(uint16_t tpsMin, uint16_t tpsMax)

Referenced by applyEngineType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGmLtg()

void setGmLtg ( )

Definition at line 225 of file gm_sbc.cpp.

225 {
228#ifdef HW_HELLEN_8CHAN
229 engineConfiguration->oilPressure.hwChannel = MM176_IN_MAP1_ANALOG; // 2A Aux Analog 4
231
232 engineConfiguration->triggerInputPins[0] = Gpio::MM176_IN_D4; // 9A - Hall Input 4
233
234 engineConfiguration->luaOutputPins[0] = Gpio::MM176_OUT_IO1; // 7C - High Side 3 - unusual starter
235 engineConfiguration->luaOutputPins[1] = Gpio::MM176_OUT_IO4, // 9C - Low Side 4 - unusual starter
236#endif // HW_HELLEN_8CHAN
237 strcpy(engineConfiguration->engineCode, "LTG");
238}

Referenced by applyEngineType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGmSbc()

void setGmSbc ( )

gm_sbc.h

Definition at line 69 of file gm_sbc.cpp.

69 {
71 // that's original firing order before gen 3
72 engineConfiguration->firingOrder = FO_1_8_4_3_6_5_7_2;
74
75 // see engine sniffer at https://github.com/rusefi/rusefi/issues/5353
76 // if injectors are wired in groups of four best to use channels 1 and 4
79
80 strcpy(engineConfiguration->engineMake, ENGINE_MAKE_GM);
81 strcpy(engineConfiguration->engineCode, "SBC");
82 // white wire "HEI E" plug pin D
83 engineConfiguration->ignitionMode = IM_ONE_COIL;
85
86 gppwm_channel *ignOverride = &engineConfiguration->gppwm[0];
87 ignOverride->pwmFrequency = 0;
88 strcpy(engineConfiguration->gpPwmNote[0], "ign ovrrd B");
89 setTable(ignOverride->table, 100);
90
91#ifdef HW_HELLEN_UAEFI121
92 // coil control plug pin A
93
94 // tan wire with a black trace - "HEI B", plug pin B (we use yellow)
95 ignOverride->pin = Gpio::MM100_IGN2; // 12a Coil 2
96 // tach plug pin C
97 engineConfiguration->triggerInputPins[0] = Gpio::MM100_IN_D2; // 35a HALL2 red wire
101#endif // HW_HELLEN_UAEFI121
102
103#if HW_PROTEUS
104 // tan wire with a black trace - "HEI B", plug pin B
105 ignOverride->pin = Gpio::PROTEUS_IGN_12;
107 // reminder about D101
108 engineConfiguration->injectionPins[0] = Gpio::PROTEUS_LS_14; // #1
109 // reminder about D104
110 engineConfiguration->injectionPins[3] = Gpio::PROTEUS_LS_15; // #4
111
112 // wow high side relay control on MEFI1 ELECTRONIC-FUEL-INJECTION-MEFI-1-2-5.7L-350CID-8.2L-502CID.pdf page 46
113 engineConfiguration->fuelPumpPin = Gpio::PROTEUS_HS_1;
114 // low side on MEFI3 ELECTRONIC-FUEL-INJECTION-MEFI-3-5.7L-350CID-8.2L-502CID.pdf page 487
115
117#endif // HW_PROTEUS
118 engineConfiguration->mainRelayPin = Gpio::Unassigned; // vehicle controls main relay
119
120 // for instance IWP069
122
123 setStepperHw();
124
125 // 8 cylinders one coil HEI trigger
130 // Proteus Digital 1 is Tach input "HEI R", plug pin C
131
132 engineConfiguration->map.sensor.type = MT_GM_1_BAR;
133}
void setStepperHw()
Definition gm_sbc.cpp:15
scaled_channel< uint8_t, 2, 1 > table[GPPWM_LOAD_COUNT][GPPWM_RPM_COUNT]
constexpr void setTable(TElement(&dest)[N][M], const VElement value)

Referenced by applyEngineType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGmSbcGen5()

void setGmSbcGen5 ( )

Definition at line 240 of file gm_sbc.cpp.

240 {
241 setGmEcotec3();
245 engineConfiguration->firingOrder = FO_1_8_7_2_6_5_4_3;
246 engineConfiguration->map.sensor.type = MT_GM_1_BAR;
247
248 // engineConfiguration->hpfpPumpVolume = 0.623; // LT4
249 engineConfiguration->hpfpPumpVolume = 0.49; // cc per stroke
250
251 // LT 17.7 g/sec at 100bar which 1440
252 // todo: real flow!
253 engineConfiguration->injector.flow = 990; // 12.6g/sec
254
255#ifdef HW_HELLEN_8CHAN
258
259 engineConfiguration->injectionPins[4] = Gpio::MM176_INJ5;
260 engineConfiguration->injectionPins[5] = Gpio::MM176_INJ6;
261 engineConfiguration->injectionPins[6] = Gpio::MM176_INJ7;
262 engineConfiguration->injectionPins[7] = Gpio::MM176_INJ8;
263
264 engineConfiguration->ignitionPins[4] = Gpio::MM176_IGN5;
265 engineConfiguration->ignitionPins[5] = Gpio::MM176_IGN6;
266 engineConfiguration->ignitionPins[6] = Gpio::MM176_IGN7;
267 engineConfiguration->ignitionPins[7] = Gpio::MM176_IGN8;
268
269 engineConfiguration->starterControlPin = Gpio::MM176_SPI3_SCK; // 29C - Ignition 9
270
273 engineConfiguration->vvtMode[1] = VVT_INACTIVE;
275
276 // early models before SENT
277 // todo: early gen5 LS engines have redundant high pressure sensors #7364
278 engineConfiguration->highPressureFuel.v1 = 0.57; /* volts */;
280 engineConfiguration->highPressureFuel.v2 = 2.25; /* volts */;
282
283 engineConfiguration->lowPressureFuel.v1 = 2.9; /* volts */;
285 engineConfiguration->lowPressureFuel.v2 = 3.7; /* volts */;
287
289 engineConfiguration->oilPressure.value1 = 0; // 100 kPa absolute
291 engineConfiguration->oilPressure.value2 = 420; // 520 kPa absolute
292
293 engineConfiguration->oilPressure.hwChannel = MM176_IN_MAP1_ANALOG; // 2A Aux Analog 4
294 engineConfiguration->fuelLevelSensor = MM176_IN_O2S_ANALOG; // 3A - Aux Analog 2
295 engineConfiguration->lowPressureFuel.hwChannel = MM176_IN_AUX2_ANALOG; // 4A - Aux Analog 7
296 engineConfiguration->acPressure.hwChannel = MM176_IN_MAP2_ANALOG;// 10A - Aux Analog 5
297 engineConfiguration->flexSensorPin = Gpio::MM176_IN_SENS3;
298#endif // HW_HELLEN_8CHAN
299}

Referenced by applyEngineType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStepperHw()

void setStepperHw ( )

Definition at line 15 of file gm_sbc.cpp.

15 {
20
21 for (size_t i = 0;i<ETB_COUNT;i++) {
23 }
24
25 setPPSInputs(EFI_ADC_NONE, EFI_ADC_NONE);
26
27#ifdef HW_HELLEN_8CHAN
30#endif // HW_HELLEN_8CHAN
31
32#ifdef HW_HELLEN_UAEFI
35#endif // HW_HELLEN_UAEFI
36
37#ifdef HW_PROTEUS
38 // coil #1 = proteus pin 15 (DC2 positive) to BL pin "A", pin B to pin 8 (DC2 negative)
39 // PWM pin
41 // DIR pin
43 // Disable pin
45 // Unused
47
48 // coil #2 - proteus pin 7 (DC1 positive) to AH pin "D", pin C to pin 6 (DC1 negative)
49 // PWM pin
51 // DIR pin
53 // Disable pin
55 // Unused
57
58#endif // HW_PROTEUS
59}
void setPPSInputs(adc_channel_e pps1, adc_channel_e pps2)
void set8chanDefaultETBPins()
void setUaefiDefaultETBPins()

Referenced by handleCommandX14(), and setGmSbc().

Here is the call graph for this function:
Here is the caller graph for this function:

Go to the source code of this file.