2019-12-26 18:33:12 -08:00
|
|
|
/*
|
|
|
|
* @file vw_b6.cpp
|
|
|
|
*
|
|
|
|
* @date Dec 26, 2019
|
2020-01-07 21:02:40 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
2019-12-26 18:33:12 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "engine.h"
|
|
|
|
#include "vw_b6.h"
|
2020-10-12 21:35:04 -07:00
|
|
|
#include "custom_engine.h"
|
2019-12-26 18:33:12 -08:00
|
|
|
|
|
|
|
EXTERN_CONFIG;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* set engine_type 62
|
2020-08-29 07:06:28 -07:00
|
|
|
* VW_B6
|
2020-10-12 21:35:04 -07:00
|
|
|
* has to be microRusEFI 0.5.2
|
2019-12-26 18:33:12 -08:00
|
|
|
*/
|
2020-08-29 07:06:28 -07:00
|
|
|
void setVwPassatB6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|
|
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
|
|
|
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
|
|
|
engineConfiguration->vvtMode = VVT_BOSCH_QUICK_START;
|
2019-12-26 18:33:12 -08:00
|
|
|
|
2020-08-29 16:01:44 -07:00
|
|
|
strcpy(CONFIG(engineMake), ENGINE_MAKE_VAG);
|
|
|
|
strcpy(CONFIG(engineCode), "BPY");
|
|
|
|
|
|
|
|
|
2020-08-29 14:05:54 -07:00
|
|
|
engineConfiguration->verboseVVTDecoding = true;
|
2020-08-29 16:01:44 -07:00
|
|
|
engineConfiguration->invertCamVVTSignal = true;
|
|
|
|
engineConfiguration->vvtCamSensorUseRise = true;
|
2020-10-12 21:35:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CONFIG(isSdCardEnabled) = false;
|
|
|
|
|
|
|
|
CONFIG(mc33816spiDevice) = SPI_DEVICE_3;
|
|
|
|
setBoschHDEV_5_injectors(PASS_CONFIG_PARAMETER_SIGNATURE);
|
|
|
|
engineConfiguration->spi3mosiPin = GPIOC_12;
|
|
|
|
engineConfiguration->spi3misoPin = GPIOC_11;
|
|
|
|
engineConfiguration->spi3sckPin = GPIOC_10;
|
|
|
|
engineConfiguration->sdCardCsPin = GPIO_UNASSIGNED;
|
|
|
|
CONFIG(is_enabled_spi_3) = true;
|
|
|
|
|
|
|
|
|
|
|
|
// blue wire
|
|
|
|
CONFIG(mc33816_cs) = GPIOB_9;
|
|
|
|
// J18 green wire
|
|
|
|
CONFIG(mc33816_rstb) = GPIOB_7;
|
|
|
|
// J9 yellow wire
|
|
|
|
CONFIG(mc33816_driven) = GPIOC_13;
|
|
|
|
// J6 white wire
|
|
|
|
CONFIG(mc33816_flag0) = GPIOE_9;
|
|
|
|
|
|
|
|
// J10
|
|
|
|
engineConfiguration->injectionPins[0] = GPIOE_6;
|
|
|
|
// J11
|
|
|
|
engineConfiguration->injectionPins[1] = GPIOE_5;
|
2020-08-29 07:06:28 -07:00
|
|
|
}
|