2014-08-29 07:52:33 -07:00
|
|
|
/**
|
|
|
|
* @file citroenBerlingoTU3JP.cpp
|
|
|
|
*
|
|
|
|
* CITROEN_TU3JP: engine_type 15
|
2014-09-03 13:02:56 -07:00
|
|
|
* Board pin out for Frankenstein
|
2014-08-29 07:52:33 -07:00
|
|
|
*
|
|
|
|
* This config overrides some values of the default configuration which is set by setDefaultConfiguration() method
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @date Apr 15, 2014
|
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2014
|
|
|
|
*/
|
|
|
|
|
2014-09-03 13:02:56 -07:00
|
|
|
#include "thermistors.h"
|
2014-08-29 07:52:33 -07:00
|
|
|
#include "citroenBerlingoTU3JP.h"
|
|
|
|
|
|
|
|
void setCitroenBerlingoTU3JPConfiguration(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
|
|
|
engineConfiguration->engineType = CITROEN_TU3JP;
|
|
|
|
|
2014-09-03 13:02:56 -07:00
|
|
|
// base engine setting
|
2014-08-29 07:52:33 -07:00
|
|
|
engineConfiguration->triggerConfig.triggerType = TT_TOOTHED_WHEEL_60_2;
|
2014-09-13 13:04:13 -07:00
|
|
|
engineConfiguration->globalTriggerAngleOffset = 144;
|
2014-09-03 13:02:56 -07:00
|
|
|
engineConfiguration->cylindersCount = 4;
|
2014-09-13 13:04:13 -07:00
|
|
|
engineConfiguration->displacement = 1.360;
|
2014-08-29 07:52:33 -07:00
|
|
|
engineConfiguration->firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
2014-09-03 13:02:56 -07:00
|
|
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
|
|
|
engineConfiguration->injectionMode = IM_BATCH;
|
|
|
|
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
|
|
|
|
|
|
|
// rpm limiter
|
|
|
|
engineConfiguration->rpmHardLimit = 5000;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Outputs
|
|
|
|
*/
|
|
|
|
// Frankenstain low out #3: PE6 injector 1-4
|
|
|
|
// Frankenstain low out #4: PC13 injector 2-3
|
|
|
|
|
|
|
|
boardConfiguration->injectionPins[0] = GPIOE_6;
|
|
|
|
boardConfiguration->injectionPins[1] = GPIOC_13;
|
|
|
|
boardConfiguration->injectionPins[2] = GPIO_NONE;
|
|
|
|
boardConfiguration->injectionPins[3] = GPIO_NONE;
|
|
|
|
|
2014-09-06 13:02:45 -07:00
|
|
|
// boardConfiguration->ignitionPins[0] = GPIO_NONE;
|
2014-09-03 13:02:56 -07:00
|
|
|
// boardConfiguration->ignitionPins[1] = GPIO_NONE;
|
|
|
|
// boardConfiguration->ignitionPins[2] = GPIO_NONE;
|
|
|
|
// boardConfiguration->ignitionPins[3] = GPIO_NONE;
|
|
|
|
|
2014-09-06 13:02:45 -07:00
|
|
|
boardConfiguration->fuelPumpPin = GPIOB_9;
|
2014-09-03 13:02:56 -07:00
|
|
|
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
|
|
|
|
2014-09-06 13:02:45 -07:00
|
|
|
// boardConfiguration->o2heaterPin = GPIOC_13;
|
2014-09-03 13:02:56 -07:00
|
|
|
// boardConfiguration->logicAnalyzerPins[1] = GPIO_NONE;
|
2014-08-29 07:52:33 -07:00
|
|
|
|
2014-09-06 13:02:45 -07:00
|
|
|
/**
|
|
|
|
* Inputs
|
|
|
|
*/
|
|
|
|
|
|
|
|
// See https://docs.google.com/spreadsheet/ccc?key=0Arl1FeMZcfisdEdGdUlHdWh6cVBoSzFIbkxqa1QtZ3c
|
2014-09-13 13:04:13 -07:00
|
|
|
// Frankenstein analog input #1: PA1 adc1 MAP
|
|
|
|
// Frankenstein analog input #2: PA3 adc3 TPS
|
|
|
|
// Frankenstein analog input #3: PC3 adc13 IAT
|
|
|
|
// Frankenstein analog input #4: PC1 adc11 CLT
|
|
|
|
// Frankenstein analog input #5: PA0 adc0 vBatt
|
|
|
|
// Frankenstein analog input #6: PC2 adc12
|
|
|
|
// Frankenstein analog input #7: PA4 adc4
|
|
|
|
// Frankenstein analog input #8: PA2 adc2
|
|
|
|
// Frankenstein analog input #9: PA6 adc6
|
|
|
|
// Frankenstein analog input #10: PA7 adc7
|
|
|
|
// Frankenstein analog input #11: PC4 adc14
|
|
|
|
// Frankenstein analog input #12: PC5 adc15
|
2014-08-29 07:52:33 -07:00
|
|
|
|
2014-09-06 13:02:45 -07:00
|
|
|
/**
|
2014-09-13 13:04:13 -07:00
|
|
|
* MAP <BOSCH 0 261 230 057>
|
2014-09-06 13:02:45 -07:00
|
|
|
*/
|
2014-09-13 13:04:13 -07:00
|
|
|
engineConfiguration->map.sensor.hwChannel = EFI_ADC_1;
|
2014-09-03 13:02:56 -07:00
|
|
|
engineConfiguration->map.sensor.sensorType = MT_CUSTOM;
|
2014-09-13 13:04:13 -07:00
|
|
|
engineConfiguration->map.sensor.customValueAt0 = 10;
|
|
|
|
engineConfiguration->map.sensor.customValueAt5 = 110;
|
2014-09-06 13:02:45 -07:00
|
|
|
/**
|
2014-09-13 13:04:13 -07:00
|
|
|
* TPS <MAGNETI MARELLI>
|
2014-09-06 13:02:45 -07:00
|
|
|
*/
|
|
|
|
engineConfiguration->tpsAdcChannel = EFI_ADC_3;
|
2014-09-13 13:04:13 -07:00
|
|
|
engineConfiguration->tpsMin = 433;
|
|
|
|
engineConfiguration->tpsMax = 3248;
|
2014-09-06 13:02:45 -07:00
|
|
|
/**
|
2014-09-13 13:04:13 -07:00
|
|
|
* IAT <OEM ECU>
|
2014-09-06 13:02:45 -07:00
|
|
|
*/
|
|
|
|
engineConfiguration->iatAdcChannel = EFI_ADC_13;
|
|
|
|
setThermistorConfiguration(&engineConfiguration->iatThermistorConf, -20.0, 15600.0, 23.0, 2250.0, 92.0, 240.0);
|
2014-09-13 13:04:13 -07:00
|
|
|
engineConfiguration->iatThermistorConf.bias_resistor = 2700;
|
2014-09-06 13:02:45 -07:00
|
|
|
/**
|
2014-09-13 13:04:13 -07:00
|
|
|
* CLT <LADA Samara>
|
2014-09-06 13:02:45 -07:00
|
|
|
*/
|
2014-09-13 13:04:13 -07:00
|
|
|
engineConfiguration->cltAdcChannel = EFI_ADC_11;
|
2014-09-06 13:02:45 -07:00
|
|
|
setThermistorConfiguration(&engineConfiguration->cltThermistorConf, -20.0, 28680.0, 25.0, 2796.0, 100.0, 177.0);
|
2014-09-13 13:04:13 -07:00
|
|
|
engineConfiguration->cltThermistorConf.bias_resistor = 2700;
|
2014-09-06 13:02:45 -07:00
|
|
|
/**
|
|
|
|
* vBatt
|
|
|
|
*/
|
|
|
|
engineConfiguration->vbattAdcChannel = EFI_ADC_0;
|
|
|
|
engineConfiguration->vbattDividerCoeff = ((float) (2.7 + 10)) / 2.7 * 2;
|
2014-08-29 07:52:33 -07:00
|
|
|
}
|