Skip to content

Commit

Permalink
https://github.com/rusefi/hellen154hyundai/issues/63
Browse files Browse the repository at this point in the history
  • Loading branch information
rusefillc committed Oct 16, 2022
1 parent f7b67e9 commit e9bbde2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ static void setupVbatt() {
}

static void setupDefaultSensorInputs() {
// trigger inputs
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
// Direct hall-only cam input
engineConfiguration->camInputs[0] = H144_IN_CAM;
engineConfiguration->camInputs[1 * CAMS_PER_BANK] = H144_IN_D_AUX4;

engineConfiguration->vvtMode[0] = VVT_SECOND_HALF;
engineConfiguration->vvtMode[1 * CAMS_PER_BANK] = VVT_SECOND_HALF;

Expand Down Expand Up @@ -105,7 +98,16 @@ void setBoardConfigOverrides() {
engineConfiguration->clt.config.bias_resistor = 4700;
engineConfiguration->iat.config.bias_resistor = 4700;

// trigger inputs
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
// Direct hall-only cam input
// this one same on both revisions
engineConfiguration->camInputs[1 * CAMS_PER_BANK] = H144_IN_D_AUX4;

if (engine->engineState.hellenBoardId == -1) {
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
engineConfiguration->camInputs[0] = H144_IN_CAM;

// control pins are inverted since overall ECU pinout seems to be inverted
engineConfiguration->etbIo[0].directionPin1 = H144_OUT_PWM3;
engineConfiguration->etbIo[0].directionPin2 = H144_OUT_PWM2;
Expand All @@ -125,6 +127,10 @@ void setBoardConfigOverrides() {
efiSetPadMode("ETB FIX2", H144_OUT_IO13, PAL_MODE_INPUT_ANALOG);
}
} else if (engine->engineState.hellenBoardId == BOARD_ID_154hyundai_c) {
engineConfiguration->triggerInputPins[0] = H144_IN_SENS2;
engineConfiguration->camInputs[0] = H144_IN_SENS3;


// todo You would not believe how you invert TLE9201 #4579
engineConfiguration->stepperDcInvertedPins = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,19 @@ pins:
function: Analog Ground


- pin: K17
- pin: K17b
function: Crank Sensor
# IN_CRANK AIN24 A24
id: [B1]
class: [event_inputs]
ts_name: Crank - K17
ts_name: Crank - K17 rev B

- pin: K17c
function: Crank Sensor
# H144_IN_SENS2
id: [F4]
class: [event_inputs]
ts_name: Crank - K17 rev C

- pin: K21
# H144_IN_O2S
Expand Down Expand Up @@ -220,12 +227,19 @@ pins:
- pin: K61
function: Analog Ground

- pin: K62
- pin: K62b
# cam1 IN_CAM
id: [A6]
function: Cam Sensor
class: [event_inputs]
ts_name: Cam - K62
ts_name: Cam - K62 rev B

- pin: K62c
# H144_IN_SENS3
id: [F5]
function: Cam Sensor
class: [event_inputs]
ts_name: Cam - K62 rev C

- pin: K63
function: sensor +5v feed
Expand Down Expand Up @@ -451,7 +465,7 @@ info:
- pin: K16
x: 2940
y: 660
- pin: K17
- pin: K17c
x: 3011
y: 660
- pin: K18
Expand Down Expand Up @@ -593,7 +607,7 @@ info:
- pin: K61
x: 3011
y: 342
- pin: K62
- pin: K62c
x: 3086
y: 342
- pin: K63
Expand Down

0 comments on commit e9bbde2

Please sign in to comment.