2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file custom_engine.cpp
|
|
|
|
*
|
2017-02-24 15:55:53 -08:00
|
|
|
*
|
2017-12-02 16:25:36 -08:00
|
|
|
* set engine_type 49
|
2017-12-03 14:26:15 -08:00
|
|
|
* FRANKENSO_QA_ENGINE
|
2017-12-02 16:25:36 -08:00
|
|
|
* See also DEFAULT_ENGINE_TYPE
|
|
|
|
* Frankenso QA 12 cylinder engine
|
2017-02-24 15:55:53 -08:00
|
|
|
*
|
2015-07-10 06:01:56 -07:00
|
|
|
* @date Jan 18, 2015
|
2018-01-20 17:42:19 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2018
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
#ifndef CONFIG_ENGINES_CUSTOM_ENGINE_CPP_
|
|
|
|
#define CONFIG_ENGINES_CUSTOM_ENGINE_CPP_
|
|
|
|
|
|
|
|
#include "custom_engine.h"
|
|
|
|
#include "allsensors.h"
|
2016-01-08 12:01:38 -08:00
|
|
|
#include "engine_math.h"
|
2019-04-11 20:21:16 -07:00
|
|
|
#include "fsio_impl.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-04-12 19:10:57 -07:00
|
|
|
#if EFI_PROD_CODE
|
2016-01-24 12:02:46 -08:00
|
|
|
#include "can_hw.h"
|
2018-01-28 11:03:58 -08:00
|
|
|
#include "scheduler.h"
|
2019-02-27 06:57:03 -08:00
|
|
|
#include "electronic_throttle.h"
|
2017-12-03 12:23:39 -08:00
|
|
|
#endif /* EFI_PROD_CODE */
|
2016-01-24 12:02:46 -08:00
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
EXTERN_ENGINE;
|
|
|
|
|
2018-01-28 11:03:58 -08:00
|
|
|
|
2019-04-12 19:10:57 -07:00
|
|
|
#if EFI_PROD_CODE
|
2018-01-28 11:03:58 -08:00
|
|
|
static int periodIndex = 0;
|
|
|
|
|
|
|
|
static OutputPin testPin;
|
2018-01-28 11:16:57 -08:00
|
|
|
scheduling_s scheduling;
|
2018-01-28 11:03:58 -08:00
|
|
|
|
2018-01-29 11:25:28 -08:00
|
|
|
static int test557[] = {5, 5, 10, 10, 20, 20, 50, 50, 100, 100, 200, 200, 500, 500, 500, 500};
|
|
|
|
#define TEST_LEN 16
|
2018-01-28 11:03:58 -08:00
|
|
|
|
|
|
|
efitimeus_t testTime;
|
|
|
|
|
|
|
|
static void toggleTestAndScheduleNext() {
|
|
|
|
testPin.toggle();
|
|
|
|
periodIndex = (periodIndex + 1) % TEST_LEN;
|
|
|
|
testTime += test557[periodIndex];
|
2019-01-09 05:50:51 -08:00
|
|
|
engine->executor.scheduleByTimestamp(&scheduling, testTime, (schfunc_t) &toggleTestAndScheduleNext, NULL);
|
2018-01-28 11:03:58 -08:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2018-03-04 14:55:46 -08:00
|
|
|
/**
|
|
|
|
* https://github.com/rusefi/rusefi/issues/557 common rail / direct injection scheduling control test
|
|
|
|
*/
|
2019-01-10 21:03:42 -08:00
|
|
|
void runSchedulingPrecisionTestIfNeeded(void) {
|
2018-01-28 11:03:58 -08:00
|
|
|
if (engineConfiguration->test557pin == GPIO_UNASSIGNED ||
|
|
|
|
engineConfiguration->test557pin == GPIOA_0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
testPin.initPin("test", engineConfiguration->test557pin);
|
|
|
|
testPin.setValue(0);
|
|
|
|
testTime = getTimeNowUs();
|
|
|
|
toggleTestAndScheduleNext();
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif /* EFI_PROD_CODE */
|
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
void setFrankenso_01_LCD(board_configuration_s *boardConfiguration) {
|
|
|
|
boardConfiguration->HD44780_rs = GPIOE_7;
|
|
|
|
boardConfiguration->HD44780_e = GPIOE_9;
|
|
|
|
boardConfiguration->HD44780_db4 = GPIOE_11;
|
|
|
|
boardConfiguration->HD44780_db5 = GPIOE_13;
|
|
|
|
boardConfiguration->HD44780_db6 = GPIOE_15;
|
|
|
|
boardConfiguration->HD44780_db7 = GPIOB_10;
|
2016-04-03 16:01:59 -07:00
|
|
|
}
|
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
void disableLCD(board_configuration_s *boardConfiguration) {
|
|
|
|
boardConfiguration->HD44780_rs = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->HD44780_e = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->HD44780_db4 = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->HD44780_db5 = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->HD44780_db6 = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->HD44780_db7 = GPIO_UNASSIGNED;
|
2016-04-03 16:01:59 -07:00
|
|
|
}
|
|
|
|
|
2019-01-26 08:38:14 -08:00
|
|
|
void setMinimalPinsEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
2019-04-16 07:27:34 -07:00
|
|
|
// all basic settings are already set in prepareVoidConfiguration(), no need to set anything here
|
2019-01-26 08:38:14 -08:00
|
|
|
}
|
|
|
|
|
2017-01-28 12:05:25 -08:00
|
|
|
// todo: should this be renamed to 'setFrankensoConfiguration'?
|
|
|
|
// todo: should this be part of more default configurations?
|
2017-05-15 20:28:49 -07:00
|
|
|
void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
2015-07-10 06:01:56 -07:00
|
|
|
engineConfiguration->trigger.type = TT_ONE_PLUS_ONE;
|
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
setFrankenso_01_LCD(boardConfiguration);
|
|
|
|
commonFrankensoAnalogInputs(engineConfiguration);
|
|
|
|
setFrankenso0_1_joystick(engineConfiguration);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Frankenso analog #1 PC2 ADC12 CLT
|
|
|
|
* Frankenso analog #2 PC1 ADC11 IAT
|
|
|
|
* Frankenso analog #3 PA0 ADC0 MAP
|
|
|
|
* Frankenso analog #4 PC3 ADC13 WBO / O2
|
|
|
|
* Frankenso analog #5 PA2 ADC2 TPS
|
|
|
|
* Frankenso analog #6 PA1 ADC1
|
|
|
|
* Frankenso analog #7 PA4 ADC4
|
|
|
|
* Frankenso analog #8 PA3 ADC3
|
|
|
|
* Frankenso analog #9 PA7 ADC7
|
|
|
|
* Frankenso analog #10 PA6 ADC6
|
|
|
|
* Frankenso analog #11 PC5 ADC15
|
|
|
|
* Frankenso analog #12 PC4 ADC14 VBatt
|
|
|
|
*/
|
2018-11-29 21:37:32 -08:00
|
|
|
engineConfiguration->tpsAdcChannel = EFI_ADC_2; // PA2
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
engineConfiguration->map.sensor.hwChannel = EFI_ADC_0;
|
|
|
|
|
|
|
|
engineConfiguration->clt.adcChannel = EFI_ADC_12;
|
|
|
|
engineConfiguration->iat.adcChannel = EFI_ADC_11;
|
|
|
|
engineConfiguration->afr.hwChannel = EFI_ADC_13;
|
|
|
|
|
|
|
|
setCommonNTCSensor(&engineConfiguration->clt);
|
|
|
|
engineConfiguration->clt.config.bias_resistor = 2700;
|
|
|
|
setCommonNTCSensor(&engineConfiguration->iat);
|
|
|
|
engineConfiguration->iat.config.bias_resistor = 2700;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* http://rusefi.com/wiki/index.php?title=Manual:Hardware_Frankenso_board
|
|
|
|
*/
|
|
|
|
// Frankenso low out #1: PE6
|
|
|
|
// Frankenso low out #2: PE5
|
|
|
|
// Frankenso low out #3: PD7 Main Relay
|
|
|
|
// Frankenso low out #4: PC13 Idle valve solenoid
|
|
|
|
// Frankenso low out #5: PE3
|
|
|
|
// Frankenso low out #6: PE4 fuel pump relay
|
|
|
|
// Frankenso low out #7: PE1 (do not use with discovery!)
|
|
|
|
// Frankenso low out #8: PE2 injector #2
|
|
|
|
// Frankenso low out #9: PB9 injector #1
|
|
|
|
// Frankenso low out #10: PE0 (do not use with discovery!)
|
|
|
|
// Frankenso low out #11: PB8 injector #3
|
|
|
|
// Frankenso low out #12: PB7 injector #4
|
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->fuelPumpPin = GPIOE_4;
|
|
|
|
boardConfiguration->mainRelayPin = GPIOD_7;
|
|
|
|
boardConfiguration->idle.solenoidPin = GPIOC_13;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->fanPin = GPIOE_5;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->injectionPins[0] = GPIOB_9; // #1
|
|
|
|
boardConfiguration->injectionPins[1] = GPIOE_2; // #2
|
|
|
|
boardConfiguration->injectionPins[2] = GPIOB_8; // #3
|
2019-02-06 15:53:43 -08:00
|
|
|
#ifndef EFI_INJECTOR_PIN3
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->injectionPins[3] = GPIOB_7; // #4
|
2019-02-06 15:53:43 -08:00
|
|
|
#else /* EFI_INJECTOR_PIN3 */
|
|
|
|
boardConfiguration->injectionPins[3] = EFI_INJECTOR_PIN3; // #4
|
|
|
|
#endif /* EFI_INJECTOR_PIN3 */
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-01-10 16:25:07 -08:00
|
|
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
2016-01-08 12:01:38 -08:00
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
#if EFI_PWM_TESTER
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->injectionPins[4] = GPIOC_8; // #5
|
|
|
|
boardConfiguration->injectionPins[5] = GPIOD_10; // #6
|
|
|
|
boardConfiguration->injectionPins[6] = GPIOD_9;
|
|
|
|
boardConfiguration->injectionPins[7] = GPIOD_11;
|
|
|
|
boardConfiguration->injectionPins[8] = GPIOD_0;
|
|
|
|
boardConfiguration->injectionPins[9] = GPIOB_11;
|
|
|
|
boardConfiguration->injectionPins[10] = GPIOC_7;
|
|
|
|
boardConfiguration->injectionPins[11] = GPIOE_4;
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* We want to initialize all outputs for test
|
|
|
|
*/
|
|
|
|
engineConfiguration->specs.cylindersCount = 12;
|
|
|
|
|
|
|
|
engineConfiguration->displayMode = DM_NONE;
|
2017-12-03 12:37:52 -08:00
|
|
|
#else /* EFI_PWM_TESTER */
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->injectionPins[6] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->injectionPins[7] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->injectionPins[8] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->injectionPins[9] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->injectionPins[10] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->injectionPins[11] = GPIO_UNASSIGNED;
|
|
|
|
|
|
|
|
boardConfiguration->ignitionPins[0] = GPIOE_14;
|
|
|
|
boardConfiguration->ignitionPins[1] = GPIOC_7;
|
|
|
|
boardConfiguration->ignitionPins[2] = GPIOC_9;
|
2017-03-21 19:45:15 -07:00
|
|
|
// set_ignition_pin 4 PE10
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->ignitionPins[3] = GPIOE_10;
|
2017-12-03 12:37:52 -08:00
|
|
|
#endif /* EFI_PWM_TESTER */
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
// todo: 8.2 or 10k?
|
|
|
|
engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
|
|
|
|
|
2019-04-12 19:10:57 -07:00
|
|
|
#if EFI_CAN_SUPPORT
|
2016-01-24 12:02:46 -08:00
|
|
|
enableFrankensoCan();
|
2018-11-16 04:40:06 -08:00
|
|
|
#endif /* EFI_CAN_SUPPORT */
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|
|
|
|
|
2017-05-15 20:28:49 -07:00
|
|
|
void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|
|
|
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
2017-02-24 15:55:53 -08:00
|
|
|
|
2017-12-02 16:24:49 -08:00
|
|
|
engineConfiguration->directSelfStimulation = true; // this engine type is used for board validation
|
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->triggerSimulatorFrequency = 300;
|
2017-12-03 15:29:52 -08:00
|
|
|
engineConfiguration->cranking.rpm = 100;
|
2017-12-02 16:47:18 -08:00
|
|
|
|
2017-02-24 15:55:53 -08:00
|
|
|
engineConfiguration->specs.cylindersCount = 12;
|
2017-03-23 18:59:47 -07:00
|
|
|
engineConfiguration->specs.firingOrder = FO_1_7_5_11_3_9_6_12_2_8_4_10;
|
2017-02-24 15:55:53 -08:00
|
|
|
|
2017-03-21 19:45:15 -07:00
|
|
|
// set ignition_mode 1
|
|
|
|
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
|
|
|
|
2019-01-09 21:56:08 -08:00
|
|
|
boardConfiguration->injectionPins[0] = GPIOB_7; // injector in default pinout
|
|
|
|
boardConfiguration->injectionPins[1] = GPIOB_8; // injector in default pinout
|
|
|
|
boardConfiguration->injectionPins[2] = GPIOB_9; // injector in default pinout
|
|
|
|
boardConfiguration->injectionPins[3] = GPIOC_13;
|
|
|
|
|
|
|
|
boardConfiguration->injectionPins[4] = GPIOD_3;
|
|
|
|
boardConfiguration->injectionPins[5] = GPIOD_5;
|
|
|
|
boardConfiguration->injectionPins[6] = GPIOD_7;
|
|
|
|
boardConfiguration->injectionPins[7] = GPIOE_2; // injector in default pinout
|
|
|
|
boardConfiguration->injectionPins[8] = GPIOE_3;
|
|
|
|
boardConfiguration->injectionPins[9] = GPIOE_4;
|
|
|
|
boardConfiguration->injectionPins[10] = GPIOE_5;
|
|
|
|
boardConfiguration->injectionPins[11] = GPIOE_6;
|
|
|
|
|
|
|
|
boardConfiguration->fuelPumpPin = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->mainRelayPin = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->fanPin = GPIO_UNASSIGNED;
|
|
|
|
|
|
|
|
|
|
|
|
boardConfiguration->ignitionPins[0] = GPIOC_9; // coil in default pinout
|
|
|
|
boardConfiguration->ignitionPins[1] = GPIOC_7; // coil in default pinout
|
|
|
|
boardConfiguration->ignitionPins[2] = GPIOE_10; // coil in default pinout
|
|
|
|
boardConfiguration->ignitionPins[3] = GPIOE_8; // Miata VVT tach
|
|
|
|
|
|
|
|
boardConfiguration->ignitionPins[4] = GPIOE_14; // coil in default pinout
|
|
|
|
boardConfiguration->ignitionPins[5] = GPIOE_12;
|
|
|
|
boardConfiguration->ignitionPins[6] = GPIOD_8;
|
|
|
|
boardConfiguration->ignitionPins[7] = GPIOD_9;
|
|
|
|
|
|
|
|
boardConfiguration->ignitionPins[8] = GPIOE_0; // brain board, not discovery
|
|
|
|
boardConfiguration->ignitionPins[9] = GPIOE_1; // brain board, not discovery
|
2017-12-03 14:26:15 -08:00
|
|
|
|
2017-02-24 15:55:53 -08:00
|
|
|
}
|
|
|
|
|
2019-03-02 11:00:32 -08:00
|
|
|
// ETB_BENCH_ENGINE
|
2019-02-27 05:55:56 -08:00
|
|
|
void setEtbTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|
|
|
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
2019-03-09 20:31:47 -08:00
|
|
|
setMinimalPinsEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
2017-02-24 15:55:53 -08:00
|
|
|
|
2019-03-02 10:21:12 -08:00
|
|
|
// VAG test ETB
|
|
|
|
// set tps_min 54
|
|
|
|
engineConfiguration->tpsMin = 54;
|
|
|
|
// by the way this ETB has default position of ADC=74 which is about 4%
|
|
|
|
// set tps_max 540
|
|
|
|
engineConfiguration->tpsMax = 540;
|
|
|
|
|
2019-02-27 06:57:03 -08:00
|
|
|
|
2019-02-27 05:55:56 -08:00
|
|
|
boardConfiguration->ignitionPins[0] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
|
|
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
2019-02-27 06:57:03 -08:00
|
|
|
/**
|
|
|
|
* remember that some H-bridges require 5v control lines, not just 3v logic outputs we have on stm32
|
|
|
|
*/
|
2019-03-10 09:02:25 -07:00
|
|
|
CONFIGB(etb1.directionPin1) = GPIOC_7;
|
|
|
|
CONFIGB(etb1.directionPin2) = GPIOC_9;
|
|
|
|
CONFIGB(etb1.controlPin1) = GPIOE_14;
|
2019-02-27 14:54:25 -08:00
|
|
|
|
2019-04-12 19:10:57 -07:00
|
|
|
#if EFI_ELECTRONIC_THROTTLE_BODY
|
2019-02-27 06:57:03 -08:00
|
|
|
setDefaultEtbParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
2019-03-01 20:09:33 -08:00
|
|
|
// values are above 100% since we have feedforward part of the total summation
|
|
|
|
engineConfiguration->etb.minValue = -200;
|
|
|
|
engineConfiguration->etb.maxValue = 200;
|
2019-03-29 07:29:01 -07:00
|
|
|
#endif /* EFI_ELECTRONIC_THROTTLE_BODY */
|
2019-02-27 06:57:03 -08:00
|
|
|
|
|
|
|
engineConfiguration->tpsAdcChannel = EFI_ADC_2; // PA2
|
|
|
|
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_9; // PB1
|
|
|
|
|
2019-02-27 14:54:25 -08:00
|
|
|
engineConfiguration->debugMode = DBG_ELECTRONIC_THROTTLE_PID;
|
|
|
|
|
2019-03-02 19:42:11 -08:00
|
|
|
// turning off other PWMs to simplify debugging
|
|
|
|
engineConfiguration->bc.triggerSimulatorFrequency = 0;
|
2019-03-03 12:27:49 -08:00
|
|
|
engineConfiguration->stepperEnablePin = GPIO_UNASSIGNED;
|
|
|
|
CONFIGB(idle).stepperStepPin = GPIO_UNASSIGNED;
|
|
|
|
CONFIGB(idle).stepperDirectionPin = GPIO_UNASSIGNED;
|
2019-03-02 19:42:11 -08:00
|
|
|
boardConfiguration->useStepperIdle = true;
|
|
|
|
|
2019-03-10 21:31:06 -07:00
|
|
|
engineConfiguration->clt.adcChannel = EFI_ADC_15;
|
|
|
|
set10K_4050K(&engineConfiguration->clt);
|
|
|
|
|
2019-02-27 05:55:56 -08:00
|
|
|
}
|
2019-04-04 18:34:33 -07:00
|
|
|
|
|
|
|
// TLE8888_BENCH_ENGINE
|
|
|
|
// set engine_type 59
|
|
|
|
void setTle8888TestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|
|
|
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
|
|
|
setMinimalPinsEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
|
|
|
|
|
|
|
engineConfiguration->specs.cylindersCount = 8;
|
|
|
|
engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3;
|
|
|
|
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
|
|
|
engineConfiguration->crankingInjectionMode = IM_SEQUENTIAL;
|
|
|
|
|
2019-04-20 20:49:26 -07:00
|
|
|
engineConfiguration->tle8888_cs = GPIOD_5;
|
2019-04-04 18:34:33 -07:00
|
|
|
engineConfiguration->directSelfStimulation = true;
|
|
|
|
|
|
|
|
boardConfiguration->ignitionPins[0] = GPIOG_3;
|
|
|
|
boardConfiguration->ignitionPins[1] = GPIOG_4;
|
|
|
|
boardConfiguration->ignitionPins[2] = GPIOG_5;
|
|
|
|
boardConfiguration->ignitionPins[3] = GPIOG_6;
|
|
|
|
boardConfiguration->ignitionPins[4] = GPIOG_7;
|
|
|
|
boardConfiguration->ignitionPins[5] = GPIOG_8;
|
|
|
|
boardConfiguration->ignitionPins[6] = GPIOC_6;
|
|
|
|
boardConfiguration->ignitionPins[7] = GPIOC_7;
|
|
|
|
|
|
|
|
engineConfiguration->tle8888spiDevice = SPI_DEVICE_1;
|
|
|
|
|
2019-04-06 04:38:02 -07:00
|
|
|
// PB3 is nicely both SWO and SPI1 SCK so logic analyzer could be used on SWO header
|
2019-04-04 18:34:33 -07:00
|
|
|
boardConfiguration->is_enabled_spi_1 = true;
|
2019-04-04 20:03:32 -07:00
|
|
|
engineConfiguration->debugMode = DBG_TLE8888;
|
2019-04-11 20:21:16 -07:00
|
|
|
|
2019-04-12 22:03:12 -07:00
|
|
|
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_9; // PB1 // just any non-empty value for now
|
2019-04-11 20:21:16 -07:00
|
|
|
// ETB #1 top one - closer to 121 connector
|
|
|
|
// DIS PF12
|
|
|
|
// EN PF13
|
|
|
|
// IN1 PF15
|
|
|
|
// IN2 PF14
|
|
|
|
// SF PF11
|
2019-04-15 05:40:12 -07:00
|
|
|
#if EFI_FSIO
|
2019-04-11 20:21:16 -07:00
|
|
|
setFsio(12, GPIOF_12, "0" PASS_ENGINE_PARAMETER_SUFFIX);
|
|
|
|
setFsio(14, GPIOF_13, "1" PASS_ENGINE_PARAMETER_SUFFIX);
|
2019-04-15 05:40:12 -07:00
|
|
|
#endif
|
2019-04-11 20:21:16 -07:00
|
|
|
CONFIG(etb1_use_two_wires) = true;
|
|
|
|
CONFIGB(etb1.directionPin1) = GPIOF_15;
|
|
|
|
CONFIGB(etb1.directionPin2) = GPIOF_14;
|
2019-04-13 09:43:19 -07:00
|
|
|
boardConfiguration->isHip9011Enabled = false;
|
2019-04-11 20:21:16 -07:00
|
|
|
|
|
|
|
// ETB #2
|
|
|
|
// DIS PE5
|
|
|
|
// EN PE6
|
|
|
|
// IN1 PE2
|
|
|
|
// IN2 PE4
|
|
|
|
// SF PE3
|
2019-04-15 05:40:12 -07:00
|
|
|
#if EFI_FSIO
|
2019-04-11 20:21:16 -07:00
|
|
|
setFsio(13, GPIOE_5, "0" PASS_ENGINE_PARAMETER_SUFFIX);
|
|
|
|
setFsio(15, GPIOE_6, "1" PASS_ENGINE_PARAMETER_SUFFIX);
|
2019-04-15 05:40:12 -07:00
|
|
|
#endif
|
2019-04-11 20:21:16 -07:00
|
|
|
CONFIG(etb2_use_two_wires) = true;
|
|
|
|
CONFIG(etb2.directionPin1) = GPIOE_2;
|
|
|
|
CONFIG(etb2.directionPin2) = GPIOE_4;
|
|
|
|
|
2019-04-21 07:13:34 -07:00
|
|
|
boardConfiguration->fuelPumpPin = TLE8888_PIN_20;
|
2019-04-04 18:34:33 -07:00
|
|
|
}
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
#endif /* CONFIG_ENGINES_CUSTOM_ENGINE_CPP_ */
|