From 4ddf0ba5a264542a7a8a8f09a8d519f176fb65c6 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 10 Aug 2019 14:53:57 -0400 Subject: [PATCH] low side channels on MRE #900 getting closer but still issues --- .../config/boards/microrusefi/mapping.yaml | 8 +-- firmware/config/engines/custom_engine.cpp | 56 ++++++++++++++----- firmware/hw_layer/smart_gpio.cpp | 4 +- 3 files changed, 47 insertions(+), 21 deletions(-) diff --git a/firmware/config/boards/microrusefi/mapping.yaml b/firmware/config/boards/microrusefi/mapping.yaml index 0a023bc4d7..693a98875f 100644 --- a/firmware/config/boards/microrusefi/mapping.yaml +++ b/firmware/config/boards/microrusefi/mapping.yaml @@ -18,12 +18,12 @@ outputs: # TLE8888 high current low side: VVT2 IN9 / OUT5 GPIOE_10: "3 - Lowside 2" - # TLE8888 half bridges (pushpull, lowside, or high-low) IN11 + # TLE8888 half bridges (pushpull, lowside, or high-low) IN? / OUT21 GPIOE_8: "35 - GP Out 1" - # TLE8888 half bridges (pushpull, lowside, or high-low) IN12 + # TLE8888 half bridges (pushpull, lowside, or high-low) IN? / OUT22 GPIOE_7: "34 - GP Out 2" - TLE8888_PIN_20: "33 - GP Out 3" - TLE8888_PIN_21: "43 - GP Out 4" + TLE8888_PIN_23: "33 - GP Out 3" + TLE8888_PIN_24: "43 - GP Out 4" event_inputs: # RC filter input for hall diff --git a/firmware/config/engines/custom_engine.cpp b/firmware/config/engines/custom_engine.cpp index aca8162417..55540420a5 100644 --- a/firmware/config/engines/custom_engine.cpp +++ b/firmware/config/engines/custom_engine.cpp @@ -427,9 +427,13 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void mreBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->directSelfStimulation = true; // this engine type is used for board validation - boardConfiguration->triggerSimulatorFrequency = 300; + boardConfiguration->triggerSimulatorFrequency = 70; + // set cranking_rpm 500 engineConfiguration->cranking.rpm = 100; + // set cranking_fuel 300 + engineConfiguration->cranking.baseFuel = 190; engineConfiguration->injectionMode = IM_SEQUENTIAL; + engineConfiguration->crankingInjectionMode = IM_SEQUENTIAL; // EFI_ADC_1: "23 - AN temp 2" // test harness: Red/Green, 2K PD. expected 2.0v @@ -469,27 +473,49 @@ void mreBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) { boardConfiguration->ignitionPins[4] = GPIOD_6; boardConfiguration->ignitionPins[5] = GPIOD_7; - // TLE8888_PIN_20: "33 - GP Out 3" - boardConfiguration->injectionPins[4] = TLE8888_PIN_22; - // GPIOE_7: "34 - GP Out 2" - boardConfiguration->injectionPins[5] = GPIOE_7; - // TLE8888 high current low side: IN10 - // GPIOE_9: "7 - Lowside 1" - boardConfiguration->injectionPins[6] = GPIOE_9; - // TLE8888 high current low side: IN9 - // GPIOE_10: "3 - Lowside 2" - boardConfiguration->injectionPins[7] = GPIOE_10; + + + // LED #1 + // TLE8888_PIN_23: "33 - GP Out 3" + boardConfiguration->injectionPins[0] = TLE8888_PIN_23; + + // LED #2 + // GPIOE_7: "34 - GP Out 2" + boardConfiguration->injectionPins[10 - 1] = GPIOE_7; + + // LED #3 - INJ#1 + boardConfiguration->injectionPins[9 - 1] = GPIOE_13; + + // LED #4 - INJ#2 + boardConfiguration->injectionPins[4 - 1] = GPIOE_14; + + // LED #5 - INJ#3 + boardConfiguration->injectionPins[3 - 1] = GPIOE_12; + + // LED #6 - INJ#4 + boardConfiguration->injectionPins[6 - 1] = GPIOE_11; + + // LED #7 + // TLE8888_PIN_24: "43 - GP Out 4" + boardConfiguration->injectionPins[5 - 1] = TLE8888_PIN_24; + + // LED #8 // TLE8888 half bridges (pushpull, lowside, or high-low) IN12 // GPIOE_8: "35 - GP Out 1" - boardConfiguration->injectionPins[8] = GPIOE_8; - // TLE8888_PIN_21: "43 - GP Out 4" - boardConfiguration->injectionPins[9] = TLE8888_PIN_21; - + boardConfiguration->injectionPins[8 - 1] = GPIOE_8; + // LED #9 + // TLE8888 high current low side: IN10 + // GPIOE_9: "7 - Lowside 1" + boardConfiguration->injectionPins[7 - 1] = GPIOE_9; + // LED #10 + // TLE8888 high current low side: VVT2 IN9 / OUT5 + // GPIOE_10: "3 - Lowside 2" + boardConfiguration->injectionPins[2 - 1] = GPIOE_10; } #endif /* CONFIG_ENGINES_CUSTOM_ENGINE_CPP_ */ diff --git a/firmware/hw_layer/smart_gpio.cpp b/firmware/hw_layer/smart_gpio.cpp index 7b961485cd..214383c608 100644 --- a/firmware/hw_layer/smart_gpio.cpp +++ b/firmware/hw_layer/smart_gpio.cpp @@ -121,8 +121,8 @@ struct tle8888_config tle8888_cfg = { .direct_io = { [0] = {.port = GPIOE, .pad = 10, .output = 5}, [1] = {.port = GPIOE, .pad = 9, .output = 6}, - [2] = {.port = GPIOE, .pad = 8, .output = 23}, - [3] = {.port = GPIOE, .pad = 7, .output = 24}, + [2] = {.port = GPIOE, .pad = 8, .output = 21}, + [3] = {.port = GPIOE, .pad = 7, .output = 22}, /*