MRE NB2
This commit is contained in:
parent
c2980a36a9
commit
a027f827e7
|
@ -133,6 +133,13 @@ static void setupDefaultSensorInputs() {
|
||||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_13;
|
engineConfiguration->tps1_1AdcChannel = EFI_ADC_13;
|
||||||
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
|
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
|
||||||
|
|
||||||
|
|
||||||
|
// EFI_ADC_10: "27 - AN volt 1"
|
||||||
|
engineConfiguration->map.sensor.hwChannel = EFI_ADC_10;
|
||||||
|
|
||||||
|
// EFI_ADC_2: "24 - AN temp 3"
|
||||||
|
engineConfiguration->afr.hwChannel = EFI_ADC_2;
|
||||||
|
|
||||||
// clt = "18 - AN temp 1"
|
// clt = "18 - AN temp 1"
|
||||||
engineConfiguration->clt.adcChannel = EFI_ADC_0;
|
engineConfiguration->clt.adcChannel = EFI_ADC_0;
|
||||||
engineConfiguration->clt.config.bias_resistor = 2700;
|
engineConfiguration->clt.config.bias_resistor = 2700;
|
||||||
|
|
|
@ -328,7 +328,7 @@ void setMiataNA6_VAF_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
// 0.2#3 has wrong R139
|
// 0.2#3 has wrong R139
|
||||||
// 56k high side/10k low side multiplied by above analogInputDividerCoefficient = 11
|
// 56k high side/10k low side multiplied by above analogInputDividerCoefficient = 11
|
||||||
// engineConfiguration->vbattDividerCoeff = (66f / 10f) * engineConfiguration->analogInputDividerCoefficient;
|
// engineConfiguration->vbattDividerCoeff = (66.0f / 10.0f) * engineConfiguration->analogInputDividerCoefficient;
|
||||||
|
|
||||||
|
|
||||||
boardConfiguration->isHip9011Enabled = false;
|
boardConfiguration->isHip9011Enabled = false;
|
||||||
|
|
|
@ -242,6 +242,32 @@ static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR);
|
||||||
engineConfiguration->specs.displacement = 1.8;
|
engineConfiguration->specs.displacement = 1.8;
|
||||||
|
|
||||||
|
// 0.0825
|
||||||
|
// 0.1375
|
||||||
|
// 6.375
|
||||||
|
// 10.625
|
||||||
|
boardConfiguration->miataNb2VVTRatioFrom = 8.50 * 0.75;
|
||||||
|
boardConfiguration->miataNb2VVTRatioTo = 14;
|
||||||
|
engineConfiguration->nbVvtIndex = 0;
|
||||||
|
|
||||||
|
engineConfiguration->auxPidFrequency[0] = 300; // VVT solenoid control
|
||||||
|
|
||||||
|
// set idle_position 35
|
||||||
|
boardConfiguration->manIdlePosition = 35;
|
||||||
|
|
||||||
|
engineConfiguration->specs.cylindersCount = 4;
|
||||||
|
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||||
|
|
||||||
|
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||||
|
|
||||||
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||||
|
/**
|
||||||
|
* http://miataturbo.wikidot.com/fuel-injectors
|
||||||
|
* 01-05 (purple) - #195500-4060
|
||||||
|
*/
|
||||||
|
engineConfiguration->injector.flow = 265;
|
||||||
|
|
||||||
|
|
||||||
// enable altdebug
|
// enable altdebug
|
||||||
engineConfiguration->targetVBatt = 13.8;
|
engineConfiguration->targetVBatt = 13.8;
|
||||||
engineConfiguration->alternatorControl.offset = 40;
|
engineConfiguration->alternatorControl.offset = 40;
|
||||||
|
@ -301,7 +327,6 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
// boardConfiguration->is_enabled_spi_1 = true;
|
// boardConfiguration->is_enabled_spi_1 = true;
|
||||||
|
|
||||||
|
|
||||||
engineConfiguration->twoWireBatchInjection = true; // this is needed for #492 testing
|
engineConfiguration->twoWireBatchInjection = true; // this is needed for #492 testing
|
||||||
|
|
||||||
boardConfiguration->alternatorControlPin = GPIOE_10;
|
boardConfiguration->alternatorControlPin = GPIOE_10;
|
||||||
|
@ -309,14 +334,10 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
// boardConfiguration->vehicleSpeedSensorInputPin = GPIOA_8;
|
// boardConfiguration->vehicleSpeedSensorInputPin = GPIOA_8;
|
||||||
|
|
||||||
// set idle_position 35
|
|
||||||
boardConfiguration->manIdlePosition = 35;
|
|
||||||
|
|
||||||
|
|
||||||
boardConfiguration->vvtCamSensorUseRise = true;
|
boardConfiguration->vvtCamSensorUseRise = true;
|
||||||
engineConfiguration->vvtDisplayInverted = true;
|
engineConfiguration->vvtDisplayInverted = true;
|
||||||
|
|
||||||
engineConfiguration->auxPidFrequency[0] = 300;
|
|
||||||
engineConfiguration->auxPidPins[0] = GPIOE_3; // VVT solenoid control
|
engineConfiguration->auxPidPins[0] = GPIOE_3; // VVT solenoid control
|
||||||
// /**
|
// /**
|
||||||
// * set_fsio_setting 1 0.55
|
// * set_fsio_setting 1 0.55
|
||||||
|
@ -361,29 +382,10 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->tpsMax = 650; // convert 12to10 bit (ADC/4)
|
engineConfiguration->tpsMax = 650; // convert 12to10 bit (ADC/4)
|
||||||
|
|
||||||
|
|
||||||
// 0.0825
|
|
||||||
// 0.1375
|
|
||||||
// 6.375
|
|
||||||
// 10.625
|
|
||||||
boardConfiguration->miataNb2VVTRatioFrom = 8.50 * 0.75;
|
|
||||||
boardConfiguration->miataNb2VVTRatioTo = 14;
|
|
||||||
engineConfiguration->nbVvtIndex = 0;
|
|
||||||
|
|
||||||
|
|
||||||
engineConfiguration->specs.cylindersCount = 4;
|
|
||||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
|
||||||
|
|
||||||
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
|
||||||
|
|
||||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
|
||||||
|
|
||||||
boardConfiguration->malfunctionIndicatorPin = GPIOE_6; // just for a test
|
boardConfiguration->malfunctionIndicatorPin = GPIOE_6; // just for a test
|
||||||
|
|
||||||
/**
|
|
||||||
* http://miataturbo.wikidot.com/fuel-injectors
|
|
||||||
* 01-05 (purple) - #195500-4060
|
|
||||||
*/
|
|
||||||
engineConfiguration->injector.flow = 265;
|
|
||||||
|
|
||||||
// boardConfiguration->malfunctionIndicatorPin = GPIOD_9;
|
// boardConfiguration->malfunctionIndicatorPin = GPIOD_9;
|
||||||
// boardConfiguration->malfunctionIndicatorPinMode = OM_INVERTED;
|
// boardConfiguration->malfunctionIndicatorPinMode = OM_INVERTED;
|
||||||
|
@ -508,13 +510,26 @@ void setMazdaMiata2003EngineConfigurationBoardTest(DECLARE_CONFIG_PARAMETER_SIGN
|
||||||
* set engine_type 13
|
* set engine_type 13
|
||||||
*/
|
*/
|
||||||
void setMiataNB2_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
void setMiataNB2_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
|
setMazdaMiataEngineNB2Defaults(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
// MRE has a special main relay control low side pin - rusEfi firmware is totally not involved with main relay control
|
// MRE has a special main relay control low side pin - rusEfi firmware is totally not involved with main relay control
|
||||||
// fuelPumpPin is inherited from boards/microrusefi/board_configuration.cpp
|
// fuelPumpPin is inherited from boards/microrusefi/board_configuration.cpp
|
||||||
// crank trigger input is inherited from boards/microrusefi/board_configuration.cpp
|
// crank trigger input is inherited from boards/microrusefi/board_configuration.cpp
|
||||||
|
// map.sensor.hwChannel input is inherited from boards/microrusefi/board_configuration.cpp
|
||||||
|
// tps1_1AdcChannel input is inherited from boards/microrusefi/board_configuration.cpp
|
||||||
|
// afr.hwChannel input is inherited from boards/microrusefi/board_configuration.cpp
|
||||||
|
|
||||||
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
engineConfiguration->camInputs[0] = GPIOA_5;
|
engineConfiguration->camInputs[0] = GPIOA_5;
|
||||||
engineConfiguration->useOnlyRisingEdgeForTrigger = false;
|
engineConfiguration->useOnlyRisingEdgeForTrigger = false;
|
||||||
|
|
||||||
|
// GPIOD_6: "13 - GP Out 6" - selected to +12v
|
||||||
|
boardConfiguration->alternatorControlPin = GPIOD_6;
|
||||||
|
// GPIOD_7: "14 - GP Out 5" - selected to +12v
|
||||||
|
engineConfiguration->dizzySparkOutputPin = GPIOD_7; // tachometer
|
||||||
|
|
||||||
|
|
||||||
engineConfiguration->etb.pFactor = 12; // a bit lower p-factor seems to work better on TLE9201? MRE?
|
engineConfiguration->etb.pFactor = 12; // a bit lower p-factor seems to work better on TLE9201? MRE?
|
||||||
engineConfiguration->etb.iFactor = 0;
|
engineConfiguration->etb.iFactor = 0;
|
||||||
|
@ -537,4 +552,12 @@ void setMiataNB2_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// set vbatt_divider 11
|
||||||
|
// 0.3#4 has wrong R139 as well?
|
||||||
|
// 56k high side/10k low side multiplied by above analogInputDividerCoefficient = 11
|
||||||
|
engineConfiguration->vbattDividerCoeff = (66.0f / 10.0f) * engineConfiguration->analogInputDividerCoefficient;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue