Brain pin is enum class (#4108)
* change most usages to Gpio:: * board configs * engine configs etc * isBrainPinValid, smart gpio * generator * generator * generator * connector yamls * kinetis enums * cypress txt * kinetis config * frankenso * config generator * actually do it for the others * disable skips for pr ci * fix tle8888 * misc * weird cast from int * needs this operator too * this can be an unsigned subtract * happy tests * s * kinetis isConfigurationChanged weirdness * missed J/K * cypress efifeatures * build script mistake (!) * mistake in smart gpio * debounce * eg33 * kinetis, so needy * it's pretty green, we can skip these again
This commit is contained in:
parent
7db5f6a7dd
commit
83caf1ea1b
|
@ -3,7 +3,7 @@ echo "Compiling for https://rusefi.com/forum/viewtopic.php?f=4&t=1489"
|
|||
cd ../..
|
||||
rem TODO: somehow this -DDUMMY is helping us to not mess up the parameters, why?!
|
||||
rem https://github.com/rusefi/rusefi/issues/684
|
||||
set EXTRA_PARAMS="-DDUMMY -DEFI_COMMUNICATION_PIN=GPIOA_7"
|
||||
set EXTRA_PARAMS="-DDUMMY -DEFI_COMMUNICATION_PIN=Gpio::A7"
|
||||
make -j8 clean
|
||||
|
||||
call config/boards/common_make.bat
|
|
@ -5,7 +5,7 @@ rem TODO: somehow this -DDUMMY is helping us to not mess up the parameters, why?
|
|||
rem https://github.com/rusefi/rusefi/issues/684
|
||||
rem this board has only 512K flash so using custom FLASH_ADDR
|
||||
rem You probably want "flash0 : org = 0x08000000, len = 450K" in the .ld file
|
||||
set EXTRA_PARAMS=-DDUMMY -DEFI_COMMUNICATION_PIN=GPIOB_9 -DSTM32_RTCPRE_VALUE=25 ^
|
||||
set EXTRA_PARAMS=-DDUMMY -DEFI_COMMUNICATION_PIN=Gpio::B9 -DSTM32_RTCPRE_VALUE=25 ^
|
||||
-DEFI_INTERNAL_FLASH=FALSE ^
|
||||
-DHAL_USE_RTC=FALSE ^
|
||||
-DBOARD_OTG_NOVBUSSENS ^
|
||||
|
|
|
@ -3,7 +3,7 @@ BOARDCPPSRC = $(PROJECT_DIR)/config/boards/atlas/board_configuration.cpp
|
|||
|
||||
BOARDINC = $(PROJECT_DIR)/config/boards/atlas
|
||||
|
||||
#DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOE_3
|
||||
#DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::E3
|
||||
DDEFS += -DFIRMWARE_ID=\"atlas\"
|
||||
|
||||
# This stuff doesn't work on H7 yet
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
#define EFI_USB_AF 10U
|
||||
|
||||
#undef EFI_USB_SERIAL_DM
|
||||
#define EFI_USB_SERIAL_DM GPIOA_11
|
||||
#define EFI_USB_SERIAL_DM Gpio::A11
|
||||
|
||||
#undef EFI_USB_SERIAL_DP
|
||||
#define EFI_USB_SERIAL_DP GPIOA_12
|
||||
#define EFI_USB_SERIAL_DP Gpio::A12
|
||||
|
||||
#undef STM32_SERIAL_USE_USART1
|
||||
#define STM32_SERIAL_USE_USART1 FALSE
|
||||
|
@ -34,10 +34,10 @@
|
|||
#define TS_PRIMARY_PORT UARTD1
|
||||
|
||||
#undef EFI_CONSOLE_TX_BRAIN_PIN
|
||||
#define EFI_CONSOLE_TX_BRAIN_PIN GPIOA_9
|
||||
#define EFI_CONSOLE_TX_BRAIN_PIN Gpio::A9
|
||||
|
||||
#undef EFI_CONSOLE_RX_BRAIN_PIN
|
||||
#define EFI_CONSOLE_RX_BRAIN_PIN GPIOA_10
|
||||
#define EFI_CONSOLE_RX_BRAIN_PIN Gpio::A10
|
||||
|
||||
#undef EFI_USE_OSC
|
||||
#define EFI_USE_OSC TRUE
|
||||
|
@ -67,7 +67,7 @@
|
|||
#define HAL_VSS_USE_PAL TRUE
|
||||
|
||||
#undef LED_CRITICAL_ERROR_BRAIN_PIN
|
||||
#define LED_CRITICAL_ERROR_BRAIN_PIN GPIOG_11
|
||||
#define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::G11
|
||||
|
||||
// Ignore USB VBUS pin (we're never a host, only a device)
|
||||
#define BOARD_OTG_NOVBUSSENS TRUE
|
||||
|
|
|
@ -11,27 +11,27 @@
|
|||
static void setInjectorPins() {
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOF_13;
|
||||
engineConfiguration->injectionPins[1] = GPIOF_14;
|
||||
engineConfiguration->injectionPins[2] = GPIOD_8;
|
||||
engineConfiguration->injectionPins[3] = GPIOD_9;
|
||||
engineConfiguration->injectionPins[4] = GPIOD_10;
|
||||
engineConfiguration->injectionPins[5] = GPIOD_11;
|
||||
engineConfiguration->injectionPins[6] = GPIOD_12;
|
||||
engineConfiguration->injectionPins[7] = GPIOD_13;
|
||||
engineConfiguration->injectionPins[0] = Gpio::F13;
|
||||
engineConfiguration->injectionPins[1] = Gpio::F14;
|
||||
engineConfiguration->injectionPins[2] = Gpio::D8;
|
||||
engineConfiguration->injectionPins[3] = Gpio::D9;
|
||||
engineConfiguration->injectionPins[4] = Gpio::D10;
|
||||
engineConfiguration->injectionPins[5] = Gpio::D11;
|
||||
engineConfiguration->injectionPins[6] = Gpio::D12;
|
||||
engineConfiguration->injectionPins[7] = Gpio::D13;
|
||||
}
|
||||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOE_15;
|
||||
engineConfiguration->ignitionPins[1] = GPIOE_14;
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_13;
|
||||
engineConfiguration->ignitionPins[3] = GPIOE_12;
|
||||
engineConfiguration->ignitionPins[4] = GPIOE_11;
|
||||
engineConfiguration->ignitionPins[5] = GPIOF_15;
|
||||
engineConfiguration->ignitionPins[6] = GPIOG_0;
|
||||
engineConfiguration->ignitionPins[7] = GPIOG_1;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::E15;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::E14;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E13;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::E12;
|
||||
engineConfiguration->ignitionPins[4] = Gpio::E11;
|
||||
engineConfiguration->ignitionPins[5] = Gpio::F15;
|
||||
engineConfiguration->ignitionPins[6] = Gpio::G0;
|
||||
engineConfiguration->ignitionPins[7] = Gpio::G1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,23 +47,23 @@ static void setEtbConfig() {
|
|||
|
||||
// Throttle #1
|
||||
// PWM pin
|
||||
engineConfiguration->etbIo[0].controlPin = GPIOB_8;
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::B8;
|
||||
// DIR pin
|
||||
engineConfiguration->etbIo[0].directionPin1 = GPIOB_9;
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::B9;
|
||||
// Disable pin
|
||||
engineConfiguration->etbIo[0].disablePin = GPIOB_7;
|
||||
engineConfiguration->etbIo[0].disablePin = Gpio::B7;
|
||||
// Unused
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
||||
|
||||
// Throttle #2
|
||||
// PWM pin
|
||||
engineConfiguration->etbIo[1].controlPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[1].controlPin = Gpio::Unassigned;
|
||||
// DIR pin
|
||||
engineConfiguration->etbIo[1].directionPin1 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[1].directionPin1 = Gpio::Unassigned;
|
||||
// Disable pin
|
||||
engineConfiguration->etbIo[1].disablePin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[1].disablePin = Gpio::Unassigned;
|
||||
// Unused
|
||||
engineConfiguration->etbIo[1].directionPin2 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
|
||||
|
||||
// we only have pwm/dir, no dira/dirb
|
||||
engineConfiguration->etb_use_two_wires = false;
|
||||
|
@ -83,9 +83,9 @@ static void setupVbatt() {
|
|||
}
|
||||
|
||||
static void setStepperConfig() {
|
||||
engineConfiguration->idle.stepperDirectionPin = GPIOF_7;
|
||||
engineConfiguration->idle.stepperStepPin = GPIOF_8;
|
||||
engineConfiguration->stepperEnablePin = GPIOF_9;
|
||||
engineConfiguration->idle.stepperDirectionPin = Gpio::F7;
|
||||
engineConfiguration->idle.stepperStepPin = Gpio::F8;
|
||||
engineConfiguration->stepperEnablePin = Gpio::F9;
|
||||
}
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
|
@ -94,20 +94,20 @@ void setBoardConfigOverrides() {
|
|||
setStepperConfig();
|
||||
|
||||
// PE3 is error LED, configured in board.mk
|
||||
engineConfiguration->communicationLedPin = GPIOG_12;
|
||||
engineConfiguration->runningLedPin = GPIOG_9;
|
||||
engineConfiguration->warningLedPin = GPIOG_10;
|
||||
engineConfiguration->communicationLedPin = Gpio::G12;
|
||||
engineConfiguration->runningLedPin = Gpio::G9;
|
||||
engineConfiguration->warningLedPin = Gpio::G10;
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 2490;
|
||||
engineConfiguration->iat.config.bias_resistor = 2490;
|
||||
|
||||
//CAN 1 bus overwrites
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
|
||||
//CAN 2 bus overwrites
|
||||
engineConfiguration->can2RxPin = GPIOB_5;
|
||||
engineConfiguration->can2TxPin = GPIOB_6;
|
||||
engineConfiguration->can2RxPin = Gpio::B5;
|
||||
engineConfiguration->can2TxPin = Gpio::B6;
|
||||
}
|
||||
|
||||
static void setupDefaultSensorInputs() {
|
||||
|
@ -117,8 +117,8 @@ static void setupDefaultSensorInputs() {
|
|||
|
||||
engineConfiguration->baroSensor.hwChannel = EFI_ADC_NONE;
|
||||
|
||||
engineConfiguration->lps25BaroSensorScl = GPIOB_10;
|
||||
engineConfiguration->lps25BaroSensorSda = GPIOB_11;
|
||||
engineConfiguration->lps25BaroSensorScl = Gpio::B10;
|
||||
engineConfiguration->lps25BaroSensorSda = Gpio::B11;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,56 +1,56 @@
|
|||
pins:
|
||||
# Grey A line
|
||||
- pin: Grey A1
|
||||
id: GPIOF_13
|
||||
id: F13
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: inj
|
||||
ts_name: Grey A1 - Injector 1
|
||||
|
||||
- pin: Grey A2
|
||||
id: GPIOF_14
|
||||
id: F14
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: inj
|
||||
ts_name: Grey A2 - Injector 2
|
||||
|
||||
- pin: Grey A3
|
||||
id: GPIOD_8
|
||||
id: D8
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: inj
|
||||
ts_name: Grey A3 - Injector 3
|
||||
|
||||
- pin: Grey A4
|
||||
id: GPIOD_9
|
||||
id: D9
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: inj
|
||||
ts_name: Grey A4 - Injector 4
|
||||
|
||||
- pin: Grey A5
|
||||
id: GPIOD_10
|
||||
id: D10
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: inj
|
||||
ts_name: Grey A5 - Injector 5
|
||||
|
||||
- pin: Grey A6
|
||||
id: GPIOD_11
|
||||
id: D11
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: inj
|
||||
ts_name: Grey A6 - Injector 6
|
||||
|
||||
- pin: Grey A7
|
||||
id: GPIOD_12
|
||||
id: D12
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: inj
|
||||
ts_name: Grey A7 - Injector 7
|
||||
|
||||
- pin: Grey A8
|
||||
id: GPIOD_13
|
||||
id: D13
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: inj
|
||||
|
@ -59,56 +59,56 @@ pins:
|
|||
# Grey B line
|
||||
|
||||
- pin: Grey B1
|
||||
id: GPIOE_15
|
||||
id: E15
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: ign
|
||||
ts_name: Grey B1 - Ignition 1
|
||||
|
||||
- pin: Grey B2
|
||||
id: GPIOE_14
|
||||
id: E14
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: ign
|
||||
ts_name: Grey B2 - Ignition 2
|
||||
|
||||
- pin: Grey B3
|
||||
id: GPIOE_13
|
||||
id: E13
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: ign
|
||||
ts_name: Grey B3 - Ignition 3
|
||||
|
||||
- pin: Grey B4
|
||||
id: GPIOE_12
|
||||
id: E12
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: ign
|
||||
ts_name: Grey B4 - Ignition 4
|
||||
|
||||
- pin: Grey B5
|
||||
id: GPIOE_11
|
||||
id: E11
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: ign
|
||||
ts_name: Grey B5 - Ignition 5
|
||||
|
||||
- pin: Grey B6
|
||||
id: GPIOF_15
|
||||
id: F15
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: ign
|
||||
ts_name: Grey B6 - Ignition 6
|
||||
|
||||
- pin: Grey B7
|
||||
id: GPIOG_0
|
||||
id: G0
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: ign
|
||||
ts_name: Grey B7 - Ignition 7
|
||||
|
||||
- pin: Grey B8
|
||||
id: GPIOG_1
|
||||
id: G1
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: ign
|
||||
|
@ -159,7 +159,7 @@ pins:
|
|||
ts_name: Grey C7 - Analog Sensor Input
|
||||
|
||||
- pin: Grey C8
|
||||
id: GPIOD_14
|
||||
id: D14
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: ls
|
||||
|
@ -168,49 +168,49 @@ pins:
|
|||
# Black A line
|
||||
|
||||
- pin: Black A1
|
||||
id: GPIOG_3
|
||||
id: G3
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: ls
|
||||
ts_name: Black A1 - Low Side Output
|
||||
|
||||
- pin: Black A2
|
||||
id: GPIOG_4
|
||||
id: G4
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: ls
|
||||
ts_name: Black A2 - Low Side Output
|
||||
|
||||
- pin: Black A3
|
||||
id: GPIOG_5
|
||||
id: G5
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: ls
|
||||
ts_name: Black A3 - Low Side Output
|
||||
|
||||
- pin: Black A4
|
||||
id: GPIOG_6
|
||||
id: G6
|
||||
class: outputs
|
||||
function: Low Side Output / DBW_OUT+
|
||||
type: ls
|
||||
ts_name: Black A4 - Low Side Output / DBW_OUT+
|
||||
|
||||
- pin: Black A5
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
class: outputs
|
||||
function: Low Side Output / DBW_OUT-
|
||||
type: ls
|
||||
ts_name: Black A5 - Low Side Output / DBW_OUT-
|
||||
|
||||
- pin: Black A6
|
||||
id: GPIOC_13
|
||||
id: C13
|
||||
class: switch_inputs
|
||||
function: LSU1_IA / Digital Input
|
||||
type: hall
|
||||
ts_name: Black A6 - LSU4.9 PIN 5 / Digital Input 8
|
||||
|
||||
- pin: Black A7
|
||||
id: GPIOF_1
|
||||
id: F1
|
||||
class: switch_inputs
|
||||
function: LSU1_VGND / Digital Input
|
||||
type: hall
|
||||
|
@ -224,28 +224,28 @@ pins:
|
|||
# Black B line
|
||||
|
||||
- pin: Black B1
|
||||
id: GPIOG_2
|
||||
id: G2
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: ls
|
||||
ts_name: Black B1 - Low Side Output
|
||||
|
||||
- pin: Black B2
|
||||
id: GPIOF_5
|
||||
id: F5
|
||||
class: switch_inputs
|
||||
function: Digital Input
|
||||
type: hall
|
||||
ts_name: Black B2 - Digital Input 1
|
||||
|
||||
- pin: Black B3
|
||||
id: GPIOF_4
|
||||
id: F4
|
||||
class: switch_inputs
|
||||
function: Digital Input
|
||||
type: hall
|
||||
ts_name: Black B3 - Digital Input 2
|
||||
|
||||
- pin: Black B4
|
||||
id: GPIOF_3
|
||||
id: F3
|
||||
class: switch_inputs
|
||||
function: Digital Input
|
||||
type: hall
|
||||
|
@ -258,14 +258,14 @@ pins:
|
|||
ts_name: Black B5 - Analog Sensor Input / Knock 2
|
||||
|
||||
- pin: Black B6
|
||||
id: GPIOE_6
|
||||
id: E6
|
||||
class: switch_inputs
|
||||
function: LSU1_NERMEST / Digital Input
|
||||
type: hall
|
||||
ts_name: Black B6 - LSU4.9 PIN 6 / Digital Input 7
|
||||
|
||||
- pin: Black B7
|
||||
id: GPIOF_0
|
||||
id: F0
|
||||
class: switch_inputs
|
||||
function: LSU1_IP / Digital Input
|
||||
type: hall
|
||||
|
@ -278,14 +278,14 @@ pins:
|
|||
# Black C line
|
||||
|
||||
- pin: Black C1
|
||||
id: GPIOD_15
|
||||
id: D15
|
||||
class: outputs
|
||||
function: Low Side Output
|
||||
type: ls
|
||||
ts_name: Black C1 - Low Side Output
|
||||
|
||||
- pin: Black C2
|
||||
id: [GPIOE_2, GPIOE_2]
|
||||
id: [E2, E2]
|
||||
class: [event_inputs, switch_inputs]
|
||||
function: Camshaft Sensor (VR+/Hall)
|
||||
type: hall
|
||||
|
@ -304,7 +304,7 @@ pins:
|
|||
ts_name: Crank Sensor VR-
|
||||
|
||||
- pin: Black C5
|
||||
id: [GPIOE_3, GPIOE_3]
|
||||
id: [E3, E3]
|
||||
class: [event_inputs, switch_inputs]
|
||||
function: Crank Sensor (VR+/Hall)
|
||||
type: hall
|
||||
|
|
|
@ -40,9 +40,9 @@
|
|||
* USB settings
|
||||
*/
|
||||
#define EFI_USB_AF 12U
|
||||
//#define EFI_USB_SERIAL_ID GPIOA_10
|
||||
#define EFI_USB_SERIAL_DM GPIOB_14
|
||||
#define EFI_USB_SERIAL_DP GPIOB_15
|
||||
//#define EFI_USB_SERIAL_ID Gpio::A10
|
||||
#define EFI_USB_SERIAL_DM Gpio::B14
|
||||
#define EFI_USB_SERIAL_DP Gpio::B15
|
||||
|
||||
/*
|
||||
* Board oscillators-related settings.
|
||||
|
|
|
@ -14,7 +14,7 @@ IS_STM32F429 = yes
|
|||
EFI_HAS_EXT_SDRAM = yes
|
||||
|
||||
#LED
|
||||
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOG_14
|
||||
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::G14
|
||||
|
||||
DDEFS += -DSTM32_FSMC_USE_FSMC1=TRUE -DSTM32_SDRAM_USE_SDRAM2=TRUE
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ void boardInit(void)
|
|||
* @todo Add your board-specific code, if any.
|
||||
*/
|
||||
void setBoardDefaultConfiguration() {
|
||||
engineConfiguration->communicationLedPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->runningLedPin = GPIOG_13; /* LD3 - green */
|
||||
engineConfiguration->warningLedPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->communicationLedPin = Gpio::Unassigned;
|
||||
engineConfiguration->runningLedPin = Gpio::G13; /* LD3 - green */
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
}
|
||||
|
|
|
@ -4,49 +4,49 @@ pins:
|
|||
|
||||
|
||||
- pin: 6
|
||||
id: GPIOC_9
|
||||
id: C9
|
||||
class: outputs
|
||||
function: Ignition Coil #1
|
||||
ts_name: Coil 1F
|
||||
|
||||
- pin: 7
|
||||
id: GPIOE_14
|
||||
id: E14
|
||||
class: outputs
|
||||
function: Ignition Coil #3
|
||||
ts_name: Coil 1G
|
||||
|
||||
- pin: 8
|
||||
id: GPIOC_7
|
||||
id: C7
|
||||
class: outputs
|
||||
function: Ignition Coil #2
|
||||
ts_name: Coil 1H
|
||||
|
||||
- pin: 9
|
||||
id: GPIOE_10
|
||||
id: E10
|
||||
class: outputs
|
||||
function: Spare High #5
|
||||
ts_name: Coil 1I
|
||||
|
||||
- pin: 12
|
||||
id: GPIOE_8
|
||||
id: E8
|
||||
class: outputs
|
||||
function: Spare High #6
|
||||
ts_name: Coil 1L
|
||||
|
||||
- pin: 13
|
||||
id: GPIOE_12
|
||||
id: E12
|
||||
class: outputs
|
||||
function: Ignition Coil #4
|
||||
ts_name: Coil 1M
|
||||
|
||||
- pin: 15
|
||||
id: GPIOD_8
|
||||
id: D8
|
||||
class: outputs
|
||||
function: Spare High #8
|
||||
ts_name: Coil 1O
|
||||
|
||||
- pin: 16
|
||||
id: GPIOD_9
|
||||
id: D9
|
||||
class: outputs
|
||||
function: Spare High #7
|
||||
ts_name: Coil 1P
|
||||
|
@ -76,25 +76,25 @@ pins:
|
|||
function: CAN low
|
||||
|
||||
- pin: 35
|
||||
id: GPIOC_13
|
||||
id: C13
|
||||
class: outputs
|
||||
ts_name: Injector 2M
|
||||
function: Idle Valve Control Solenoid
|
||||
|
||||
- pin: 36
|
||||
id: GPIOD_7
|
||||
id: D7
|
||||
class: outputs
|
||||
ts_name: Injector 2N
|
||||
function: Main Relay
|
||||
|
||||
- pin: 37
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
ts_name: Injector 2O
|
||||
function: Coolant Fan Relay
|
||||
|
||||
- pin: 38
|
||||
id: GPIOE_6
|
||||
id: E6
|
||||
class: outputs
|
||||
ts_name: Injector 2P
|
||||
function: Spare low #2
|
||||
|
@ -176,49 +176,49 @@ pins:
|
|||
function: Coolant Temp Sensor
|
||||
|
||||
- pin: 57
|
||||
id: GPIOE_3
|
||||
id: E3
|
||||
class: outputs
|
||||
ts_name: Injector 3S
|
||||
function: Spare low #1
|
||||
|
||||
- pin: 58
|
||||
id: GPIOE_4
|
||||
id: E4
|
||||
class: outputs
|
||||
ts_name: Injector 3T
|
||||
function: Fuel Pump Relay
|
||||
|
||||
- pin: 59
|
||||
id: GPIOD_3
|
||||
id: D3
|
||||
class: outputs
|
||||
ts_name: Injector 3U
|
||||
function: Spare low
|
||||
|
||||
- pin: 60
|
||||
id: GPIOE_2
|
||||
id: E2
|
||||
class: outputs
|
||||
ts_name: Injector 3V
|
||||
function: Injector #2
|
||||
|
||||
- pin: 61
|
||||
id: GPIOB_9
|
||||
id: B9
|
||||
class: outputs
|
||||
ts_name: Injector 3W
|
||||
function: Injector #1
|
||||
|
||||
- pin: 62
|
||||
id: GPIOD_5
|
||||
id: D5
|
||||
class: outputs
|
||||
ts_name: Injector 3X
|
||||
function: Spare low
|
||||
|
||||
- pin: 63
|
||||
id: GPIOB_8
|
||||
id: B8
|
||||
class: outputs
|
||||
ts_name: Injector 3Y
|
||||
function: Injector #3
|
||||
|
||||
- pin: 64
|
||||
id: GPIOB_7
|
||||
id: B7
|
||||
class: outputs
|
||||
ts_name: Injector 3Z
|
||||
function: Injector #4
|
||||
|
|
|
@ -25,31 +25,31 @@ static OutputPin alphaCamPullDown;
|
|||
static void setInjectorPins() {
|
||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
||||
engineConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[3] = Gpio::Unassigned;
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->clutchDownPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->clutchDownPin = Gpio::Unassigned;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[2] = H144_IGN_2;
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -72,8 +72,8 @@ static void setupDefaultSensorInputs() {
|
|||
// trigger inputs, hall
|
||||
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
|
||||
engineConfiguration->triggerInputPins[1] = H144_IN_CAM;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->camInputs[0] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->tps1_1AdcChannel = H144_IN_TPS;
|
||||
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
|
||||
|
@ -123,8 +123,8 @@ void setBoardConfigOverrides() {
|
|||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -140,10 +140,10 @@ void setBoardDefaultConfiguration() {
|
|||
|
||||
engineConfiguration->boardUseTempPullUp = true;
|
||||
|
||||
engineConfiguration->acSwitch = GPIO_UNASSIGNED;
|
||||
engineConfiguration->acSwitch = Gpio::Unassigned;
|
||||
engineConfiguration->fuelPumpPin = H144_OUT_PWM2;
|
||||
engineConfiguration->fanPin = H144_OUT_PWM4;
|
||||
engineConfiguration->mainRelayPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->mainRelayPin = Gpio::Unassigned;
|
||||
engineConfiguration->tachOutputPin = H144_OUT_PWM3;
|
||||
|
||||
// "required" hardware is done - set some reasonable defaults
|
||||
|
@ -159,7 +159,7 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->clutchDownPin = H144_IN_D_2;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
|
||||
// ? engineConfiguration->malfunctionIndicatorPin = GPIOG_4; //1E - Check Engine Light
|
||||
// ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
|
||||
setHellenDefaultVrThresholds();
|
||||
engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ pins:
|
|||
|
||||
- pin: A3
|
||||
# H144_OUT_PWM2
|
||||
id: GPIOC_6
|
||||
id: C6
|
||||
class: outputs
|
||||
function: Fuel Pump Relay Output (low)
|
||||
type: ls
|
||||
|
@ -25,7 +25,7 @@ pins:
|
|||
|
||||
- pin: A4
|
||||
# H144_OUT_PWM3
|
||||
id: GPIOC_7
|
||||
id: C7
|
||||
class: outputs
|
||||
function: Tachometer Output
|
||||
ts_name: A4 - Tachometer
|
||||
|
@ -38,7 +38,7 @@ pins:
|
|||
|
||||
- pin: A6
|
||||
# H144_IGN_1
|
||||
id: GPIOC_13
|
||||
id: C13
|
||||
class: outputs
|
||||
function: Smart Ignition A Output
|
||||
type: ign
|
||||
|
@ -47,7 +47,7 @@ pins:
|
|||
|
||||
- pin: A7
|
||||
# H144_IGN_2
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
function: Smart Ignition B Output
|
||||
type: ign
|
||||
|
@ -56,7 +56,7 @@ pins:
|
|||
|
||||
- pin: A8
|
||||
# H144_LS_1
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
function: Injector A Output
|
||||
class: outputs
|
||||
type: inj
|
||||
|
@ -123,7 +123,7 @@ pins:
|
|||
|
||||
- pin: B8
|
||||
# H144_LS_2
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
function: Injector B Output
|
||||
class: outputs
|
||||
type: inj
|
||||
|
@ -132,7 +132,7 @@ pins:
|
|||
|
||||
- pin: C1
|
||||
# H144_OUT_PWM4
|
||||
id: GPIOC_8
|
||||
id: C8
|
||||
class: outputs
|
||||
function: Fan Relay or 5A Power Output (low)
|
||||
type: ls
|
||||
|
@ -141,7 +141,7 @@ pins:
|
|||
|
||||
- pin: C2
|
||||
# H144_IN_D_3
|
||||
id: [GPIOE_14, GPIOE_14]
|
||||
id: [E14, E14]
|
||||
class: [event_inputs, switch_inputs]
|
||||
function: Crank Sensor -
|
||||
type: hall
|
||||
|
@ -150,7 +150,7 @@ pins:
|
|||
|
||||
- pin: C3
|
||||
# H144_IN_D_1
|
||||
id: [GPIOE_12, GPIOE_12]
|
||||
id: [E12, E12]
|
||||
class: [event_inputs, switch_inputs]
|
||||
function: Crank Sensor +
|
||||
type: hall
|
||||
|
@ -159,7 +159,7 @@ pins:
|
|||
|
||||
- pin: C2C3
|
||||
# H144_IN_CRANK
|
||||
id: GPIOB_1
|
||||
id: B1
|
||||
class: event_inputs
|
||||
function: Crank Sensor (VR)
|
||||
type: hall
|
||||
|
@ -168,7 +168,7 @@ pins:
|
|||
|
||||
- pin: C4
|
||||
# H144_IN_VSS
|
||||
id: GPIOF_11
|
||||
id: F11
|
||||
class: switch_inputs
|
||||
function: 2Step Digital Input
|
||||
type: hall
|
||||
|
@ -187,7 +187,7 @@ pins:
|
|||
|
||||
- pin: C7
|
||||
# H144_IN_CAM
|
||||
id: [GPIOA_6, GPIOA_6, EFI_ADC_6]
|
||||
id: [A6, A6, EFI_ADC_6]
|
||||
class: [event_inputs, switch_inputs, analog_inputs]
|
||||
function: Camshaft HALL Sensor or Generic Digital Input
|
||||
type: hall
|
||||
|
@ -196,7 +196,7 @@ pins:
|
|||
|
||||
- pin: C8
|
||||
# H144_OUT_PWM1
|
||||
id: GPIOD_13
|
||||
id: D13
|
||||
class: outputs
|
||||
function: Idle Output (low)
|
||||
type: ls
|
||||
|
|
|
@ -35,15 +35,15 @@ static void setInjectorPins() {
|
|||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->clutchDownPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->clutchDownPin = Gpio::Unassigned;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
static void setupEtb() {
|
||||
|
@ -60,7 +60,7 @@ static void setupEtb() {
|
|||
// Disable pin
|
||||
engineConfiguration->etbIo[0].disablePin = H144_GP2;
|
||||
// Unused
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
||||
|
||||
// we only have pwm/dir, no dira/dirb
|
||||
engineConfiguration->etb_use_two_wires = false;
|
||||
|
@ -74,7 +74,7 @@ static void setIgnitionPins() {
|
|||
|
||||
// disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -97,8 +97,8 @@ static void setupDefaultSensorInputs() {
|
|||
// trigger inputs, hall
|
||||
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
|
||||
engineConfiguration->triggerInputPins[1] = H144_IN_CAM;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->camInputs[0] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->tps1_1AdcChannel = H144_IN_TPS;
|
||||
engineConfiguration->tps1_2AdcChannel = H144_IN_AUX1;
|
||||
|
@ -163,8 +163,8 @@ void setBoardConfigOverrides() {
|
|||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -183,7 +183,7 @@ void setBoardDefaultConfiguration() {
|
|||
|
||||
engineConfiguration->boardUseTempPullUp = true;
|
||||
|
||||
engineConfiguration->acSwitch = GPIO_UNASSIGNED;
|
||||
engineConfiguration->acSwitch = Gpio::Unassigned;
|
||||
engineConfiguration->fuelPumpPin = H144_OUT_IO12;
|
||||
engineConfiguration->fanPin = H144_OUT_IO11;
|
||||
engineConfiguration->mainRelayPin = H144_OUT_IO10;
|
||||
|
@ -203,7 +203,7 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->clutchDownPin = H144_IN_D_2;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
|
||||
// ? engineConfiguration->malfunctionIndicatorPin = GPIOG_4; //1E - Check Engine Light
|
||||
// ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
|
||||
setHellenDefaultVrThresholds();
|
||||
engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6;
|
||||
engineConfiguration->vrThreshold[1].pin = H144_OUT_PWM4;
|
||||
|
|
|
@ -13,7 +13,7 @@ pins:
|
|||
|
||||
- pin: A3
|
||||
# H144_OUT_IO12
|
||||
id: GPIOA_8
|
||||
id: A8
|
||||
class: outputs
|
||||
function: Fuel Pump Relay Output (low)
|
||||
type: ls
|
||||
|
@ -22,7 +22,7 @@ pins:
|
|||
|
||||
- pin: A4
|
||||
# H144_OUT_IO13
|
||||
id: GPIOG_6
|
||||
id: G6
|
||||
class: outputs
|
||||
function: Tachometer Output
|
||||
ts_name: A4 - Tachometer
|
||||
|
@ -35,7 +35,7 @@ pins:
|
|||
|
||||
- pin: A6
|
||||
# H144_IGN_1
|
||||
id: GPIOC_13
|
||||
id: C13
|
||||
class: outputs
|
||||
function: Smart Ignition 1
|
||||
type: ign
|
||||
|
@ -44,7 +44,7 @@ pins:
|
|||
|
||||
- pin: A7
|
||||
# H144_IGN_2
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
function: Smart Ignition 2 Output
|
||||
type: ign
|
||||
|
@ -53,7 +53,7 @@ pins:
|
|||
|
||||
- pin: A8
|
||||
# H144_LS_1
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
function: Injector 1 Output
|
||||
class: outputs
|
||||
type: inj
|
||||
|
@ -120,7 +120,7 @@ pins:
|
|||
|
||||
- pin: B8
|
||||
# H144_LS_2
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
function: Injector 2 Output
|
||||
class: outputs
|
||||
type: inj
|
||||
|
@ -129,7 +129,7 @@ pins:
|
|||
|
||||
- pin: C1
|
||||
# H144_OUT_IO11
|
||||
id: GPIOG_2
|
||||
id: G2
|
||||
class: outputs
|
||||
function: Fan Relay or 5A Power Output (low)
|
||||
type: ls
|
||||
|
@ -138,7 +138,7 @@ pins:
|
|||
|
||||
- pin: C2
|
||||
# H144_IN_D_3
|
||||
id: [GPIOE_14, GPIOE_14]
|
||||
id: [E14, E14]
|
||||
class: [event_inputs, switch_inputs]
|
||||
function: Crank Sensor -
|
||||
type: hall
|
||||
|
@ -147,7 +147,7 @@ pins:
|
|||
|
||||
- pin: C3
|
||||
# H144_IN_D_1
|
||||
id: [GPIOE_12, GPIOE_12]
|
||||
id: [E12, E12]
|
||||
class: [event_inputs, switch_inputs]
|
||||
function: Crank Sensor +
|
||||
type: hall
|
||||
|
@ -156,7 +156,7 @@ pins:
|
|||
|
||||
- pin: C2C3
|
||||
# H144_IN_CRANK
|
||||
id: GPIOB_1
|
||||
id: B1
|
||||
class: event_inputs
|
||||
function: Crank Sensor (VR)
|
||||
type: hall
|
||||
|
@ -165,7 +165,7 @@ pins:
|
|||
|
||||
- pin: C4
|
||||
# H144_IN_VSS
|
||||
id: GPIOF_11
|
||||
id: F11
|
||||
class: switch_inputs
|
||||
function: 2Step Digital Input
|
||||
type: hall
|
||||
|
@ -184,7 +184,7 @@ pins:
|
|||
|
||||
- pin: C7
|
||||
# H144_IN_CAM
|
||||
id: [GPIOA_6, GPIOA_6, EFI_ADC_6]
|
||||
id: [A6, A6, EFI_ADC_6]
|
||||
class: [event_inputs, switch_inputs, analog_inputs]
|
||||
function: Camshaft HALL Sensor or Generic Digital Input
|
||||
type: hall
|
||||
|
@ -193,7 +193,7 @@ pins:
|
|||
|
||||
- pin: C8
|
||||
# H144_OUT_PWM1
|
||||
id: GPIOD_13
|
||||
id: D13
|
||||
class: outputs
|
||||
function: Idle Output (low)
|
||||
type: ls
|
||||
|
@ -202,7 +202,7 @@ pins:
|
|||
|
||||
- pin: D1
|
||||
# H144_LS_3
|
||||
id: GPIOD_11
|
||||
id: D11
|
||||
function: Injector 3
|
||||
class: outputs
|
||||
type: inj
|
||||
|
@ -211,7 +211,7 @@ pins:
|
|||
|
||||
- pin: D2
|
||||
# H144_OUT_PWM3
|
||||
id: GPIOC_7
|
||||
id: C7
|
||||
function: Out Boost
|
||||
class: outputs
|
||||
ts_name: D2 - Out Boost
|
||||
|
@ -219,7 +219,7 @@ pins:
|
|||
|
||||
- pin: D3
|
||||
# H144_IN_SENS1
|
||||
id: GPIOF_3
|
||||
id: F3
|
||||
class: switch_inputs
|
||||
function: Digital Input 2
|
||||
type: hall
|
||||
|
@ -244,7 +244,7 @@ pins:
|
|||
|
||||
- pin: D6
|
||||
# H144_IGN_3
|
||||
id: GPIOE_4
|
||||
id: E4
|
||||
class: outputs
|
||||
function: Smart Ignition 3 Output
|
||||
type: ign
|
||||
|
@ -253,7 +253,7 @@ pins:
|
|||
|
||||
- pin: D7
|
||||
# H144_IGN_4
|
||||
id: GPIOE_3
|
||||
id: E3
|
||||
class: outputs
|
||||
function: Smart Ignition 4 Output
|
||||
type: ign
|
||||
|
@ -267,7 +267,7 @@ pins:
|
|||
|
||||
- pin: E1
|
||||
# H144_LS_4
|
||||
id: GPIOD_10
|
||||
id: D10
|
||||
function: Injector 4
|
||||
class: outputs
|
||||
type: inj
|
||||
|
@ -276,7 +276,7 @@ pins:
|
|||
|
||||
- pin: E2
|
||||
# H144_OUT_IO6
|
||||
id: GPIOG_11
|
||||
id: G11
|
||||
function: Out NOS
|
||||
class: outputs
|
||||
ts_name: E2 - Out NOS
|
||||
|
@ -284,7 +284,7 @@ pins:
|
|||
|
||||
- pin: E3
|
||||
# H144_IN_SENS2
|
||||
id: GPIOF_4
|
||||
id: F4
|
||||
class: switch_inputs
|
||||
function: Digital Input 3
|
||||
type: hall
|
||||
|
@ -293,7 +293,7 @@ pins:
|
|||
|
||||
- pin: E4
|
||||
# H144_IN_SENS3
|
||||
id: GPIOF_5
|
||||
id: F5
|
||||
class: switch_inputs
|
||||
function: Digital Input 4
|
||||
type: hall
|
||||
|
@ -306,7 +306,7 @@ pins:
|
|||
|
||||
- pin: E6
|
||||
# H144_IN_D_4
|
||||
id: [GPIOE_15, GPIOE_15]
|
||||
id: [E15, E15]
|
||||
class: [event_inputs, switch_inputs]
|
||||
function: Cam Sensor VR+ as Hall
|
||||
type: hall
|
||||
|
@ -315,7 +315,7 @@ pins:
|
|||
|
||||
- pin: E5E6
|
||||
# H144_IN_RES1
|
||||
id: GPIOF_9
|
||||
id: F9
|
||||
class: event_inputs
|
||||
function: Cam Sensor (VR)
|
||||
type: vr
|
||||
|
@ -324,7 +324,7 @@ pins:
|
|||
|
||||
- pin: E7
|
||||
# H144_IN_D_AUX4
|
||||
id: GPIOA_7
|
||||
id: A7
|
||||
class: event_inputs
|
||||
ts_name: E7 - Flex
|
||||
function: Digital Input / Flex fuel sensor
|
||||
|
@ -337,7 +337,7 @@ pins:
|
|||
|
||||
- pin: F1
|
||||
# H144_OUT_PWM5
|
||||
id: GPIOC_9
|
||||
id: C9
|
||||
class: outputs
|
||||
function: Idle2 Output (low)
|
||||
type: ls
|
||||
|
@ -346,7 +346,7 @@ pins:
|
|||
|
||||
- pin: F2
|
||||
# H144_OUT_PWM7
|
||||
id: GPIOD_15
|
||||
id: D15
|
||||
function: VVT#1
|
||||
class: outputs
|
||||
type: ls
|
||||
|
@ -356,7 +356,7 @@ pins:
|
|||
# also used as knock input (is hard-coded at the moment)
|
||||
- pin: F3
|
||||
# H144_IN_SENS4
|
||||
id: GPIOF_6
|
||||
id: F6
|
||||
class: switch_inputs
|
||||
function: Digital Input 5 / Knock Input
|
||||
type: hall
|
||||
|
@ -365,7 +365,7 @@ pins:
|
|||
|
||||
- pin: F4
|
||||
# H144_OUT_PWM8
|
||||
id: GPIOD_12
|
||||
id: D12
|
||||
function: VVT#2
|
||||
class: outputs
|
||||
type: ls
|
||||
|
@ -374,7 +374,7 @@ pins:
|
|||
|
||||
- pin: F5
|
||||
# H144_OUT_IO10
|
||||
id: GPIOG_12
|
||||
id: G12
|
||||
class: outputs
|
||||
ts_name: F5 - MAIN
|
||||
function: Main relay control
|
||||
|
|
|
@ -23,31 +23,31 @@ static OutputPin alphaCrankNPullUp;
|
|||
static void setInjectorPins() {
|
||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
||||
engineConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[3] = Gpio::Unassigned;
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->clutchDownPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->clutchDownPin = Gpio::Unassigned;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
||||
engineConfiguration->ignitionPins[1] = H144_IGN_2;
|
||||
engineConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -67,7 +67,7 @@ static void setupEtb() {
|
|||
// Disable pin
|
||||
engineConfiguration->etbIo[0].disablePin = H144_OUT_IO1;
|
||||
// Unused
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
||||
|
||||
// we only have pwm/dir, no dira/dirb
|
||||
engineConfiguration->etb_use_two_wires = false;
|
||||
|
@ -89,9 +89,9 @@ static void setupVbatt() {
|
|||
static void setupDefaultSensorInputs() {
|
||||
// trigger inputs, hall
|
||||
engineConfiguration->triggerInputPins[0] = H144_IN_SENS4;
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->camInputs[0] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->vehicleSpeedSensorInputPin = H144_IN_VSS;
|
||||
|
||||
|
@ -143,8 +143,8 @@ void setBoardConfigOverrides() {
|
|||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
}
|
||||
|
||||
void setSerialConfigurationOverrides() {
|
||||
|
@ -167,10 +167,10 @@ void setBoardDefaultConfiguration() {
|
|||
setInjectorPins();
|
||||
setIgnitionPins();
|
||||
setupEtb();
|
||||
engineConfiguration->acSwitch = GPIO_UNASSIGNED;
|
||||
engineConfiguration->acSwitch = Gpio::Unassigned;
|
||||
engineConfiguration->fuelPumpPin = H144_OUT_PWM2;
|
||||
engineConfiguration->fanPin = H144_OUT_PWM4;
|
||||
engineConfiguration->mainRelayPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->mainRelayPin = Gpio::Unassigned;
|
||||
engineConfiguration->tachOutputPin = H144_OUT_PWM3;
|
||||
|
||||
// "required" hardware is done - set some reasonable defaults
|
||||
|
@ -186,7 +186,7 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->clutchDownPin = H144_IN_D_2;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
|
||||
// ? engineConfiguration->malfunctionIndicatorPin = GPIOG_4; //1E - Check Engine Light
|
||||
// ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
|
||||
setHellenDefaultVrThresholds();
|
||||
engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6;
|
||||
}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
pins:
|
||||
- pin: auxMain
|
||||
#H144_OUT_IO7
|
||||
id: GPIOG_3
|
||||
id: G3
|
||||
class: outputs
|
||||
ts_name: auxMain
|
||||
|
||||
- pin: auxWastegate
|
||||
#H176_OUT_PWM3
|
||||
id: GPIOC_7
|
||||
id: C7
|
||||
class: outputs
|
||||
ts_name: auxWastegate
|
||||
|
||||
- pin: 1
|
||||
# H144_OUT_PWM7
|
||||
id: GPIOD_15
|
||||
id: D15
|
||||
class: outputs
|
||||
function: Right Oil Cooling Fan
|
||||
ts_name: 1 Right Oil Cooling
|
||||
|
@ -28,7 +28,7 @@ pins:
|
|||
|
||||
- pin: 4
|
||||
# H144_OUT_PWM6
|
||||
id: GPIOD_14
|
||||
id: D14
|
||||
class: outputs
|
||||
function: Left Oil Cooling Fan
|
||||
ts_name: 4 Left Oil Fan
|
||||
|
@ -42,28 +42,28 @@ pins:
|
|||
|
||||
- pin: 6
|
||||
# H144_LS_1
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
class: outputs
|
||||
function: Front Injector
|
||||
ts_name: 6 Front Injector
|
||||
|
||||
- pin: 7
|
||||
# H144_LS_2
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
class: outputs
|
||||
function: Rear Injector
|
||||
ts_name: 7 Rear Injector
|
||||
|
||||
- pin: 8
|
||||
# H144_OUT_IO6
|
||||
id: GPIOG_11
|
||||
id: G11
|
||||
class: outputs
|
||||
function: Rear ACR
|
||||
ts_name: 8 Rear ACR
|
||||
|
||||
- pin: 11
|
||||
# H144_IN_SENS4
|
||||
id: GPIOF_6
|
||||
id: F6
|
||||
class: event_inputs
|
||||
function: Crank Sensor VR- Negative Input
|
||||
ts_name: 11 Crank VR-
|
||||
|
@ -80,7 +80,7 @@ pins:
|
|||
|
||||
- pin: 24
|
||||
# H144_IGN_1
|
||||
id: GPIOC_13
|
||||
id: C13
|
||||
class: outputs
|
||||
ts_name: 24 Front Coil
|
||||
function: Front Coil
|
||||
|
@ -88,7 +88,7 @@ pins:
|
|||
|
||||
- pin: 25
|
||||
# H144_OUT_IO5
|
||||
id: GPIOD_2
|
||||
id: D2
|
||||
class: outputs
|
||||
ts_name: 25 Front ACR
|
||||
function: Front ACR
|
||||
|
@ -152,7 +152,7 @@ pins:
|
|||
|
||||
- pin: 43
|
||||
# H144_IGN_2
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
ts_name: 43 Rear Coil
|
||||
function: Rear Coil
|
||||
|
@ -180,7 +180,7 @@ pins:
|
|||
|
||||
- pin: 51
|
||||
# H144_IN_VSS
|
||||
id: GPIOF_11
|
||||
id: F11
|
||||
class: event_inputs
|
||||
ts_name: 51 - VSS
|
||||
function: VSS in
|
||||
|
@ -207,7 +207,7 @@ pins:
|
|||
- pin: 61
|
||||
# low6 huh?
|
||||
# H144_OUT_IO3
|
||||
id: GPIOG_14
|
||||
id: G14
|
||||
class: outputs
|
||||
ts_name: 61 Reverse Gear
|
||||
function: Reverse Gear
|
||||
|
@ -215,7 +215,7 @@ pins:
|
|||
- pin: 63
|
||||
# low7 huh?
|
||||
# H144_OUT_IO4
|
||||
id: GPIOG_5
|
||||
id: G5
|
||||
class: outputs
|
||||
ts_name: 63 Cooling Pump
|
||||
function: Cooling Pump
|
||||
|
|
|
@ -6,6 +6,6 @@ endif
|
|||
|
||||
DDEFS += $(LED_CRITICAL_ERROR_BRAIN_PIN)
|
||||
|
||||
PRIMARY_COMMUNICATION_PORT_USART2=-DEFI_CONSOLE_TX_BRAIN_PIN=GPIOD_6 -DEFI_CONSOLE_RX_BRAIN_PIN=GPIOD_5 -DTS_PRIMARY_PORT=UARTD2 -DSTM32_UART_USE_USART2=1
|
||||
PRIMARY_COMMUNICATION_PORT_USART2=-DEFI_CONSOLE_TX_BRAIN_PIN=Gpio::D6 -DEFI_CONSOLE_RX_BRAIN_PIN=Gpio::D5 -DTS_PRIMARY_PORT=UARTD2 -DSTM32_UART_USE_USART2=1
|
||||
|
||||
include $(BOARDS_DIR)/hellen/hellen-common.mk
|
|
@ -22,12 +22,12 @@ static void setInjectorPins() {
|
|||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->clutchDownPin = GPIOC_4; // Clutch switch input
|
||||
engineConfiguration->clutchDownPin = Gpio::C4; // Clutch switch input
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
|
||||
engineConfiguration->malfunctionIndicatorPin = H144_OUT_IO8;
|
||||
|
@ -35,13 +35,13 @@ static void setInjectorPins() {
|
|||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[2] = H144_IGN_2;
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -64,8 +64,8 @@ static void setupVbatt() {
|
|||
static void setupDefaultSensorInputs() {
|
||||
// trigger inputs, hall
|
||||
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->camInputs[0] = H144_IN_CAM;
|
||||
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_4;
|
||||
|
@ -92,8 +92,8 @@ void setBoardConfigOverrides() {
|
|||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
|
||||
if (engineConfiguration->trigger.type == TT_MAZDA_MIATA_NB1) {
|
||||
engineConfiguration->trigger.type = TT_MIATA_VVT;
|
||||
|
@ -123,10 +123,10 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->boostControlPin = H144_LS_6;
|
||||
engineConfiguration->acSwitch = H144_IN_D_AUX3;
|
||||
engineConfiguration->acRelayPin = H144_OUT_IO6;
|
||||
engineConfiguration->fuelPumpPin = GPIOG_2; // OUT_IO9
|
||||
engineConfiguration->idle.solenoidPin = GPIOD_14; // OUT_PWM5
|
||||
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = GPIOI_2; // OUT_LOW3
|
||||
engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
|
||||
engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
|
||||
engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = Gpio::I2; // OUT_LOW3
|
||||
engineConfiguration->tachOutputPin = H144_OUT_PWM1;
|
||||
engineConfiguration->alternatorControlPin = H144_OUT_PWM7;
|
||||
engineConfiguration->fan2Pin = H144_OUT_IO2;
|
||||
|
@ -144,7 +144,7 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->clutchDownPin = H144_IN_D_2;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
|
||||
// ? engineConfiguration->malfunctionIndicatorPin = GPIOG_4; //1E - Check Engine Light
|
||||
// ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,26 +20,26 @@ pins:
|
|||
type: can
|
||||
|
||||
- pin: 1F
|
||||
id: [GPIOF_9, ADC3_CHANNEL_7]
|
||||
id: [F9, ADC3_CHANNEL_7]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 1F - Brake/RES1
|
||||
function: Brake Switch
|
||||
|
||||
- pin: 1E
|
||||
id: GPIOG_4
|
||||
id: G4
|
||||
class: outputs
|
||||
ts_name: 1E - Check Engine Light
|
||||
function: Check Engine Light
|
||||
type: ls
|
||||
|
||||
- pin: 1G
|
||||
id: [GPIOF_10, EFI_ADC_3]
|
||||
id: [F10, EFI_ADC_3]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 1G - Steering/RES2
|
||||
function: Power Steering Switch
|
||||
|
||||
- pin: 1I
|
||||
id: GPIOA_9
|
||||
id: A9
|
||||
class: outputs
|
||||
ts_name: 1I AC Fan Relay
|
||||
function: AC Fan Relay
|
||||
|
@ -49,27 +49,27 @@ pins:
|
|||
type: ls
|
||||
|
||||
- pin: 1O
|
||||
id: GPIOD_15
|
||||
id: D15
|
||||
class: outputs
|
||||
ts_name: 1O - ALTERN
|
||||
function: PWM signal to control alternator field voltage
|
||||
type: ls
|
||||
|
||||
- pin: 1P
|
||||
id: [GPIOC_5, EFI_ADC_15]
|
||||
id: [C5, EFI_ADC_15]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 1P - AC Switch
|
||||
function: A/C Pressure In
|
||||
|
||||
- pin: 1Q
|
||||
id: GPIOG_12
|
||||
id: G12
|
||||
class: outputs
|
||||
ts_name: 1Q - Aternator Warning Lamp
|
||||
function: Alternator Warning Light
|
||||
type: ls
|
||||
|
||||
- pin: 1R
|
||||
id: GPIOD_12
|
||||
id: D12
|
||||
class: outputs
|
||||
ts_name: 1R - ECF
|
||||
function: Engine Radiator Fan
|
||||
|
@ -77,26 +77,26 @@ pins:
|
|||
|
||||
- pin: 1S
|
||||
#H144_OUT_IO6
|
||||
id: GPIOG_11
|
||||
id: G11
|
||||
class: outputs
|
||||
ts_name: 1S - AC Relay
|
||||
function: A/C Relay
|
||||
type: ls
|
||||
|
||||
- pin: 1U
|
||||
id: GPIOD_3
|
||||
id: D3
|
||||
class: outputs
|
||||
ts_name: 1U - O2H
|
||||
function: Front O2 sens. heater
|
||||
|
||||
- pin: 1V
|
||||
id: GPIOE_14
|
||||
id: E14
|
||||
class: switch_inputs
|
||||
ts_name: 1V - Neutral
|
||||
function: Neutral Switch
|
||||
|
||||
- pin: 2A
|
||||
id: [GPIOB_0, EFI_ADC_8]
|
||||
id: [B0, EFI_ADC_8]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 2A - Pressure Input
|
||||
function: FTP input
|
||||
|
@ -115,7 +115,7 @@ pins:
|
|||
|
||||
- pin: 2D
|
||||
# H144_IN_VSS
|
||||
id: GPIOF_11
|
||||
id: F11
|
||||
class: event_inputs
|
||||
ts_name: 2D - VSS
|
||||
function: VSS in
|
||||
|
@ -127,13 +127,13 @@ pins:
|
|||
function: CLT sensor
|
||||
|
||||
- pin: 2F
|
||||
id: GPIOF_7
|
||||
id: F7
|
||||
class: analog_inputs
|
||||
ts_name: 2M - KNOCK
|
||||
function: Knock sens. in
|
||||
|
||||
- pin: 2H
|
||||
id: [GPIOA_6, EFI_ADC_6]
|
||||
id: [A6, EFI_ADC_6]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 2H - CAM
|
||||
function: Camshaft Sensor
|
||||
|
@ -142,14 +142,14 @@ pins:
|
|||
function: +5v
|
||||
|
||||
- pin: 2J
|
||||
id: [GPIOB_1, EFI_ADC_9]
|
||||
id: [B1, EFI_ADC_9]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 2J - CRANK
|
||||
function: Crankshaft Sensor
|
||||
|
||||
- pin: 2K
|
||||
# H144_OUT_PWM1
|
||||
id: GPIOD_13
|
||||
id: D13
|
||||
class: outputs
|
||||
ts_name: 2K - TACH
|
||||
function: Tach Out
|
||||
|
@ -171,7 +171,7 @@ pins:
|
|||
function: GND
|
||||
|
||||
- pin: 3D
|
||||
id: [GPIOC_1, EFI_ADC_11]
|
||||
id: [C1, EFI_ADC_11]
|
||||
class: [outputs, analog_inputs]
|
||||
ts_name: 3D - MAP
|
||||
function: MAP INPUT
|
||||
|
@ -191,40 +191,40 @@ pins:
|
|||
function: GND
|
||||
|
||||
- pin: 3G
|
||||
id: GPIOC_13
|
||||
id: C13
|
||||
class: outputs
|
||||
ts_name: 3G - IGN_1 (1&4)
|
||||
function: Coil #1
|
||||
type: ign
|
||||
|
||||
- pin: 3H
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
ts_name: 3H - IGN_2 (2&3)
|
||||
function: Coil #2
|
||||
type: ign
|
||||
|
||||
- pin: 3I
|
||||
id: GPIOE_13
|
||||
id: E13
|
||||
class: switch_inputs
|
||||
ts_name: 3I - Clutch
|
||||
function: Clutch Switch
|
||||
|
||||
- pin: 3J
|
||||
id: GPIOF_3
|
||||
id: F3
|
||||
class: switch_inputs
|
||||
ts_name: 3J - O2S2
|
||||
function: Rear O2 Sensor Signal
|
||||
|
||||
- pin: 3M
|
||||
id: GPIOD_14
|
||||
id: D14
|
||||
class: outputs
|
||||
ts_name: 2Q - IDLE
|
||||
function: IAC (negative), with diode
|
||||
type: ls
|
||||
|
||||
- pin: 3N
|
||||
id: GPIOG_2
|
||||
id: G2
|
||||
class: outputs
|
||||
ts_name: 2M US / 2P EUROPE - FPUMP
|
||||
function: Fuel Pump Relay
|
||||
|
@ -234,55 +234,55 @@ pins:
|
|||
funtion: +12v
|
||||
|
||||
- pin: 3Q
|
||||
id: GPIOF_14
|
||||
id: F14
|
||||
class: outputs
|
||||
ts_name: 3Q - VICS
|
||||
function: VICS
|
||||
type: inj
|
||||
|
||||
- pin: 3S
|
||||
id: [GPIOA_7, EFI_ADC_7]
|
||||
id: [A7, EFI_ADC_7]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 3S - EGR BOOST IN
|
||||
function: EGR BOOST
|
||||
|
||||
- pin: 3T
|
||||
id: GPIOF_12
|
||||
id: F12
|
||||
class: outputs
|
||||
ts_name: 3T/4D - BOOST OUT
|
||||
function: BOOST OUT
|
||||
type: inj
|
||||
|
||||
- pin: 3V
|
||||
id: GPIOG_13
|
||||
id: G13
|
||||
class: outputs
|
||||
ts_name: 3V - O2H2
|
||||
function: Rear O2 sensor heater
|
||||
type: ls
|
||||
|
||||
- pin: 3W
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
class: outputs
|
||||
ts_name: 3W - INJ_1
|
||||
function: Injector #1
|
||||
type: inj
|
||||
|
||||
- pin: 3X
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
class: outputs
|
||||
ts_name: 3X - INJ_2
|
||||
function: Injector #2
|
||||
type: inj
|
||||
|
||||
- pin: 3Y
|
||||
id: GPIOD_11
|
||||
id: D11
|
||||
class: outputs
|
||||
ts_name: 3Y - INJ_3
|
||||
function: Injector #3
|
||||
type: inj
|
||||
|
||||
- pin: 3Z
|
||||
id: GPIOD_10
|
||||
id: D10
|
||||
class: outputs
|
||||
ts_name: 3Z - INJ_4
|
||||
function: Injector #4
|
||||
|
@ -292,13 +292,13 @@ pins:
|
|||
function: GND
|
||||
|
||||
- pin: 4B
|
||||
id: GPIOE_12
|
||||
id: E12
|
||||
class: event_inputs
|
||||
ts_name: 4B - DIGITAL/FLEX
|
||||
function: DIGITAL
|
||||
|
||||
- pin: 4C
|
||||
id: [GPIOC_4, EFI_ADC_14]
|
||||
id: [C4, EFI_ADC_14]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 4C - IN TEMP/PPS2
|
||||
function: TEMP OR PPS2
|
||||
|
@ -308,7 +308,7 @@ pins:
|
|||
|
||||
|
||||
- pin: 4E
|
||||
id: GPIOD_9
|
||||
id: D9
|
||||
class: outputs
|
||||
ts_name: 4E - VVT
|
||||
function: VVT Oil Control Valve neg.
|
||||
|
@ -336,27 +336,27 @@ pins:
|
|||
function: WBO
|
||||
|
||||
- pin: int_pps1
|
||||
id: [GPIOA_3]
|
||||
id: [A3]
|
||||
class: [switch_inputs]
|
||||
ts_name: PPS1
|
||||
|
||||
- pin: int_tps2
|
||||
id: [GPIOA_1, EFI_ADC_1]
|
||||
id: [A1, EFI_ADC_1]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: TPS1
|
||||
|
||||
- pin: int_etb+
|
||||
id: GPIOC_7
|
||||
id: C7
|
||||
class: outputs
|
||||
ts_name: ETB +
|
||||
|
||||
- pin: int_etb-
|
||||
id: GPIOC_8
|
||||
id: C8
|
||||
class: outputs
|
||||
ts_name: ETB -
|
||||
|
||||
- pin: int_etb_EN
|
||||
id: GPIOC_6
|
||||
id: C6
|
||||
class: outputs
|
||||
ts_name: ETB EN
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ static void setInjectorPins() {
|
|||
|
||||
// Disable remainder
|
||||
for (int i = 6; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
|
@ -41,7 +41,7 @@ static void setIgnitionPins() {
|
|||
|
||||
// disable remainder
|
||||
for (int i = 6; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -64,8 +64,8 @@ static void setupVbatt() {
|
|||
static void setupDefaultSensorInputs() {
|
||||
// trigger inputs
|
||||
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
// Direct hall-only cam input
|
||||
engineConfiguration->camInputs[0] = H144_IN_CAM;
|
||||
// todo: remove from default since 4 cylinder does not use it
|
||||
|
@ -125,20 +125,20 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->enableSoftwareKnock = true;
|
||||
engineConfiguration->canNbcType = CAN_BUS_NISSAN_VQ;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIOD_12; // OUT_IO9 // 113 Fuel Pump Relay
|
||||
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
||||
// engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = GPIOG_14; // pin: 111a, OUT_IO3
|
||||
engineConfiguration->fuelPumpPin = Gpio::D12; // OUT_IO9 // 113 Fuel Pump Relay
|
||||
engineConfiguration->idle.solenoidPin = Gpio::Unassigned;
|
||||
// engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = Gpio::G14; // pin: 111a, OUT_IO3
|
||||
|
||||
// "required" hardware is done - set some reasonable defaults
|
||||
setupDefaultSensorInputs();
|
||||
|
||||
engineConfiguration->etbIo[0].directionPin1 = GPIOD_15; // out_pwm7
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIOD_14; // out_pwm6
|
||||
engineConfiguration->etbIo[0].controlPin = GPIOD_13; // ETB_EN out_pwm1
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::D15; // out_pwm7
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::D14; // out_pwm6
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::D13; // ETB_EN out_pwm1
|
||||
engineConfiguration->etb_use_two_wires = true;
|
||||
|
||||
// Some sensible defaults for other options
|
||||
|
@ -160,7 +160,7 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
engineConfiguration->injectionMode = IM_SIMULTANEOUS;//IM_BATCH;// IM_SEQUENTIAL;
|
||||
|
||||
engineConfiguration->luaOutputPins[0] = GPIOG_5; // 104 ETB Relay
|
||||
engineConfiguration->luaOutputPins[0] = Gpio::G5; // 104 ETB Relay
|
||||
|
||||
engineConfiguration->throttlePedalUpVoltage = 0.75;
|
||||
engineConfiguration->throttlePedalWOTVoltage = 4.45;
|
||||
|
@ -183,14 +183,14 @@ void setBoardDefaultConfiguration() {
|
|||
void setSdCardConfigurationOverrides() {
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
|
||||
engineConfiguration->spi3mosiPin = GPIOC_12;
|
||||
engineConfiguration->spi3misoPin = GPIOC_11;
|
||||
engineConfiguration->spi3sckPin = GPIOC_10;
|
||||
engineConfiguration->sdCardCsPin = GPIOA_15;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->sdCardCsPin = Gpio::A15;
|
||||
|
||||
// engineConfiguration->spi2mosiPin = GPIOB_15;
|
||||
// engineConfiguration->spi2misoPin = GPIOB_14;
|
||||
// engineConfiguration->spi2sckPin = GPIOB_13;
|
||||
// engineConfiguration->sdCardCsPin = GPIOB_12;
|
||||
// engineConfiguration->spi2mosiPin = Gpio::B15;
|
||||
// engineConfiguration->spi2misoPin = Gpio::B14;
|
||||
// engineConfiguration->spi2sckPin = Gpio::B13;
|
||||
// engineConfiguration->sdCardCsPin = Gpio::B12;
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
}
|
||||
|
|
|
@ -20,14 +20,14 @@ pins:
|
|||
function: USB -
|
||||
|
||||
- pin: 10a
|
||||
id: GPIOF_13
|
||||
id: F13
|
||||
ts_name: 10 - VTC Left
|
||||
class: outputs
|
||||
function: Intake VTC solenoid Bank 2
|
||||
# OUT_C-IVC_L OUT_INJ7
|
||||
|
||||
- pin: 11a
|
||||
id: GPIOF_14
|
||||
id: F14
|
||||
ts_name: 11 - VTC Right
|
||||
class: outputs
|
||||
function: Intake VTC solenoid Bank 1
|
||||
|
@ -36,20 +36,20 @@ pins:
|
|||
- pin: 13a
|
||||
function: Crank Sensor
|
||||
# IN_CRANK AIN24 A24
|
||||
id: [GPIOB_1]
|
||||
id: [B1]
|
||||
class: [event_inputs]
|
||||
ts_name: 13 - Crank
|
||||
|
||||
- pin: 14a
|
||||
function: Cam Sensor Left
|
||||
# IN_CAM_L IN_CAM AIN19 A19
|
||||
id: [GPIOA_6]
|
||||
id: [A6]
|
||||
class: [event_inputs]
|
||||
ts_name: 14 - Cam Left
|
||||
|
||||
- pin: 21a
|
||||
# Q307
|
||||
id: GPIOD_9
|
||||
id: D9
|
||||
class: outputs
|
||||
ts_name: 21 - INJ_5
|
||||
function: Injector 5
|
||||
|
@ -57,7 +57,7 @@ pins:
|
|||
|
||||
- pin: 22a
|
||||
# Q309
|
||||
id: GPIOD_11
|
||||
id: D11
|
||||
class: outputs
|
||||
ts_name: 22 - INJ_3
|
||||
function: Injector 3
|
||||
|
@ -65,14 +65,14 @@ pins:
|
|||
|
||||
- pin: 23a
|
||||
# Q312
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
class: outputs
|
||||
ts_name: 23 - INJ_1
|
||||
function: Injector 1
|
||||
type: inj
|
||||
|
||||
- pin: 29a
|
||||
id: GPIOD_3
|
||||
id: D3
|
||||
ts_name: 29 - VIAS
|
||||
class: outputs
|
||||
function: VIAS control Solenoid
|
||||
|
@ -80,7 +80,7 @@ pins:
|
|||
- pin: 33a
|
||||
function: Cam Sensor Right
|
||||
# IN_CAM_R IN_AUX4 AIN20 A20
|
||||
id: [GPIOA_7]
|
||||
id: [A7]
|
||||
class: [event_inputs]
|
||||
ts_name: 33 - Cam Right
|
||||
|
||||
|
@ -92,7 +92,7 @@ pins:
|
|||
|
||||
- pin: 40a
|
||||
# Q311
|
||||
id: GPIOF_12
|
||||
id: F12
|
||||
class: outputs
|
||||
ts_name: 40 - INJ_6
|
||||
function: Injector 6
|
||||
|
@ -100,7 +100,7 @@ pins:
|
|||
|
||||
- pin: 41a
|
||||
# Q310
|
||||
id: GPIOD_10
|
||||
id: D10
|
||||
class: outputs
|
||||
ts_name: 41 - INJ_4
|
||||
function: Injector 4
|
||||
|
@ -108,7 +108,7 @@ pins:
|
|||
|
||||
- pin: 42a
|
||||
# Q305
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
class: outputs
|
||||
ts_name: 42 - INJ_2
|
||||
function: Injector 2
|
||||
|
@ -129,21 +129,21 @@ pins:
|
|||
function: TPS 1 sensor input
|
||||
|
||||
- pin: 60a
|
||||
id: GPIOE_2
|
||||
id: E2
|
||||
class: outputs
|
||||
ts_name: 60 - Coil 5
|
||||
function: Coil 5
|
||||
type: ign
|
||||
|
||||
- pin: 61a
|
||||
id: GPIOE_4
|
||||
id: E4
|
||||
class: outputs
|
||||
ts_name: 61 - Coil 3
|
||||
function: Coil 3
|
||||
type: ign
|
||||
|
||||
- pin: 62a
|
||||
id: GPIOC_13
|
||||
id: C13
|
||||
class: outputs
|
||||
ts_name: 62 - Coil 1
|
||||
function: Coil 1
|
||||
|
@ -191,21 +191,21 @@ pins:
|
|||
function: GNDA
|
||||
|
||||
- pin: 79a
|
||||
id: GPIOB_8
|
||||
id: B8
|
||||
class: outputs
|
||||
ts_name: 79 - Coil 6
|
||||
function: Coil 6
|
||||
type: ign
|
||||
|
||||
- pin: 80a
|
||||
id: GPIOE_3
|
||||
id: E3
|
||||
class: outputs
|
||||
ts_name: 80 - Coil 4
|
||||
function: Coil 4
|
||||
type: ign
|
||||
|
||||
- pin: 81a
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
ts_name: 81 - Coil 2
|
||||
function: Coil 2
|
||||
|
@ -242,20 +242,20 @@ pins:
|
|||
function: PPS 2 sensor input
|
||||
|
||||
- pin: 101a
|
||||
id: GPIOF_9
|
||||
id: F9
|
||||
class: switch_inputs
|
||||
ts_name: 101 - Brake Input
|
||||
function: Brake Switch
|
||||
|
||||
- pin: 102a
|
||||
id: GPIOF_10
|
||||
id: F10
|
||||
class: switch_inputs
|
||||
ts_name: 102 - Power Steering Input
|
||||
function: Power Steering Switch
|
||||
|
||||
- pin: 104a
|
||||
# LOW6_DIODE _IO4
|
||||
id: GPIOG_5
|
||||
id: G5
|
||||
class: outputs
|
||||
ts_name: 104 ETB Relay
|
||||
function: ETB relay control
|
||||
|
@ -278,7 +278,7 @@ pins:
|
|||
|
||||
- pin: 111a
|
||||
# OUT_IO3
|
||||
id: GPIOG_14
|
||||
id: G14
|
||||
class: outputs
|
||||
ts_name: 111 Main Relay
|
||||
function: Main relay control
|
||||
|
@ -286,7 +286,7 @@ pins:
|
|||
|
||||
- pin: 113a
|
||||
# OUT_PWM8
|
||||
id: GPIOD_12
|
||||
id: D12
|
||||
class: outputs
|
||||
ts_name: 113 Fuel Pump Relay
|
||||
function: Fuel Pump control
|
||||
|
|
|
@ -16,33 +16,33 @@
|
|||
#include "hellen_meta.h"
|
||||
|
||||
static void setInjectorPins() {
|
||||
engineConfiguration->injectionPins[0] = GPIOG_7; // 96 - INJ_1
|
||||
engineConfiguration->injectionPins[1] = GPIOG_8;
|
||||
engineConfiguration->injectionPins[2] = GPIOD_11; // 97 - INJ_3
|
||||
engineConfiguration->injectionPins[3] = GPIOD_10;
|
||||
engineConfiguration->injectionPins[0] = Gpio::G7; // 96 - INJ_1
|
||||
engineConfiguration->injectionPins[1] = Gpio::G8;
|
||||
engineConfiguration->injectionPins[2] = Gpio::D11; // 97 - INJ_3
|
||||
engineConfiguration->injectionPins[3] = Gpio::D10;
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
}
|
||||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = GPIOI_8; // 102 - IGN_1
|
||||
engineConfiguration->ignitionPins[1] = GPIOE_5 ; // 7 - IGN_2
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_4; // 111 - IGN_3
|
||||
engineConfiguration->ignitionPins[3] = GPIOE_3; // 94 - IGN_4
|
||||
engineConfiguration->ignitionPins[0] = Gpio::I8; // 102 - IGN_1
|
||||
engineConfiguration->ignitionPins[1] = Gpio::E5 ; // 7 - IGN_2
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E4; // 111 - IGN_3
|
||||
engineConfiguration->ignitionPins[3] = Gpio::E3; // 94 - IGN_4
|
||||
|
||||
//engineConfiguration->ignitionPins[4] = GPIOE_2;
|
||||
//engineConfiguration->ignitionPins[5] = GPIOI_5;
|
||||
//engineConfiguration->ignitionPins[6] = GPIOI_6;
|
||||
//engineConfiguration->ignitionPins[7] = GPIOI_7;
|
||||
//engineConfiguration->ignitionPins[4] = Gpio::E2;
|
||||
//engineConfiguration->ignitionPins[5] = Gpio::I5;
|
||||
//engineConfiguration->ignitionPins[6] = Gpio::I6;
|
||||
//engineConfiguration->ignitionPins[7] = Gpio::I7;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -64,11 +64,11 @@ static void setupVbatt() {
|
|||
|
||||
static void setupDefaultSensorInputs() {
|
||||
// trigger inputs
|
||||
engineConfiguration->triggerInputPins[0] = GPIOB_1; // 82 - VR
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::B1; // 82 - VR
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
// Direct hall-only cam input
|
||||
engineConfiguration->camInputs[0] = GPIOA_6; // 86 - CAM1
|
||||
engineConfiguration->camInputs[0] = Gpio::A6; // 86 - CAM1
|
||||
|
||||
engineConfiguration->tps1_1AdcChannel = H144_IN_TPS; // 92 - TPS 1
|
||||
engineConfiguration->tps1_2AdcChannel = H144_IN_AUX1;
|
||||
|
@ -104,8 +104,8 @@ void setBoardConfigOverrides() {
|
|||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
}
|
||||
|
||||
void setSerialConfigurationOverrides() {
|
||||
|
@ -128,9 +128,9 @@ void setBoardDefaultConfiguration() {
|
|||
setInjectorPins();
|
||||
setIgnitionPins();
|
||||
|
||||
engineConfiguration->etbIo[0].directionPin1 = GPIOC_6; // out_pwm2
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIOC_7; // out_pwm3
|
||||
engineConfiguration->etbIo[0].controlPin = GPIOA_8; // ETB_EN out_io12
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::C6; // out_pwm2
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::C7; // out_pwm3
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::A8; // ETB_EN out_io12
|
||||
engineConfiguration->etb_use_two_wires = true;
|
||||
|
||||
setBoschVAGETB();
|
||||
|
@ -148,10 +148,10 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->enableSoftwareKnock = true;
|
||||
|
||||
engineConfiguration->fuelPumpPin = H144_OUT_IO3;
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIOG_4; // 47 - CEL
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::G4; // 47 - CEL
|
||||
engineConfiguration->tachOutputPin = H144_OUT_PWM7;
|
||||
engineConfiguration->idle.solenoidPin = GPIOD_14; // OUT_PWM5
|
||||
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8
|
||||
engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
|
||||
engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = H144_OUT_IO1;
|
||||
|
||||
// engineConfiguration->injectorCompensationMode
|
||||
|
@ -182,14 +182,14 @@ void setBoardDefaultConfiguration() {
|
|||
void setSdCardConfigurationOverrides() {
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
|
||||
engineConfiguration->spi3mosiPin = GPIOC_12;
|
||||
engineConfiguration->spi3misoPin = GPIOC_11;
|
||||
engineConfiguration->spi3sckPin = GPIOC_10;
|
||||
engineConfiguration->sdCardCsPin = GPIOA_15;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->sdCardCsPin = Gpio::A15;
|
||||
|
||||
// engineConfiguration->spi2mosiPin = GPIOB_15;
|
||||
// engineConfiguration->spi2misoPin = GPIOB_14;
|
||||
// engineConfiguration->spi2sckPin = GPIOB_13;
|
||||
// engineConfiguration->sdCardCsPin = GPIOB_12;
|
||||
// engineConfiguration->spi2mosiPin = Gpio::B15;
|
||||
// engineConfiguration->spi2misoPin = Gpio::B14;
|
||||
// engineConfiguration->spi2sckPin = Gpio::B13;
|
||||
// engineConfiguration->sdCardCsPin = Gpio::B12;
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
pins:
|
||||
- pin: MR
|
||||
id: GPIOI_2
|
||||
id: I2
|
||||
class: outputs
|
||||
ts_name: Main Relay
|
||||
function: OUT_MAIN
|
||||
|
@ -22,13 +22,13 @@ pins:
|
|||
function: LSU Heat -
|
||||
|
||||
- pin: 7a
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
ts_name: 7 - IGN_2
|
||||
type: ign
|
||||
|
||||
- pin: 8a
|
||||
id: GPIOI_6
|
||||
id: I6
|
||||
class: outputs
|
||||
ts_name: 8 - IGN_7
|
||||
type: ign
|
||||
|
@ -40,13 +40,13 @@ pins:
|
|||
function: O2 sensor signal
|
||||
|
||||
- pin: 18a
|
||||
id: GPIOC_9
|
||||
id: C9
|
||||
class: outputs
|
||||
ts_name: 18 - VVT2 B1
|
||||
function: OUT_VVT2_B1
|
||||
|
||||
- pin: 19a
|
||||
id: GPIOF_13
|
||||
id: F13
|
||||
class: outputs
|
||||
ts_name: 19 - INJ 7
|
||||
function: OUT_INJ7
|
||||
|
@ -56,7 +56,7 @@ pins:
|
|||
function: Main relay A
|
||||
|
||||
- pin: 22a
|
||||
id: GPIOI_0
|
||||
id: I0
|
||||
class: outputs
|
||||
ts_name: 22 - VVT1 1
|
||||
function: OUT_VVT1_1
|
||||
|
@ -65,7 +65,7 @@ pins:
|
|||
function: Main relay B
|
||||
|
||||
- pin: 24a
|
||||
id: GPIOF_14
|
||||
id: F14
|
||||
class: outputs
|
||||
ts_name: 24 - INJ 8
|
||||
function: OUT_INJ8
|
||||
|
@ -109,26 +109,26 @@ pins:
|
|||
function: GNDA
|
||||
|
||||
- pin: 37
|
||||
id: GPIOD_13
|
||||
id: D13
|
||||
class: outputs
|
||||
ts_name: 37 - TACH
|
||||
function: Tach Out
|
||||
type: ls
|
||||
|
||||
- pin: 38
|
||||
id: [GPIOF_9, ADC3_CHANNEL_7]
|
||||
id: [F9, ADC3_CHANNEL_7]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 48 - IN RES1
|
||||
function: IN_RES1
|
||||
|
||||
- pin: 39
|
||||
id: [GPIOF_10]
|
||||
id: [F10]
|
||||
class: [switch_inputs]
|
||||
ts_name: 39 - IN RES2
|
||||
function: IN_RES2
|
||||
|
||||
- pin: 47a
|
||||
id: GPIOG_4
|
||||
id: G4
|
||||
class: outputs
|
||||
ts_name: 47 - CEL
|
||||
function: MIL Control
|
||||
|
@ -148,19 +148,19 @@ pins:
|
|||
|
||||
- pin: 54a
|
||||
# H144_IN_VSS
|
||||
id: GPIOF_11
|
||||
id: F11
|
||||
class: event_inputs
|
||||
ts_name: 54 - VSS
|
||||
function: VSS in
|
||||
|
||||
- pin: 55a
|
||||
id: GPIOE_12
|
||||
id: E12
|
||||
ts_name: In D1
|
||||
class: switch_inputs
|
||||
function: IN_D1
|
||||
|
||||
- pin: 57a
|
||||
id: GPIOE_13
|
||||
id: E13
|
||||
ts_name: In D2
|
||||
class: switch_inputs
|
||||
function: IN_D2
|
||||
|
@ -174,7 +174,7 @@ pins:
|
|||
type: can
|
||||
|
||||
- pin: 65a
|
||||
id: GPIOH_14
|
||||
id: H14
|
||||
class: outputs
|
||||
ts_name: 65 - Fuel Pump
|
||||
function: Fuel Pump Relay
|
||||
|
@ -187,25 +187,25 @@ pins:
|
|||
function: LSU_CALIBR_RES
|
||||
|
||||
- pin: 75a
|
||||
id: GPIOE_14
|
||||
id: E14
|
||||
ts_name: In D3
|
||||
class: switch_inputs
|
||||
function: IN_D3
|
||||
|
||||
- pin: 76a
|
||||
id: GPIOE_15
|
||||
id: E15
|
||||
ts_name: In D4
|
||||
class: switch_inputs
|
||||
function: IN_D4
|
||||
|
||||
- pin: 81a
|
||||
id: GPIOD_15
|
||||
id: D15
|
||||
class: outputs
|
||||
function: OUT_FUEL_CONSUMPTION
|
||||
|
||||
- pin: 82a
|
||||
function: Crank Sensor
|
||||
id: [GPIOB_1]
|
||||
id: [B1]
|
||||
class: [event_inputs]
|
||||
ts_name: 82 - VR
|
||||
|
||||
|
@ -226,26 +226,26 @@ pins:
|
|||
function: IAT sensor
|
||||
|
||||
- pin: 86a
|
||||
id: [GPIOA_6, EFI_ADC_6]
|
||||
id: [A6, EFI_ADC_6]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 86 - CAM1
|
||||
function: Camshaft Sensor 1
|
||||
|
||||
- pin: 87a
|
||||
id: [GPIOA_7, EFI_ADC_7]
|
||||
id: [A7, EFI_ADC_7]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 87 - CAM2
|
||||
function: Camshaft Sensor 2
|
||||
|
||||
- pin: 88a
|
||||
id: GPIOD_10
|
||||
id: D10
|
||||
class: outputs
|
||||
ts_name: 88 - INJ_4
|
||||
function: Injector #4
|
||||
type: inj
|
||||
|
||||
- pin: 89a
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
class: outputs
|
||||
ts_name: 89 - INJ_2
|
||||
function: Injector #2
|
||||
|
@ -270,26 +270,26 @@ pins:
|
|||
function: CLT sensor
|
||||
|
||||
- pin: 94a
|
||||
id: GPIOE_3
|
||||
id: E3
|
||||
class: outputs
|
||||
ts_name: 94 - IGN_4
|
||||
type: ign
|
||||
|
||||
- pin: 95a
|
||||
id: GPIOI_7
|
||||
id: I7
|
||||
class: outputs
|
||||
ts_name: 95 - IGN_8
|
||||
type: ign
|
||||
|
||||
- pin: 96a
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
class: outputs
|
||||
ts_name: 96 - INJ_1
|
||||
function: Injector #1
|
||||
type: inj
|
||||
|
||||
- pin: 97a
|
||||
id: GPIOD_11
|
||||
id: D11
|
||||
class: outputs
|
||||
ts_name: 97 - INJ_3
|
||||
function: Injector #3
|
||||
|
@ -302,32 +302,32 @@ pins:
|
|||
function: GNDA
|
||||
|
||||
- pin: 101a
|
||||
id: [GPIOC_1, EFI_ADC_11]
|
||||
id: [C1, EFI_ADC_11]
|
||||
class: [outputs, analog_inputs]
|
||||
ts_name: 101 - MAP2
|
||||
function: Map2
|
||||
|
||||
- pin: 102a
|
||||
id: GPIOI_8
|
||||
id: I8
|
||||
class: outputs
|
||||
ts_name: 102 - IGN_1
|
||||
function: Coil #1
|
||||
type: ign
|
||||
|
||||
- pin: 103a
|
||||
id: GPIOE_2
|
||||
id: E2
|
||||
class: outputs
|
||||
ts_name: 103 - IGN_5
|
||||
type: ign
|
||||
|
||||
- pin: 104a
|
||||
id: GPIOA_9
|
||||
id: A9
|
||||
class: outputs
|
||||
ts_name: 104 Wastegate
|
||||
function: OUT_WASTEGATE
|
||||
|
||||
- pin: 105a
|
||||
id: GPIOD_14
|
||||
id: D14
|
||||
class: outputs
|
||||
ts_name: 105 - IDLE
|
||||
function: IAC
|
||||
|
@ -346,51 +346,51 @@ pins:
|
|||
function: GNDA
|
||||
|
||||
- pin: 110a
|
||||
id: GPIOI_5
|
||||
id: I5
|
||||
class: outputs
|
||||
ts_name: 110 - IGN_6
|
||||
type: ign
|
||||
|
||||
- pin: 111a
|
||||
id: GPIOE_4
|
||||
id: E4
|
||||
class: outputs
|
||||
ts_name: 111 - IGN_3
|
||||
type: ign
|
||||
|
||||
- pin: 112a
|
||||
id: GPIOF_12
|
||||
id: F12
|
||||
class: outputs
|
||||
ts_name: 112 INJ 6
|
||||
function: INJ_6
|
||||
type: inj
|
||||
|
||||
- pin: 113a
|
||||
id: GPIOD_9
|
||||
id: D9
|
||||
class: outputs
|
||||
ts_name: 113 INJ 5
|
||||
function: INJ_5
|
||||
type: inj
|
||||
|
||||
- pin: 115a
|
||||
id: GPIOG_3
|
||||
id: G3
|
||||
class: outputs
|
||||
ts_name: 115 - VVT1_2
|
||||
function: OUT_VVT1_2
|
||||
|
||||
- pin: 117a
|
||||
id: GPIOC_6
|
||||
id: C6
|
||||
class: outputs
|
||||
ts_name: 117 ETB_OUT+
|
||||
function: +ETB_OUT
|
||||
|
||||
- pin: 118a
|
||||
id: GPIOC_7
|
||||
id: C7
|
||||
class: outputs
|
||||
ts_name: 118 ETB_OUT-
|
||||
function: -ETB_OUT
|
||||
|
||||
- pin: 120a
|
||||
id: GPIOC_8
|
||||
id: C8
|
||||
class: outputs
|
||||
ts_name: 120 - VVT2 B2
|
||||
function: OUT_VVT2_B2
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// knock 1 - pin PF7
|
||||
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN5
|
||||
#define KNOCK_PIN_CH1 GPIOF_7
|
||||
#define KNOCK_PIN_CH1 Gpio::F7
|
||||
|
||||
// Sample rate & time - depends on the exact MCU
|
||||
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84
|
||||
|
|
|
@ -28,25 +28,25 @@ static void setInjectorPins() {
|
|||
|
||||
// Disable remainder
|
||||
for (int i = 8; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
}
|
||||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = GPIOI_8;
|
||||
engineConfiguration->ignitionPins[1] = GPIOE_5;
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_4;
|
||||
engineConfiguration->ignitionPins[3] = GPIOE_3;
|
||||
engineConfiguration->ignitionPins[4] = GPIOE_2;
|
||||
engineConfiguration->ignitionPins[5] = GPIOI_5;
|
||||
engineConfiguration->ignitionPins[6] = GPIOI_6;
|
||||
engineConfiguration->ignitionPins[7] = GPIOI_7;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::I8;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::E5;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E4;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::E3;
|
||||
engineConfiguration->ignitionPins[4] = Gpio::E2;
|
||||
engineConfiguration->ignitionPins[5] = Gpio::I5;
|
||||
engineConfiguration->ignitionPins[6] = Gpio::I6;
|
||||
engineConfiguration->ignitionPins[7] = Gpio::I7;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 8; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -68,11 +68,11 @@ static void setupVbatt() {
|
|||
|
||||
static void setupDefaultSensorInputs() {
|
||||
// trigger inputs
|
||||
engineConfiguration->triggerInputPins[0] = GPIOB_1;
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::B1;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
// Direct hall-only cam input
|
||||
engineConfiguration->camInputs[0] = GPIOA_6;
|
||||
engineConfiguration->camInputs[0] = Gpio::A6;
|
||||
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_4;
|
||||
engineConfiguration->tps1_2AdcChannel = EFI_ADC_8;
|
||||
|
@ -96,7 +96,7 @@ static void setHellen128ETBConfig() {
|
|||
uint8_t variant[2]={0xff,0xff};
|
||||
|
||||
//same pins as for LPS25
|
||||
m_i2c.init(GPIOB_10, GPIOB_11);
|
||||
m_i2c.init(Gpio::B10, Gpio::B11);
|
||||
m_i2c.read(0x20, variant, sizeof(variant));
|
||||
|
||||
efiPrintf ("BoardID [%02x%02x] ", variant[0],variant[1] );
|
||||
|
@ -117,17 +117,17 @@ static void setHellen128ETBConfig() {
|
|||
// Disable pin
|
||||
engineConfiguration->etbIo[0].disablePin = H176_OUT_PWM1;
|
||||
// Unused
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
||||
|
||||
//ETB2
|
||||
// PWM pin
|
||||
engineConfiguration->etbIo[1].controlPin = GPIOI_2;
|
||||
engineConfiguration->etbIo[1].controlPin = Gpio::I2;
|
||||
// DIR pin
|
||||
engineConfiguration->etbIo[1].directionPin1 = GPIOH_13;
|
||||
engineConfiguration->etbIo[1].directionPin1 = Gpio::H13;
|
||||
// Disable pin
|
||||
engineConfiguration->etbIo[1].disablePin = GPIOB_7;
|
||||
engineConfiguration->etbIo[1].disablePin = Gpio::B7;
|
||||
// Unused
|
||||
engineConfiguration->etbIo[1].directionPin2 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
|
||||
|
||||
// we only have pwm/dir, no dira/dirb
|
||||
engineConfiguration->etb_use_two_wires = false;
|
||||
|
@ -179,10 +179,10 @@ void setBoardDefaultConfiguration() {
|
|||
|
||||
engineConfiguration->enableSoftwareKnock = true;
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIOD_15;
|
||||
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fuelPumpPin = Gpio::D15;
|
||||
engineConfiguration->idle.solenoidPin = Gpio::Unassigned;
|
||||
engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->starterControlPin = H176_OUT_IO10;
|
||||
engineConfiguration->startStopButtonPin = H176_IN_A16;
|
||||
|
@ -216,7 +216,7 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->throttlePedalSecondaryWOTVoltage = 4.24;
|
||||
|
||||
setHellenDefaultVrThresholds();
|
||||
engineConfiguration->vrThreshold[0].pin = GPIOD_14;
|
||||
engineConfiguration->vrThreshold[0].pin = Gpio::D14;
|
||||
hellenWbo();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,34 +33,34 @@ pins:
|
|||
#Outputs (via Test Points)
|
||||
- pin: P19
|
||||
# LOW11 IO9
|
||||
id: GPIOI_1
|
||||
id: I1
|
||||
class: outputs
|
||||
ts_name: P19_OUT_LOW11
|
||||
type: ls
|
||||
|
||||
- pin: P34
|
||||
# LOW8 IO6
|
||||
id: GPIOH_15
|
||||
id: H15
|
||||
class: outputs
|
||||
ts_name: P34_OUT_LOW8
|
||||
|
||||
- pin: P35
|
||||
# LOW12 IO10
|
||||
id: GPIOI_0
|
||||
id: I0
|
||||
class: outputs
|
||||
ts_name: P35_OUT_LOW9
|
||||
type: ls
|
||||
|
||||
- pin: P33
|
||||
# SOLENOID_B2 PWM5
|
||||
id: GPIOC_9
|
||||
id: C9
|
||||
class: outputs
|
||||
ts_name: P33_PWM5
|
||||
type: ls
|
||||
|
||||
- pin: P18
|
||||
# OUT_PP2 OUT_IO12
|
||||
id: GPIOA_8
|
||||
id: A8
|
||||
class: outputs
|
||||
ts_name: P18_OUT_PP2
|
||||
type: ls
|
||||
|
@ -88,7 +88,7 @@ pins:
|
|||
function: NC
|
||||
|
||||
- pin: A6
|
||||
id: GPIOD_12
|
||||
id: D12
|
||||
class: outputs
|
||||
ts_name: A6 - Fan Control
|
||||
function: low side control
|
||||
|
@ -176,7 +176,7 @@ pins:
|
|||
function: NC
|
||||
|
||||
- pin: C21
|
||||
id: GPIOH_14
|
||||
id: H14
|
||||
class: outputs
|
||||
ts_name: C21 - Evap Purge Control
|
||||
function: low side solenoid control
|
||||
|
@ -191,13 +191,13 @@ pins:
|
|||
type: gnd
|
||||
|
||||
- pin: C24
|
||||
id: [GPIOA_3, EFI_ADC_3]
|
||||
id: [A3, EFI_ADC_3]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: C24 - PPS1
|
||||
function: PPS1 analog input
|
||||
|
||||
- pin: C25
|
||||
id: [GPIOC_4, EFI_ADC_14]
|
||||
id: [C4, EFI_ADC_14]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: C25 - PPS2
|
||||
function: PPS2 analog input
|
||||
|
@ -214,7 +214,7 @@ pins:
|
|||
function: NC
|
||||
|
||||
- pin: C29
|
||||
id: GPIOD_15
|
||||
id: D15
|
||||
class: outputs
|
||||
ts_name: C29 - Fuel Pump
|
||||
function: low side relay control
|
||||
|
@ -251,7 +251,7 @@ pins:
|
|||
function: K-line/Lin
|
||||
|
||||
- pin: C40
|
||||
id: [GPIOF_10]
|
||||
id: [F10]
|
||||
class: [switch_inputs]
|
||||
ts_name: C40 - start button
|
||||
function: Start button
|
||||
|
@ -329,28 +329,28 @@ pins:
|
|||
function: Test Point P14
|
||||
|
||||
- pin: E1
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
class: outputs
|
||||
ts_name: E1 - LS1
|
||||
function: Low-Side Switch 1
|
||||
type: inj
|
||||
|
||||
- pin: E2
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
class: outputs
|
||||
ts_name: E2- LS2
|
||||
function: Low-Side Switch 2
|
||||
type: inj
|
||||
|
||||
- pin: E3
|
||||
id: GPIOD_11
|
||||
id: D11
|
||||
class: outputs
|
||||
ts_name: E3 - LS3
|
||||
function: Low-Side Switch 3
|
||||
type: inj
|
||||
|
||||
- pin: E4
|
||||
id: GPIOD_10
|
||||
id: D10
|
||||
class: outputs
|
||||
ts_name: E4 - LS4/VVT
|
||||
function: "Low-Side Switch 4/ VVT control"
|
||||
|
@ -381,14 +381,14 @@ pins:
|
|||
function: Test Point P42
|
||||
|
||||
- pin: E13
|
||||
id: GPIOD_9
|
||||
id: D9
|
||||
class: outputs
|
||||
ts_name: E13 - INJ 4
|
||||
function: injector output 4
|
||||
type: inj
|
||||
|
||||
- pin: E14
|
||||
id: GPIOF_12
|
||||
id: F12
|
||||
class: outputs
|
||||
ts_name: E14 - INJ 2
|
||||
function: injector output 2
|
||||
|
@ -420,7 +420,7 @@ pins:
|
|||
type: 5v
|
||||
|
||||
- pin: E23
|
||||
id: [GPIOC_1, EFI_ADC_11]
|
||||
id: [C1, EFI_ADC_11]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: E23 - MAP
|
||||
function: analog input MAP
|
||||
|
@ -432,7 +432,7 @@ pins:
|
|||
|
||||
- pin: E25
|
||||
# H144_LS_7
|
||||
id: GPIOF_13
|
||||
id: F13
|
||||
class: outputs
|
||||
ts_name: E25 - INJ 1
|
||||
function: injector output 1
|
||||
|
@ -440,7 +440,7 @@ pins:
|
|||
|
||||
- pin: E26
|
||||
# H144_LS_8
|
||||
id: GPIOF_14
|
||||
id: F14
|
||||
class: outputs
|
||||
ts_name: E26 - INJ 3
|
||||
function: injector output 3
|
||||
|
@ -454,7 +454,7 @@ pins:
|
|||
type: gnd
|
||||
|
||||
- pin: E29
|
||||
id: [GPIOC_2, EFI_ADC_12]
|
||||
id: [C2, EFI_ADC_12]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: E29 - Coolant Temp
|
||||
function: analog input CLT
|
||||
|
@ -464,7 +464,7 @@ pins:
|
|||
function: NC
|
||||
|
||||
- pin: E31
|
||||
id: [GPIOA_4, EFI_ADC_4]
|
||||
id: [A4, EFI_ADC_4]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: E31 - TPS1
|
||||
function: analog input TPS1
|
||||
|
@ -479,7 +479,7 @@ pins:
|
|||
type: 5v
|
||||
|
||||
- pin: E34
|
||||
id: [GPIOB_0, EFI_ADC_8]
|
||||
id: [B0, EFI_ADC_8]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: E34 - TPS2
|
||||
function: analog input TPS2
|
||||
|
@ -492,7 +492,7 @@ pins:
|
|||
function: NC
|
||||
|
||||
- pin: E37
|
||||
id: [GPIOB_1, EFI_ADC_9]
|
||||
id: [B1, EFI_ADC_9]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: E37 - Crank Input
|
||||
function: VR-
|
||||
|
@ -507,7 +507,7 @@ pins:
|
|||
type: gnd
|
||||
|
||||
- pin: E40
|
||||
id: [GPIOA_6, EFI_ADC_6]
|
||||
id: [A6, EFI_ADC_6]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: E40 - IN_CAM
|
||||
function: digital input CAM input (Hall)
|
||||
|
@ -529,7 +529,7 @@ pins:
|
|||
function: knock2 sensor signal
|
||||
|
||||
- pin: E45
|
||||
id: [GPIOC_3, EFI_ADC_13]
|
||||
id: [C3, EFI_ADC_13]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: E45 - IAT
|
||||
function: analog input IAT
|
||||
|
@ -540,7 +540,7 @@ pins:
|
|||
type: 5v
|
||||
|
||||
- pin: E47
|
||||
id: [GPIOC_0, EFI_ADC_10]
|
||||
id: [C0, EFI_ADC_10]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: E47 - MAF
|
||||
function: analog input
|
||||
|
@ -562,7 +562,7 @@ pins:
|
|||
function: NC
|
||||
|
||||
- pin: F4
|
||||
id: GPIOE_2
|
||||
id: E2
|
||||
class: outputs
|
||||
ts_name: F4 - IGN 5
|
||||
function: igniter
|
||||
|
@ -575,7 +575,7 @@ pins:
|
|||
- pin: F6
|
||||
# OUT_IGN3 Q5
|
||||
# used as Coil#2 on M104
|
||||
id: GPIOE_4
|
||||
id: E4
|
||||
class: outputs
|
||||
ts_name: F6 - IGN 3
|
||||
function: igniter
|
||||
|
@ -590,7 +590,7 @@ pins:
|
|||
type: gnd
|
||||
|
||||
- pin: F9
|
||||
id: GPIOI_6
|
||||
id: I6
|
||||
class: outputs
|
||||
ts_name: F9 - IGN 7
|
||||
function: igniter
|
||||
|
@ -601,7 +601,7 @@ pins:
|
|||
type: ign
|
||||
|
||||
- pin: F11
|
||||
id: GPIOI_7
|
||||
id: I7
|
||||
class: outputs
|
||||
ts_name: F11 - IGN 8
|
||||
function: igniter
|
||||
|
@ -615,7 +615,7 @@ pins:
|
|||
# OUT_IGN4 Q3
|
||||
# CLK230
|
||||
# used as Coil#1 on M104 https://github.com/rusefi/rusefi/wiki/1997-e320
|
||||
id: GPIOE_3
|
||||
id: E3
|
||||
class: outputs
|
||||
ts_name: F13 - IGN 4
|
||||
function: igniter
|
||||
|
@ -630,14 +630,14 @@ pins:
|
|||
type: gnd
|
||||
|
||||
- pin: F16
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
ts_name: F16 - IGN 2
|
||||
function: igniter
|
||||
type: ign
|
||||
|
||||
- pin: F17
|
||||
id: GPIOI_5
|
||||
id: I5
|
||||
class: outputs
|
||||
ts_name: F17 - IGN 6
|
||||
function: igniter
|
||||
|
@ -655,7 +655,7 @@ pins:
|
|||
# OUT_IGN1 Q1
|
||||
# CLK230
|
||||
# Used as coil#3 on M104
|
||||
id: GPIOI_8
|
||||
id: I8
|
||||
class: outputs
|
||||
ts_name: F20 - IGN 1
|
||||
function: igniter
|
||||
|
|
|
@ -23,21 +23,21 @@ static void setInjectorPins() {
|
|||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
}
|
||||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = GPIOC_13;
|
||||
engineConfiguration->ignitionPins[1] = GPIOE_5;
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_4;
|
||||
engineConfiguration->ignitionPins[3] = GPIOE_3;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::C13;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::E5;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E4;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::E3;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -60,8 +60,8 @@ static void setupVbatt() {
|
|||
static void setupDefaultSensorInputs() {
|
||||
// trigger inputs
|
||||
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
// Direct hall-only cam input
|
||||
engineConfiguration->camInputs[0] = H144_IN_CAM;
|
||||
engineConfiguration->camInputs[1 * CAMS_PER_BANK] = H144_IN_D_AUX4;
|
||||
|
@ -110,9 +110,9 @@ void setBoardConfigOverrides() {
|
|||
if (hellenBoardId == 0) {
|
||||
// first revision of did not have Hellen Board ID
|
||||
// https://github.com/rusefi/hellen154hyundai/issues/55
|
||||
engineConfiguration->etbIo[1].directionPin1 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[1].directionPin2 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[1].controlPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[1].directionPin1 = Gpio::Unassigned;
|
||||
engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
|
||||
engineConfiguration->etbIo[1].controlPin = Gpio::Unassigned;
|
||||
|
||||
if (isFirstInvocation) {
|
||||
isFirstInvocation = false;
|
||||
|
@ -153,9 +153,9 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->canRxPin = H176_CAN_RX;
|
||||
|
||||
engineConfiguration->fuelPumpPin = H144_OUT_IO9;
|
||||
// engineConfiguration->idle.solenoidPin = GPIOD_14; // OUT_PWM5
|
||||
// engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = GPIOG_14; // pin: 111a, OUT_IO3
|
||||
// engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
|
||||
// engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = Gpio::G14; // pin: 111a, OUT_IO3
|
||||
engineConfiguration->malfunctionIndicatorPin = H144_OUT_PWM8;
|
||||
|
||||
engineConfiguration->brakePedalPin = H144_IN_RES3;
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
pins:
|
||||
- pin: P66
|
||||
# LOW3 IO1
|
||||
id: GPIOD_3
|
||||
id: D3
|
||||
class: outputs
|
||||
ts_name: Aux P66
|
||||
|
||||
- pin: P67
|
||||
# LOW4 IO2
|
||||
id: GPIOA_9
|
||||
id: A9
|
||||
class: outputs
|
||||
ts_name: Aux P67
|
||||
|
||||
- pin: P68
|
||||
# LOW6 IO4
|
||||
id: GPIOG_5
|
||||
id: G5
|
||||
class: outputs
|
||||
ts_name: Aux P68
|
||||
|
||||
|
@ -66,7 +66,7 @@ pins:
|
|||
|
||||
- pin: K15
|
||||
# cam2 IN_AUX4
|
||||
id: [GPIOA_7]
|
||||
id: [A7]
|
||||
function: Cam Sensor
|
||||
class: [event_inputs]
|
||||
ts_name: Cam - K15
|
||||
|
@ -78,7 +78,7 @@ pins:
|
|||
- pin: K17
|
||||
function: Crank Sensor
|
||||
# IN_CRANK AIN24 A24
|
||||
id: [GPIOB_1]
|
||||
id: [B1]
|
||||
class: [event_inputs]
|
||||
ts_name: Crank - K17
|
||||
|
||||
|
@ -93,28 +93,28 @@ pins:
|
|||
ts_name: BK2 Wastegate Position - 22
|
||||
|
||||
- pin: K25
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
class: outputs
|
||||
ts_name: INJ_1 k25
|
||||
function: Injector 1
|
||||
type: inj
|
||||
|
||||
- pin: K26
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
class: outputs
|
||||
ts_name: INJ_2 k26
|
||||
function: Injector 2
|
||||
type: inj
|
||||
|
||||
- pin: K27
|
||||
id: GPIOD_11
|
||||
id: D11
|
||||
class: outputs
|
||||
ts_name: INJ_3 k27
|
||||
function: Injector 3
|
||||
type: inj
|
||||
|
||||
- pin: K28
|
||||
id: GPIOD_10
|
||||
id: D10
|
||||
class: outputs
|
||||
ts_name: INJ_4 k28
|
||||
function: Injector 4
|
||||
|
@ -167,7 +167,7 @@ pins:
|
|||
|
||||
- pin: K40
|
||||
# H144_IN_VSS
|
||||
id: GPIOF_11
|
||||
id: F11
|
||||
class: event_inputs
|
||||
ts_name: K40 VSS
|
||||
function: Vehicle Speed Sensor
|
||||
|
@ -181,7 +181,7 @@ pins:
|
|||
|
||||
- pin: K47
|
||||
# H144_LS_7
|
||||
id: GPIOF_13
|
||||
id: F13
|
||||
class: outputs
|
||||
ts_name: K48 BK1 Wastegate Solenoid
|
||||
function: BK1 Wastegate Solenoid
|
||||
|
@ -215,7 +215,7 @@ pins:
|
|||
|
||||
- pin: K62
|
||||
# cam1 IN_CAM
|
||||
id: [GPIOA_6]
|
||||
id: [A6]
|
||||
function: Cam Sensor
|
||||
class: [event_inputs]
|
||||
ts_name: Cam - K62
|
||||
|
@ -226,7 +226,7 @@ pins:
|
|||
|
||||
- pin: K64
|
||||
# H144_OUT_IO3
|
||||
id: GPIOG_14
|
||||
id: G14
|
||||
class: outputs
|
||||
ts_name: Main Relay K64
|
||||
function: Main relay control
|
||||
|
@ -234,21 +234,21 @@ pins:
|
|||
|
||||
- pin: K65
|
||||
# H144_OUT_IO7
|
||||
id: GPIOG_3
|
||||
id: G3
|
||||
class: outputs
|
||||
ts_name: Fan Relay Low
|
||||
function: Fan relay low
|
||||
|
||||
- pin: K65
|
||||
# H144_LS_5
|
||||
id: GPIOD_9
|
||||
id: D9
|
||||
class: outputs
|
||||
ts_name: VVT1
|
||||
function: VVT1
|
||||
|
||||
- pin: K68
|
||||
# H144_LS_6
|
||||
id: GPIOF_12
|
||||
id: F12
|
||||
class: outputs
|
||||
ts_name: VVT2
|
||||
function: VVT2
|
||||
|
@ -256,7 +256,7 @@ pins:
|
|||
|
||||
- pin: K70
|
||||
# H144_OUT_IO9
|
||||
id: GPIOG_13
|
||||
id: G13
|
||||
class: outputs
|
||||
ts_name: Fuel Pump K70
|
||||
function: Fuel Pump Relay
|
||||
|
@ -299,14 +299,14 @@ pins:
|
|||
|
||||
- pin: K86
|
||||
# H144_OUT_PWM7
|
||||
id: GPIOD_15
|
||||
id: D15
|
||||
class: outputs
|
||||
ts_name: Tacho
|
||||
function: Tachometer
|
||||
|
||||
- pin: K87
|
||||
# H144_OUT_IO10
|
||||
id: GPIOG_12
|
||||
id: G12
|
||||
class: outputs
|
||||
ts_name: K87 AC Relay
|
||||
function: A/C Relay
|
||||
|
@ -314,20 +314,20 @@ pins:
|
|||
|
||||
- pin: K88
|
||||
# H144_OUT_IO8
|
||||
id: GPIOG_4
|
||||
id: G4
|
||||
class: outputs
|
||||
ts_name: Fan Relay HI
|
||||
function: Fan relay high
|
||||
|
||||
- pin: K92
|
||||
# H144_OUT_PWM8
|
||||
id: GPIOD_12
|
||||
id: D12
|
||||
class: outputs
|
||||
ts_name: MIL
|
||||
function: Check Engine Light
|
||||
|
||||
- pin: A1
|
||||
id: GPIOE_3
|
||||
id: E3
|
||||
class: outputs
|
||||
ts_name: Coil 4
|
||||
function: Coil 4
|
||||
|
@ -340,7 +340,7 @@ pins:
|
|||
function: Ground
|
||||
|
||||
- pin: A16
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
ts_name: Coil 2
|
||||
function: Coil 2
|
||||
|
@ -348,14 +348,14 @@ pins:
|
|||
|
||||
- pin: A29
|
||||
# H144_IN_RES3
|
||||
id: GPIOF_8
|
||||
id: F8
|
||||
class: switch_inputs
|
||||
ts_name: A29 Brake Input
|
||||
function: Brake Switch
|
||||
|
||||
|
||||
- pin: A31
|
||||
id: GPIOC_13
|
||||
id: C13
|
||||
class: outputs
|
||||
ts_name: Coil 1
|
||||
function: Coil 1
|
||||
|
@ -363,7 +363,7 @@ pins:
|
|||
|
||||
- pin: A43
|
||||
# H144_IN_RES2
|
||||
id: GPIOF_10
|
||||
id: F10
|
||||
class: switch_inputs
|
||||
ts_name: A43 Clutch Input
|
||||
function: Clutch Input
|
||||
|
@ -372,7 +372,7 @@ pins:
|
|||
function: BK2 DC Wastegate Pos
|
||||
|
||||
- pin: A46
|
||||
id: GPIOE_4
|
||||
id: E4
|
||||
class: outputs
|
||||
ts_name: Coil 3
|
||||
function: Coil 3
|
||||
|
@ -380,7 +380,7 @@ pins:
|
|||
|
||||
- pin: A57
|
||||
# H144_IN_RES1
|
||||
id: GPIOF_9
|
||||
id: F9
|
||||
class: switch_inputs
|
||||
ts_name: A57 AC Request
|
||||
function: AC Request Switch
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// knock 1 - pin PF7
|
||||
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN5
|
||||
#define KNOCK_PIN_CH1 GPIOF_7
|
||||
#define KNOCK_PIN_CH1 Gpio::F7
|
||||
|
||||
// Sample rate & time - depends on the exact MCU
|
||||
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
#define BOARD_NAME "HellenNA6"
|
||||
|
||||
#define EFI_USB_AF 10U
|
||||
#define EFI_USB_SERIAL_DM GPIOA_11
|
||||
#define EFI_USB_SERIAL_DP GPIOA_12
|
||||
#define EFI_USB_SERIAL_DM Gpio::A11
|
||||
#define EFI_USB_SERIAL_DP Gpio::A12
|
||||
|
||||
// Ignore USB VBUS pin (we're never a host, only a device)
|
||||
#define BOARD_OTG_NOVBUSSENS TRUE
|
||||
|
|
|
@ -16,37 +16,37 @@
|
|||
|
||||
static void setInjectorPins() {
|
||||
engineConfiguration->injectionPins[0] = H176_LS_1;
|
||||
engineConfiguration->injectionPins[1] = GPIOG_8;
|
||||
engineConfiguration->injectionPins[2] = GPIOD_11;
|
||||
engineConfiguration->injectionPins[3] = GPIOD_10;
|
||||
engineConfiguration->injectionPins[1] = Gpio::G8;
|
||||
engineConfiguration->injectionPins[2] = Gpio::D11;
|
||||
engineConfiguration->injectionPins[3] = Gpio::D10;
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->clutchDownPin = GPIOC_4; // Clutch switch input
|
||||
engineConfiguration->clutchDownPin = Gpio::C4; // Clutch switch input
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIOG_4; //1E - Check Engine Light
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
|
||||
}
|
||||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = GPIOI_8; // 3F - IGN_1 (1&4)
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED ; // GPIOE_4
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_5; // 3I - IGN_2 (2&3)
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED; // GPIOE_3
|
||||
engineConfiguration->ignitionPins[0] = Gpio::I8; // 3F - IGN_1 (1&4)
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned ; // Gpio::E4
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E5; // 3I - IGN_2 (2&3)
|
||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned; // Gpio::E3
|
||||
|
||||
//engineConfiguration->ignitionPins[4] = GPIOE_2;
|
||||
//engineConfiguration->ignitionPins[5] = GPIOI_5;
|
||||
//engineConfiguration->ignitionPins[6] = GPIOI_6;
|
||||
//engineConfiguration->ignitionPins[7] = GPIOI_7;
|
||||
//engineConfiguration->ignitionPins[4] = Gpio::E2;
|
||||
//engineConfiguration->ignitionPins[5] = Gpio::I5;
|
||||
//engineConfiguration->ignitionPins[6] = Gpio::I6;
|
||||
//engineConfiguration->ignitionPins[7] = Gpio::I7;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -68,10 +68,10 @@ static void setupVbatt() {
|
|||
|
||||
static void setupDefaultSensorInputs() {
|
||||
// trigger inputs, hall
|
||||
engineConfiguration->triggerInputPins[0] = GPIOA_6;
|
||||
engineConfiguration->triggerInputPins[1] = GPIOB_1;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::A6;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::B1;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->camInputs[0] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_4;
|
||||
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
|
||||
|
@ -126,13 +126,13 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->enableSoftwareKnock = true;
|
||||
|
||||
// these stm32 pins do not match hellen_meta, is that because hellenNA6 is not using latest MCU version?
|
||||
engineConfiguration->acRelayPin = GPIOH_15; // 1J - AC Relay
|
||||
engineConfiguration->fuelPumpPin = GPIOG_2; // OUT_IO9
|
||||
engineConfiguration->idle.solenoidPin = GPIOD_14; // OUT_PWM5
|
||||
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = GPIOI_2; // OUT_LOW3
|
||||
engineConfiguration->tachOutputPin = GPIOI_0;
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIOG_9;
|
||||
engineConfiguration->acRelayPin = Gpio::H15; // 1J - AC Relay
|
||||
engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
|
||||
engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
|
||||
engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = Gpio::I2; // OUT_LOW3
|
||||
engineConfiguration->tachOutputPin = Gpio::I0;
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::G9;
|
||||
|
||||
engineConfiguration->vehicleSpeedSensorInputPin = H144_IN_VSS;
|
||||
|
||||
|
@ -154,14 +154,14 @@ void setBoardDefaultConfiguration() {
|
|||
void setSdCardConfigurationOverrides() {
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
|
||||
engineConfiguration->spi3mosiPin = GPIOC_12;
|
||||
engineConfiguration->spi3misoPin = GPIOC_11;
|
||||
engineConfiguration->spi3sckPin = GPIOC_10;
|
||||
engineConfiguration->sdCardCsPin = GPIOA_15;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->sdCardCsPin = Gpio::A15;
|
||||
|
||||
// engineConfiguration->spi2mosiPin = GPIOB_15;
|
||||
// engineConfiguration->spi2misoPin = GPIOB_14;
|
||||
// engineConfiguration->spi2sckPin = GPIOB_13;
|
||||
// engineConfiguration->sdCardCsPin = GPIOB_12;
|
||||
// engineConfiguration->spi2mosiPin = Gpio::B15;
|
||||
// engineConfiguration->spi2misoPin = Gpio::B14;
|
||||
// engineConfiguration->spi2sckPin = Gpio::B13;
|
||||
// engineConfiguration->sdCardCsPin = Gpio::B12;
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
}
|
||||
|
|
|
@ -24,20 +24,20 @@ pins:
|
|||
type: can
|
||||
|
||||
- pin: 1E
|
||||
id: GPIOG_9
|
||||
id: G9
|
||||
class: outputs
|
||||
ts_name: 1E - Check Engine Light
|
||||
function: Check Engine Light
|
||||
type: ls
|
||||
|
||||
- pin: 1G
|
||||
id: GPIOI_8
|
||||
id: I8
|
||||
class: outputs
|
||||
ts_name: 1G - Ignition 1 & 4
|
||||
type: ign
|
||||
|
||||
- pin: 1H
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
ts_name: 1H - Ignition 2 & 3
|
||||
type: ign
|
||||
|
@ -47,14 +47,14 @@ pins:
|
|||
type: gnd
|
||||
|
||||
- pin: 1J
|
||||
id: GPIOH_15
|
||||
id: H15
|
||||
class: outputs
|
||||
ts_name: 1J - AC Relay
|
||||
function: A/C Relay
|
||||
type: ls
|
||||
|
||||
- pin: 1L
|
||||
id: GPIOD_12
|
||||
id: D12
|
||||
class: outputs
|
||||
ts_name: Radiator Fan
|
||||
function: Radiator Fan Relay
|
||||
|
@ -62,7 +62,7 @@ pins:
|
|||
|
||||
- pin: 1M
|
||||
# H144_IN_VSS
|
||||
id: GPIOF_11
|
||||
id: F11
|
||||
class: event_inputs
|
||||
ts_name: 1M - VSS
|
||||
function: VSS IN
|
||||
|
@ -72,7 +72,7 @@ pins:
|
|||
function: Sensor +5V
|
||||
|
||||
- pin: 1Q
|
||||
id: [GPIOC_5, EFI_ADC_15]
|
||||
id: [C5, EFI_ADC_15]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 1Q AC Switch
|
||||
function: A/C switch input
|
||||
|
@ -90,7 +90,7 @@ pins:
|
|||
function: EGR Solenoid
|
||||
|
||||
- pin: 1V
|
||||
id: [GPIOC_4, EFI_ADC_14]
|
||||
id: [C4, EFI_ADC_14]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 1V - Clutch Switch
|
||||
function: Clutch switch input
|
||||
|
@ -121,14 +121,14 @@ pins:
|
|||
function: WBO Vs
|
||||
|
||||
- pin: 2I
|
||||
id: GPIOF_14
|
||||
id: F14
|
||||
class: outputs
|
||||
ts_name: 2I - VVT
|
||||
function: VVT Output
|
||||
type: ls
|
||||
|
||||
- pin: 2J
|
||||
id: GPIOF_12
|
||||
id: F12
|
||||
class: outputs
|
||||
ts_name: 2J - Boost Control
|
||||
function: Boost Control Solenoid
|
||||
|
@ -137,19 +137,19 @@ pins:
|
|||
function: GND
|
||||
|
||||
- pin: 2L
|
||||
id: GPIOF_3
|
||||
id: F3
|
||||
class: event_inputs
|
||||
ts_name: 2L - Flex Fuel
|
||||
function: Flex Fuel Input
|
||||
|
||||
- pin: 2M
|
||||
id: [GPIOC_1, EFI_ADC_11]
|
||||
id: [C1, EFI_ADC_11]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 2M - Pressure Sensor
|
||||
function: pressure input
|
||||
|
||||
- pin: 2N
|
||||
id: [GPIOA_1, EFI_ADC_1]
|
||||
id: [A1, EFI_ADC_1]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 2N - Temperature Sensor
|
||||
function: temp input
|
||||
|
@ -181,7 +181,7 @@ pins:
|
|||
color: white
|
||||
|
||||
- pin: 3E
|
||||
id: GPIOB_1
|
||||
id: B1
|
||||
class: event_inputs
|
||||
ts_name: 3E - CRANK
|
||||
function: Crankshaft Sensor
|
||||
|
@ -192,13 +192,13 @@ pins:
|
|||
color: white
|
||||
|
||||
- pin: 3G
|
||||
id: GPIOA_6
|
||||
id: A6
|
||||
class: event_inputs
|
||||
ts_name: 3G - CAM
|
||||
function: Camshaft Sensor
|
||||
|
||||
- pin: 3I
|
||||
id: GPIOI_0
|
||||
id: I0
|
||||
class: outputs
|
||||
ts_name: Tachometer
|
||||
function: tachometer
|
||||
|
@ -230,13 +230,13 @@ pins:
|
|||
function: IAT sensor
|
||||
|
||||
- pin: 3S
|
||||
id: GPIOD_9
|
||||
id: D9
|
||||
class: outputs
|
||||
ts_name: 3S - A/C Fan 94-95
|
||||
function: A/C Fan
|
||||
|
||||
- pin: 3T
|
||||
id: GPIOG_2
|
||||
id: G2
|
||||
class: outputs
|
||||
ts_name: Fuel Pump Relay
|
||||
function: Fuel Pump Relay
|
||||
|
@ -255,35 +255,35 @@ pins:
|
|||
function: CLT sensor
|
||||
|
||||
- pin: 3U
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
class: outputs
|
||||
ts_name: 3U - Injector 1
|
||||
function: Injector #1
|
||||
type: inj
|
||||
|
||||
- pin: 3V
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
class: outputs
|
||||
ts_name: 3V - Injector 2
|
||||
function: Injector #2
|
||||
type: inj
|
||||
|
||||
- pin: 3W
|
||||
id: GPIOD_14
|
||||
id: D14
|
||||
class: outputs
|
||||
ts_name: 3W - IDLE
|
||||
function: IAC idle
|
||||
type: ls
|
||||
|
||||
- pin: 3Y
|
||||
id: GPIOD_11
|
||||
id: D11
|
||||
class: outputs
|
||||
ts_name: 3Y - Injector 3
|
||||
function: Injector #3
|
||||
type: inj
|
||||
|
||||
- pin: 3Z
|
||||
id: GPIOD_10
|
||||
id: D10
|
||||
class: outputs
|
||||
ts_name: 3Z - Injector 4
|
||||
function: Injector #4
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// knock 1 - pin PF7
|
||||
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN5
|
||||
#define KNOCK_PIN_CH1 GPIOF_7
|
||||
#define KNOCK_PIN_CH1 Gpio::F7
|
||||
|
||||
// Sample rate & time - depends on the exact MCU
|
||||
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
#define BOARD_NAME "Hellen72"
|
||||
|
||||
#define EFI_USB_AF 10U
|
||||
#define EFI_USB_SERIAL_DM GPIOA_11
|
||||
#define EFI_USB_SERIAL_DP GPIOA_12
|
||||
#define EFI_USB_SERIAL_DM Gpio::A11
|
||||
#define EFI_USB_SERIAL_DP Gpio::A12
|
||||
|
||||
// Ignore USB VBUS pin (we're never a host, only a device)
|
||||
#define BOARD_OTG_NOVBUSSENS TRUE
|
||||
|
|
|
@ -15,38 +15,38 @@
|
|||
#include "hellen_meta.h"
|
||||
|
||||
static void setInjectorPins() {
|
||||
engineConfiguration->injectionPins[0] = GPIOG_7;
|
||||
engineConfiguration->injectionPins[1] = GPIOG_8;
|
||||
engineConfiguration->injectionPins[2] = GPIOD_11;
|
||||
engineConfiguration->injectionPins[3] = GPIOD_10;
|
||||
engineConfiguration->injectionPins[0] = Gpio::G7;
|
||||
engineConfiguration->injectionPins[1] = Gpio::G8;
|
||||
engineConfiguration->injectionPins[2] = Gpio::D11;
|
||||
engineConfiguration->injectionPins[3] = Gpio::D10;
|
||||
|
||||
//engineConfiguration->injectionPins[4] = GPIOD_9;
|
||||
//engineConfiguration->injectionPins[5] = GPIOF_12;
|
||||
//engineConfiguration->injectionPins[6] = GPIOF_13;
|
||||
//engineConfiguration->injectionPins[7] = GPIOF_14;
|
||||
//engineConfiguration->injectionPins[4] = Gpio::D9;
|
||||
//engineConfiguration->injectionPins[5] = Gpio::F12;
|
||||
//engineConfiguration->injectionPins[6] = Gpio::F13;
|
||||
//engineConfiguration->injectionPins[7] = Gpio::F14;
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
}
|
||||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = GPIOI_8; // 3F - IGN_1 (1&4)
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED ; // GPIOE_4
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_5; // 3I - IGN_2 (2&3)
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED; // GPIOE_3
|
||||
engineConfiguration->ignitionPins[0] = Gpio::I8; // 3F - IGN_1 (1&4)
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned ; // Gpio::E4
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E5; // 3I - IGN_2 (2&3)
|
||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned; // Gpio::E3
|
||||
|
||||
//engineConfiguration->ignitionPins[4] = GPIOE_2;
|
||||
//engineConfiguration->ignitionPins[5] = GPIOI_5;
|
||||
//engineConfiguration->ignitionPins[6] = GPIOI_6;
|
||||
//engineConfiguration->ignitionPins[7] = GPIOI_7;
|
||||
//engineConfiguration->ignitionPins[4] = Gpio::E2;
|
||||
//engineConfiguration->ignitionPins[5] = Gpio::I5;
|
||||
//engineConfiguration->ignitionPins[6] = Gpio::I6;
|
||||
//engineConfiguration->ignitionPins[7] = Gpio::I7;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -68,11 +68,11 @@ static void setupVbatt() {
|
|||
|
||||
static void setupDefaultSensorInputs() {
|
||||
// trigger inputs
|
||||
engineConfiguration->triggerInputPins[0] = GPIOB_1;
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::B1;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
// Direct hall-only cam input
|
||||
engineConfiguration->camInputs[0] = GPIOA_6;
|
||||
engineConfiguration->camInputs[0] = Gpio::A6;
|
||||
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_4;
|
||||
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
|
||||
|
@ -98,8 +98,8 @@ void setBoardConfigOverrides() {
|
|||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
}
|
||||
|
||||
void setSerialConfigurationOverrides() {
|
||||
|
@ -126,24 +126,24 @@ void setBoardDefaultConfiguration() {
|
|||
|
||||
engineConfiguration->enableSoftwareKnock = true;
|
||||
|
||||
engineConfiguration->acRelayPin = GPIOH_15;
|
||||
engineConfiguration->acSwitch = GPIOB_0;
|
||||
engineConfiguration->acRelayPin = Gpio::H15;
|
||||
engineConfiguration->acSwitch = Gpio::B0;
|
||||
engineConfiguration->acSwitchMode = PI_PULLUP;
|
||||
|
||||
engineConfiguration->vehicleSpeedSensorInputPin = H144_IN_VSS;
|
||||
engineConfiguration->clutchDownPin = H144_IN_RES3;
|
||||
engineConfiguration->clutchDownPinInverted = true;
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIOG_2; // OUT_IO9
|
||||
engineConfiguration->idle.solenoidPin = GPIOD_14; // OUT_PWM5
|
||||
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8
|
||||
engineConfiguration->fan2Pin = GPIOD_9;
|
||||
engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
|
||||
engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
|
||||
engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
|
||||
engineConfiguration->fan2Pin = Gpio::D9;
|
||||
engineConfiguration->enableFan2WithAc = true;
|
||||
engineConfiguration->mainRelayPin = GPIOI_2; // OUT_LOW3
|
||||
engineConfiguration->vvtPins[0] = GPIOI_0; // 4R - VVT (O5)
|
||||
engineConfiguration->mainRelayPin = Gpio::I2; // OUT_LOW3
|
||||
engineConfiguration->vvtPins[0] = Gpio::I0; // 4R - VVT (O5)
|
||||
|
||||
engineConfiguration->tachOutputPin = GPIOD_13; // 3O - TACH (PWM7)
|
||||
engineConfiguration->alternatorControlPin = GPIOD_15; // 3M - ALTERN (PWM6)
|
||||
engineConfiguration->tachOutputPin = Gpio::D13; // 3O - TACH (PWM7)
|
||||
engineConfiguration->alternatorControlPin = Gpio::D15; // 3M - ALTERN (PWM6)
|
||||
|
||||
|
||||
// "required" hardware is done - set some reasonable defaults
|
||||
|
@ -166,14 +166,14 @@ void setBoardDefaultConfiguration() {
|
|||
void setSdCardConfigurationOverrides() {
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
|
||||
engineConfiguration->spi3mosiPin = GPIOC_12;
|
||||
engineConfiguration->spi3misoPin = GPIOC_11;
|
||||
engineConfiguration->spi3sckPin = GPIOC_10;
|
||||
engineConfiguration->sdCardCsPin = GPIOA_15;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->sdCardCsPin = Gpio::A15;
|
||||
|
||||
// engineConfiguration->spi2mosiPin = GPIOB_15;
|
||||
// engineConfiguration->spi2misoPin = GPIOB_14;
|
||||
// engineConfiguration->spi2sckPin = GPIOB_13;
|
||||
// engineConfiguration->sdCardCsPin = GPIOB_12;
|
||||
// engineConfiguration->spi2mosiPin = Gpio::B15;
|
||||
// engineConfiguration->spi2misoPin = Gpio::B14;
|
||||
// engineConfiguration->spi2sckPin = Gpio::B13;
|
||||
// engineConfiguration->sdCardCsPin = Gpio::B12;
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
pins:
|
||||
- pin: 2A
|
||||
# INJ1 Q312
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
class: outputs
|
||||
ts_name: 2A - INJ_1
|
||||
function: Injector #1
|
||||
|
@ -14,7 +14,7 @@ pins:
|
|||
color: orange Y1
|
||||
|
||||
- pin: 2B
|
||||
id: GPIOD_12
|
||||
id: D12
|
||||
class: outputs
|
||||
ts_name: 2B - ECF (PWM8)
|
||||
function: Engine Radiator Fan
|
||||
|
@ -22,7 +22,7 @@ pins:
|
|||
type: ls
|
||||
|
||||
- pin: 2C
|
||||
id: GPIOD_9
|
||||
id: D9
|
||||
class: outputs
|
||||
ts_name: 2C - AC Fan / INJ_5
|
||||
function: AC Radiator fan
|
||||
|
@ -30,7 +30,7 @@ pins:
|
|||
|
||||
- pin: 2D
|
||||
#INJ2 Q305
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
class: outputs
|
||||
ts_name: 2D - INJ_2
|
||||
function: Injector #2
|
||||
|
@ -38,14 +38,14 @@ pins:
|
|||
color: blue Y1
|
||||
|
||||
- pin: 2E
|
||||
id: GPIOC_7
|
||||
id: C7
|
||||
class: outputs
|
||||
ts_name: 2E - COIL_A2 (PWM2)
|
||||
function: EGR Valve #1 Coil
|
||||
type: ls
|
||||
|
||||
- pin: 2F
|
||||
id: GPIOC_6
|
||||
id: C6
|
||||
class: outputs
|
||||
ts_name: 2E - COIL_A1 (PWM1)
|
||||
function: EGR Valve #2 Coil
|
||||
|
@ -53,7 +53,7 @@ pins:
|
|||
|
||||
- pin: 2G
|
||||
#INJ3 Q309
|
||||
id: GPIOD_11
|
||||
id: D11
|
||||
class: outputs
|
||||
ts_name: 2G - INJ_3
|
||||
function: Injector #3
|
||||
|
@ -61,14 +61,14 @@ pins:
|
|||
color: white Y1
|
||||
|
||||
- pin: 2H
|
||||
id: GPIOC_9
|
||||
id: C9
|
||||
class: outputs
|
||||
ts_name: 2H - COIL_B2 (PWM4)
|
||||
function: EGR Valve #3 Coil
|
||||
type: ls
|
||||
|
||||
- pin: 2I
|
||||
id: GPIOC_8
|
||||
id: C8
|
||||
class: outputs
|
||||
ts_name: 2I - COIL_B1 (PWM3)
|
||||
function: EGR Valve #4 Coil
|
||||
|
@ -76,7 +76,7 @@ pins:
|
|||
|
||||
- pin: 2J
|
||||
#INJ4 Q310
|
||||
id: GPIOD_10
|
||||
id: D10
|
||||
class: outputs
|
||||
ts_name: 2J - INJ_4
|
||||
function: Injector #4
|
||||
|
@ -84,14 +84,14 @@ pins:
|
|||
color: green Y1
|
||||
|
||||
- pin: 2K
|
||||
id: GPIOH_15
|
||||
id: H15
|
||||
class: outputs
|
||||
ts_name: 2K - AC (O4)
|
||||
function: A/C Relay
|
||||
type: ls
|
||||
|
||||
- pin: 2M
|
||||
id: GPIOG_2
|
||||
id: G2
|
||||
class: outputs
|
||||
ts_name: 2M - FPUMP (O9)
|
||||
function: Fuel Pump Relay
|
||||
|
@ -99,14 +99,14 @@ pins:
|
|||
color: red B4
|
||||
|
||||
- pin: 2N
|
||||
id: GPIOF_12
|
||||
id: F12
|
||||
class: outputs
|
||||
ts_name: 2N - VTSC / INJ_6
|
||||
function: VTCS Control
|
||||
type: inj
|
||||
|
||||
- pin: 2O
|
||||
id: GPIOE_4
|
||||
id: E4
|
||||
class: outputs
|
||||
ts_name: 2O - IGN_3
|
||||
type: ign
|
||||
|
@ -116,7 +116,7 @@ pins:
|
|||
color: red, short wire
|
||||
|
||||
- pin: 2Q
|
||||
id: GPIOD_14
|
||||
id: D14
|
||||
class: outputs
|
||||
ts_name: 2Q - IDLE (PWM5)
|
||||
function: IAC (negative) idle, with diode
|
||||
|
@ -124,7 +124,7 @@ pins:
|
|||
color: blue B4
|
||||
|
||||
- pin: 2R
|
||||
id: GPIOG_4
|
||||
id: G4
|
||||
class: outputs
|
||||
ts_name: 2R - CE (O11)
|
||||
function: MIL Control
|
||||
|
@ -142,28 +142,28 @@ pins:
|
|||
color: black W4, sliced for MAP
|
||||
|
||||
- pin: 3C
|
||||
id: GPIOF_13
|
||||
id: F13
|
||||
class: outputs
|
||||
ts_name: 3C - Purge Solenoid / INJ_7
|
||||
function: Purge Control Solenoid
|
||||
type: inj
|
||||
|
||||
- pin: 3D
|
||||
id: GPIOF_14
|
||||
id: F14
|
||||
class: outputs
|
||||
ts_name: 3D - EGR Solenoid / INJ_8
|
||||
function: EGR Boost sens. sol.
|
||||
type: inj
|
||||
|
||||
- pin: 3E
|
||||
id: GPIOG_3
|
||||
id: G3
|
||||
class: outputs
|
||||
ts_name: 3E - CANIST (O10)
|
||||
function: CDCV (EVAP canister purge valve) Control
|
||||
type: ls
|
||||
|
||||
- pin: 3F
|
||||
id: GPIOI_8
|
||||
id: I8
|
||||
class: outputs
|
||||
ts_name: 3F - IGN_1 (1&4)
|
||||
function: Coil #1
|
||||
|
@ -171,7 +171,7 @@ pins:
|
|||
color: white B4
|
||||
|
||||
- pin: 3H
|
||||
id: GPIOI_2
|
||||
id: I2
|
||||
class: outputs
|
||||
ts_name: 3H - MAIN (O1)
|
||||
function: Main relay control
|
||||
|
@ -179,7 +179,7 @@ pins:
|
|||
color: white or red, R5
|
||||
|
||||
- pin: 3I
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
ts_name: 3I - IGN_2 (2&3)
|
||||
function: Coil #2
|
||||
|
@ -187,7 +187,7 @@ pins:
|
|||
color: orange B4
|
||||
|
||||
- pin: 3J
|
||||
id: GPIOH_14
|
||||
id: H14
|
||||
class: outputs
|
||||
ts_name: 3J - O2H (O3)
|
||||
function: Front O2 sens. heater GND
|
||||
|
@ -197,13 +197,13 @@ pins:
|
|||
function: NC
|
||||
|
||||
- pin: 3L
|
||||
id: [GPIOI_6, EFI_ADC_1]
|
||||
id: [I6, EFI_ADC_1]
|
||||
class: [outputs, analog_inputs]
|
||||
ts_name: 3L - IGN_7 / AFR
|
||||
type: ign
|
||||
|
||||
- pin: 3M
|
||||
id: GPIOD_15
|
||||
id: D15
|
||||
class: outputs
|
||||
ts_name: 3M - ALTERN (PWM6)
|
||||
function: PWM signal to control alternator field voltage
|
||||
|
@ -211,13 +211,13 @@ pins:
|
|||
color: orange R5
|
||||
|
||||
- pin: 3N
|
||||
id: GPIOE_3
|
||||
id: E3
|
||||
class: outputs
|
||||
ts_name: 3N - IGN_4
|
||||
type: ign
|
||||
|
||||
- pin: 3O
|
||||
id: GPIOD_13
|
||||
id: D13
|
||||
class: outputs
|
||||
ts_name: 3O - TACH (PWM7)
|
||||
function: Tach Out
|
||||
|
@ -225,7 +225,7 @@ pins:
|
|||
color: green B4
|
||||
|
||||
- pin: 3P
|
||||
id: GPIOA_9
|
||||
id: A9
|
||||
class: outputs
|
||||
ts_name: 3P - O2H2 (O7)
|
||||
function: Rear O2 sensor heater
|
||||
|
@ -239,21 +239,21 @@ pins:
|
|||
|
||||
- pin: 3T
|
||||
# H144_IN_VSS
|
||||
id: GPIOF_11
|
||||
id: F11
|
||||
class: event_inputs
|
||||
ts_name: 3T - VSS (D5)
|
||||
function: VSS in
|
||||
color: blue W3
|
||||
|
||||
- pin: 3U
|
||||
id: GPIOH_13
|
||||
id: H13
|
||||
class: outputs
|
||||
ts_name: 3U - AWARN (O2)
|
||||
function: Alternator Warning Light
|
||||
type: ls
|
||||
|
||||
- pin: 3V
|
||||
id: [GPIOA_6, EFI_ADC_6]
|
||||
id: [A6, EFI_ADC_6]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 3V - CAM (A19)
|
||||
function: Camshaft Sensor
|
||||
|
@ -266,14 +266,14 @@ pins:
|
|||
function: NC
|
||||
|
||||
- pin: 3Y
|
||||
id: [GPIOB_1, EFI_ADC_9]
|
||||
id: [B1, EFI_ADC_9]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 3Y - CRANK (A24)
|
||||
function: Crankshaft Sensor
|
||||
color: white W3
|
||||
|
||||
- pin: 3Z
|
||||
id: GPIOE_2
|
||||
id: E2
|
||||
class: outputs
|
||||
ts_name: 3Z - IGN_5 / GNDA
|
||||
type: ign
|
||||
|
@ -284,13 +284,13 @@ pins:
|
|||
color: black W4
|
||||
|
||||
- pin: 4B
|
||||
id: [GPIOF_9, ADC3_CHANNEL_7]
|
||||
id: [F9, ADC3_CHANNEL_7]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 4B - Brake/RES1 (A7)
|
||||
function: Brake Switch
|
||||
|
||||
- pin: 4C
|
||||
id: [GPIOF_10, EFI_ADC_3]
|
||||
id: [F10, EFI_ADC_3]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 4C - Steering/RES2 (A16)
|
||||
function: Power Steering Switch
|
||||
|
@ -302,32 +302,32 @@ pins:
|
|||
function: DTM switching (Diagnostic Terminal?)
|
||||
|
||||
- pin: 4F
|
||||
id: [GPIOB_0, EFI_ADC_8]
|
||||
id: [B0, EFI_ADC_8]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 4F - AC_PRES/AUX1 (A23)
|
||||
function: A/C Pressure In
|
||||
|
||||
- pin: 4H
|
||||
id: [GPIOC_4, EFI_ADC_14]
|
||||
id: [C4, EFI_ADC_14]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 4H - Neutral/AUX2 (A21)
|
||||
function: Neutral Switch
|
||||
|
||||
- pin: 4I
|
||||
# H144_IN_RES3
|
||||
id: GPIOF_8
|
||||
id: F8
|
||||
class: switch_inputs
|
||||
ts_name: 4I - Clutch (A8)
|
||||
function: Clutch Switch
|
||||
|
||||
- pin: 4J
|
||||
id: [GPIOA_7, EFI_ADC_7]
|
||||
id: [A7, EFI_ADC_7]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 4J - VTCS/AUX4 (A20)
|
||||
function: VTCS ca. switch
|
||||
|
||||
- pin: 4K
|
||||
id: GPIOI_5
|
||||
id: I5
|
||||
class: outputs
|
||||
ts_name: 4K - IGN_6 / +5V_MAP
|
||||
type: ign
|
||||
|
@ -369,7 +369,7 @@ pins:
|
|||
function: NC
|
||||
|
||||
- pin: 4R
|
||||
id: GPIOI_0
|
||||
id: I0
|
||||
class: outputs
|
||||
ts_name: 4R - VVT (O5)
|
||||
function: VVT Oil Control Valve neg.
|
||||
|
@ -398,7 +398,7 @@ pins:
|
|||
function: Alternator output voltage
|
||||
|
||||
- pin: 4U
|
||||
id: [GPIOI_7, EFI_ADC_11]
|
||||
id: [I7, EFI_ADC_11]
|
||||
class: [outputs, analog_inputs]
|
||||
ts_name: 4U - MAP2/Ign8 (A10)
|
||||
function: NC, extra main relay for diode
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// knock 1 - pin PF7
|
||||
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN5
|
||||
#define KNOCK_PIN_CH1 GPIOF_7
|
||||
#define KNOCK_PIN_CH1 Gpio::F7
|
||||
|
||||
// Sample rate & time - depends on the exact MCU
|
||||
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
#define BOARD_NAME "Hellen81"
|
||||
|
||||
#define EFI_USB_AF 10U
|
||||
#define EFI_USB_SERIAL_DM GPIOA_11
|
||||
#define EFI_USB_SERIAL_DP GPIOA_12
|
||||
#define EFI_USB_SERIAL_DM Gpio::A11
|
||||
#define EFI_USB_SERIAL_DP Gpio::A12
|
||||
|
||||
// Ignore USB VBUS pin (we're never a host, only a device)
|
||||
#define BOARD_OTG_NOVBUSSENS TRUE
|
||||
|
|
|
@ -14,33 +14,33 @@
|
|||
#include "hellen_meta.h"
|
||||
|
||||
static void setInjectorPins() {
|
||||
engineConfiguration->injectionPins[0] = GPIOG_7;
|
||||
engineConfiguration->injectionPins[1] = GPIOG_8;
|
||||
engineConfiguration->injectionPins[2] = GPIOD_11;
|
||||
engineConfiguration->injectionPins[3] = GPIOD_10;
|
||||
engineConfiguration->injectionPins[0] = Gpio::G7;
|
||||
engineConfiguration->injectionPins[1] = Gpio::G8;
|
||||
engineConfiguration->injectionPins[2] = Gpio::D11;
|
||||
engineConfiguration->injectionPins[3] = Gpio::D10;
|
||||
|
||||
//engineConfiguration->injectionPins[4] = GPIOD_9;
|
||||
//engineConfiguration->injectionPins[5] = GPIOF_12;
|
||||
//engineConfiguration->injectionPins[6] = GPIOF_13;
|
||||
//engineConfiguration->injectionPins[7] = GPIOF_14;
|
||||
//engineConfiguration->injectionPins[4] = Gpio::D9;
|
||||
//engineConfiguration->injectionPins[5] = Gpio::F12;
|
||||
//engineConfiguration->injectionPins[6] = Gpio::F13;
|
||||
//engineConfiguration->injectionPins[7] = Gpio::F14;
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
}
|
||||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = GPIOI_8;
|
||||
engineConfiguration->ignitionPins[1] = GPIOE_5;
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_4;
|
||||
engineConfiguration->ignitionPins[3] = GPIOE_3;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::I8;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::E5;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E4;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::E3;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -50,14 +50,14 @@ static void setLedPins() {
|
|||
#ifdef EFI_COMMUNICATION_PIN
|
||||
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
|
||||
#else
|
||||
engineConfiguration->communicationLedPin = GPIOH_10;
|
||||
engineConfiguration->communicationLedPin = Gpio::H10;
|
||||
#endif /* EFI_COMMUNICATION_PIN */
|
||||
|
||||
//!!!!!!!!!!!
|
||||
engineConfiguration->runningLedPin = GPIO_UNASSIGNED;
|
||||
//engineConfiguration->runningLedPin = GPIOH_9; // green
|
||||
engineConfiguration->runningLedPin = Gpio::Unassigned;
|
||||
//engineConfiguration->runningLedPin = Gpio::H9; // green
|
||||
|
||||
engineConfiguration->warningLedPin = GPIOH_11; // yellow
|
||||
engineConfiguration->warningLedPin = Gpio::H11; // yellow
|
||||
}
|
||||
|
||||
static void setupVbatt() {
|
||||
|
@ -76,11 +76,11 @@ static void setupVbatt() {
|
|||
|
||||
static void setupDefaultSensorInputs() {
|
||||
// trigger inputs
|
||||
engineConfiguration->triggerInputPins[0] = GPIOB_1;
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::B1;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
// Direct hall-only cam input
|
||||
engineConfiguration->camInputs[0] = GPIOA_6;
|
||||
engineConfiguration->camInputs[0] = Gpio::A6;
|
||||
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_4;
|
||||
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
|
||||
|
@ -106,8 +106,8 @@ void setBoardConfigOverrides() {
|
|||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
}
|
||||
|
||||
void setSerialConfigurationOverrides() {
|
||||
|
@ -132,20 +132,20 @@ void setBoardDefaultConfiguration() {
|
|||
|
||||
engineConfiguration->isSdCardEnabled = true;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIOG_2; // OUT_IO9
|
||||
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = GPIOI_2; // OUT_LOW3
|
||||
engineConfiguration->tachOutputPin = GPIOD_14; // OUT_PWM6
|
||||
engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
|
||||
engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = Gpio::I2; // OUT_LOW3
|
||||
engineConfiguration->tachOutputPin = Gpio::D14; // OUT_PWM6
|
||||
|
||||
engineConfiguration->useStepperIdle = true;
|
||||
engineConfiguration->useHbridgesToDriveIdleStepper = true;
|
||||
engineConfiguration->stepperDcIo[0].directionPin1 = GPIOC_6; // COIL_A1 = OUT_PWM2
|
||||
engineConfiguration->stepperDcIo[0].directionPin2 = GPIOC_7; // COIL_A2 = OUT_PWM3
|
||||
engineConfiguration->stepperDcIo[1].directionPin1 = GPIOC_8; // COIL_B1 = OUT_PWM4
|
||||
engineConfiguration->stepperDcIo[1].directionPin2 = GPIOC_9; // COIL_B2 = OUT_PWM5
|
||||
engineConfiguration->stepperDcIo[0].directionPin1 = Gpio::C6; // COIL_A1 = OUT_PWM2
|
||||
engineConfiguration->stepperDcIo[0].directionPin2 = Gpio::C7; // COIL_A2 = OUT_PWM3
|
||||
engineConfiguration->stepperDcIo[1].directionPin1 = Gpio::C8; // COIL_B1 = OUT_PWM4
|
||||
engineConfiguration->stepperDcIo[1].directionPin2 = Gpio::C9; // COIL_B2 = OUT_PWM5
|
||||
|
||||
// "required" hardware is done - set some reasonable defaults
|
||||
setupDefaultSensorInputs();
|
||||
|
@ -167,19 +167,19 @@ void setSdCardConfigurationOverrides() {
|
|||
#if 1
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
|
||||
|
||||
engineConfiguration->spi2mosiPin = GPIOB_15;
|
||||
engineConfiguration->spi2misoPin = GPIOB_14;
|
||||
engineConfiguration->spi2sckPin = GPIOB_13;
|
||||
engineConfiguration->sdCardCsPin = GPIOB_12;
|
||||
engineConfiguration->spi2mosiPin = Gpio::B15;
|
||||
engineConfiguration->spi2misoPin = Gpio::B14;
|
||||
engineConfiguration->spi2sckPin = Gpio::B13;
|
||||
engineConfiguration->sdCardCsPin = Gpio::B12;
|
||||
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
#else
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
|
||||
engineConfiguration->spi3mosiPin = GPIOC_12;
|
||||
engineConfiguration->spi3misoPin = GPIOC_11;
|
||||
engineConfiguration->spi3sckPin = GPIOC_10;
|
||||
engineConfiguration->sdCardCsPin = GPIOA_15;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->sdCardCsPin = Gpio::A15;
|
||||
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
#endif
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
pins:
|
||||
- pin: 1
|
||||
function: Ignition 2 Output
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
ts_name: 1 - IGN_2
|
||||
type: ign
|
||||
|
@ -12,7 +12,7 @@ pins:
|
|||
|
||||
- pin: 2
|
||||
function: Ignition 3 (2+3) Output
|
||||
id: GPIOE_4
|
||||
id: E4
|
||||
class: outputs
|
||||
ts_name: 2 - IGN_3
|
||||
type: ign
|
||||
|
@ -25,7 +25,7 @@ pins:
|
|||
|
||||
- pin: 4
|
||||
function: Ignition 4 Output
|
||||
id: GPIOE_3
|
||||
id: E3
|
||||
class: outputs
|
||||
ts_name: 4 - IGN_4
|
||||
type: ign
|
||||
|
@ -33,7 +33,7 @@ pins:
|
|||
|
||||
- pin: 5
|
||||
function: Ignition 1 (1+4) Output
|
||||
id: GPIOI_8
|
||||
id: I8
|
||||
class: outputs
|
||||
ts_name: 5 - IGN_1
|
||||
type: ign
|
||||
|
@ -41,7 +41,7 @@ pins:
|
|||
|
||||
- pin: 6
|
||||
function: Injector 2 Output
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
class: outputs
|
||||
ts_name: 6 - INJ_2
|
||||
type: inj
|
||||
|
@ -49,7 +49,7 @@ pins:
|
|||
|
||||
- pin: 7
|
||||
function: Injector 3 Output
|
||||
id: GPIOD_11
|
||||
id: D11
|
||||
class: outputs
|
||||
ts_name: 7 - INJ_3
|
||||
type: inj
|
||||
|
@ -57,28 +57,28 @@ pins:
|
|||
|
||||
- pin: 8
|
||||
function: Engine Speed (Tachometer) Signal Output (push-pull)
|
||||
id: GPIOD_14
|
||||
id: D14
|
||||
class: outputs
|
||||
ts_name: 8 - OUT_TACH
|
||||
color: green
|
||||
|
||||
- pin: 9
|
||||
function: Fuel Level / CLT Analog Input
|
||||
id: GPIOF_5
|
||||
id: F5
|
||||
class: analog_inputs
|
||||
ts_name: 9 - IN_SENS3
|
||||
color: white
|
||||
|
||||
- pin: 10
|
||||
function: Fuel consumption Output (push-pull) / CLT?
|
||||
id: GPIOD_15
|
||||
id: D15
|
||||
class: outputs
|
||||
ts_name: 10 - OUT_FUEL
|
||||
color: green
|
||||
|
||||
- pin: 11
|
||||
function: Reserved High-side Output (high)
|
||||
id: GPIOH_13
|
||||
id: H13
|
||||
class: outputs
|
||||
ts_name: 11 - OUT_HIGH
|
||||
type: gp_high
|
||||
|
@ -98,7 +98,7 @@ pins:
|
|||
|
||||
- pin: 14
|
||||
function: Main Relay Output
|
||||
id: GPIOI_2
|
||||
id: I2
|
||||
class: outputs
|
||||
ts_name: 14 - OUT_MAIN
|
||||
type: ls
|
||||
|
@ -106,7 +106,7 @@ pins:
|
|||
|
||||
- pin: 15
|
||||
function: Crankshaft Sensor (+) Input
|
||||
id: [GPIOB_1, EFI_ADC_9]
|
||||
id: [B1, EFI_ADC_9]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 15 - IN_CRANK (A24)
|
||||
color: white
|
||||
|
@ -140,7 +140,7 @@ pins:
|
|||
|
||||
- pin: 21
|
||||
function: Ignition 8 Output
|
||||
id: GPIOE_6
|
||||
id: E6
|
||||
class: outputs
|
||||
ts_name: 21 - IGN_8
|
||||
type: ign
|
||||
|
@ -148,7 +148,7 @@ pins:
|
|||
|
||||
- pin: 22
|
||||
function: Ignition 7 Output
|
||||
id: GPIOB_9
|
||||
id: B9
|
||||
class: outputs
|
||||
ts_name: 22 - IGN_7
|
||||
type: ign
|
||||
|
@ -156,7 +156,7 @@ pins:
|
|||
|
||||
- pin: 23
|
||||
function: Ignition 6 Output
|
||||
id: GPIOB_8
|
||||
id: B8
|
||||
class: outputs
|
||||
ts_name: 23 - IGN_6
|
||||
type: ign
|
||||
|
@ -164,7 +164,7 @@ pins:
|
|||
|
||||
- pin: 24
|
||||
function: Ignition 5 Output
|
||||
id: GPIOE_2
|
||||
id: E2
|
||||
class: outputs
|
||||
ts_name: 24 - IGN_5
|
||||
type: ign
|
||||
|
@ -172,7 +172,7 @@ pins:
|
|||
|
||||
- pin: 25
|
||||
function: Injector 6 Output
|
||||
id: GPIOF_12
|
||||
id: F12
|
||||
class: outputs
|
||||
ts_name: 25 - INJ_6
|
||||
type: inj
|
||||
|
@ -184,7 +184,7 @@ pins:
|
|||
|
||||
- pin: 27
|
||||
function: Injector 1 Output
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
class: outputs
|
||||
ts_name: 27 - INJ_1
|
||||
type: inj
|
||||
|
@ -192,7 +192,7 @@ pins:
|
|||
|
||||
- pin: 28
|
||||
function: Oxygen Sensor 2 Heating Output (low)
|
||||
id: GPIOA_9
|
||||
id: A9
|
||||
class: outputs
|
||||
ts_name: 28 - OUT_O2H2
|
||||
type: ls
|
||||
|
@ -204,7 +204,7 @@ pins:
|
|||
|
||||
- pin: 30
|
||||
function: Injector 5 Output
|
||||
id: GPIOD_9
|
||||
id: D9
|
||||
class: outputs
|
||||
ts_name: 30 - INJ_5
|
||||
type: inj
|
||||
|
@ -212,7 +212,7 @@ pins:
|
|||
|
||||
- pin: 31
|
||||
function: CheckEngine Lamp Output (low)
|
||||
id: GPIOG_4
|
||||
id: G4
|
||||
class: outputs
|
||||
ts_name: 31 - OUT_CE
|
||||
type: ls
|
||||
|
@ -293,7 +293,7 @@ pins:
|
|||
|
||||
- pin: 46
|
||||
function: Canister Purge Valve Output (low)
|
||||
id: GPIOG_3
|
||||
id: G3
|
||||
class: outputs
|
||||
ts_name: 46 - OUT_CANIST
|
||||
type: ls
|
||||
|
@ -301,7 +301,7 @@ pins:
|
|||
|
||||
- pin: 47
|
||||
function: Injector 4 Output
|
||||
id: GPIOD_10
|
||||
id: D10
|
||||
class: outputs
|
||||
ts_name: 47 - INJ_4
|
||||
type: inj
|
||||
|
@ -309,7 +309,7 @@ pins:
|
|||
|
||||
- pin: 48
|
||||
function: O2 LSF Heating Output (low)
|
||||
id: GPIOH_14
|
||||
id: H14
|
||||
class: outputs
|
||||
ts_name: 48 - OUT_O2H
|
||||
type: ls
|
||||
|
@ -317,7 +317,7 @@ pins:
|
|||
|
||||
- pin: 49
|
||||
function: Canister heater Output (low)
|
||||
id: GPIOI_1
|
||||
id: I1
|
||||
class: outputs
|
||||
ts_name: 49 - OUT_HEATER
|
||||
type: ls
|
||||
|
@ -325,7 +325,7 @@ pins:
|
|||
|
||||
- pin: 50
|
||||
function: Starter Relay Output (low) / HOTLamp / Idle2(Mikas)
|
||||
id: GPIOI_0
|
||||
id: I0
|
||||
class: outputs
|
||||
ts_name: 50 - OUT_STARTER
|
||||
type: ls
|
||||
|
@ -366,14 +366,14 @@ pins:
|
|||
- pin: 59
|
||||
function: Vehicle Speed Sensor (VSS) digital input
|
||||
# H144_IN_VSS
|
||||
id: GPIOF_11
|
||||
id: F11
|
||||
class: event_inputs
|
||||
ts_name: 59 - IN_VSS
|
||||
color: white
|
||||
|
||||
- pin: 60
|
||||
function: Reserved Push-Pull Output (push-pull)
|
||||
id: GPIOD_13
|
||||
id: D13
|
||||
class: outputs
|
||||
ts_name: 60 - OUT_IO
|
||||
color: green
|
||||
|
@ -392,35 +392,35 @@ pins:
|
|||
|
||||
- pin: 64
|
||||
function: Solenoid B2 output (push-pull) / Stepper A (or D)
|
||||
id: GPIOC_9
|
||||
id: C9
|
||||
class: outputs
|
||||
ts_name: 64 - OUT_COIL_B2
|
||||
color: green
|
||||
|
||||
- pin: 65
|
||||
function: Solenoid B1 output (push-pull) / Stepper D (or C)
|
||||
id: GPIOC_8
|
||||
id: C8
|
||||
class: outputs
|
||||
ts_name: 65 - OUT_COIL_B1
|
||||
color: green
|
||||
|
||||
- pin: 66
|
||||
function: Solenoid A2 output (push-pull) / Stepper C (or B)
|
||||
id: GPIOC_7
|
||||
id: C7
|
||||
class: outputs
|
||||
ts_name: 66 - OUT_COIL_A2
|
||||
color: green
|
||||
|
||||
- pin: 67
|
||||
function: Solenoid A1 output (push-pull) / Stepper B (or A)
|
||||
id: GPIOC_6
|
||||
id: C6
|
||||
class: outputs
|
||||
ts_name: 67 - OUT_COIL_A1
|
||||
color: green
|
||||
|
||||
- pin: 68
|
||||
function: Electric Cooling Fan (ECF) Relay Output (low)
|
||||
id: GPIOD_12
|
||||
id: D12
|
||||
class: outputs
|
||||
ts_name: 68 - OUT_ECF
|
||||
type: ls
|
||||
|
@ -428,7 +428,7 @@ pins:
|
|||
|
||||
- pin: 69
|
||||
function: A/C Relay Output (low)
|
||||
id: GPIOH_15
|
||||
id: H15
|
||||
class: outputs
|
||||
ts_name: 69 - OUT_AC
|
||||
type: ls
|
||||
|
@ -436,7 +436,7 @@ pins:
|
|||
|
||||
- pin: 70
|
||||
function: Fuel Pump Relay Output (low)
|
||||
id: GPIOG_2
|
||||
id: G2
|
||||
class: outputs
|
||||
ts_name: 70 - OUT_PUMP
|
||||
type: ls
|
||||
|
@ -447,7 +447,7 @@ pins:
|
|||
|
||||
- pin: 72
|
||||
function: Injector 7 Output
|
||||
id: GPIOF_13
|
||||
id: F13
|
||||
class: outputs
|
||||
ts_name: 72 - INJ_7
|
||||
type: inj
|
||||
|
@ -455,7 +455,7 @@ pins:
|
|||
|
||||
- pin: 73
|
||||
function: Injector 8 Output
|
||||
id: GPIOF_14
|
||||
id: F14
|
||||
class: outputs
|
||||
ts_name: 73 - INJ_8
|
||||
type: inj
|
||||
|
@ -463,28 +463,28 @@ pins:
|
|||
|
||||
- pin: 74
|
||||
function: Inertia switch (crash detect) Input
|
||||
id: [GPIOB_0, EFI_ADC_8]
|
||||
id: [B0, EFI_ADC_8]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 74 - IN_AUX1
|
||||
color: white
|
||||
|
||||
- pin: 75
|
||||
function: A/C Switch Input
|
||||
id: [GPIOC_4, EFI_ADC_14]
|
||||
id: [C4, EFI_ADC_14]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 75 - IN_AUX2
|
||||
color: white
|
||||
|
||||
- pin: 76
|
||||
function: Power Steering Input
|
||||
id: [GPIOC_5, EFI_ADC_15]
|
||||
id: [C5, EFI_ADC_15]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 76 - IN_AUX3
|
||||
color: white
|
||||
|
||||
- pin: 77
|
||||
function: Clutch switch Input
|
||||
id: [GPIOA_7, EFI_ADC_7]
|
||||
id: [A7, EFI_ADC_7]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 77 - IN_AUX4
|
||||
color: white
|
||||
|
@ -498,7 +498,7 @@ pins:
|
|||
|
||||
- pin: 79
|
||||
function: Cam/Phase Sensor Input
|
||||
id: [GPIOA_6, EFI_ADC_6]
|
||||
id: [A6, EFI_ADC_6]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 79 - IN_CAM
|
||||
color: white
|
||||
|
|
|
@ -24,23 +24,23 @@ static void setInjectorPins() {
|
|||
|
||||
// Disable remainder
|
||||
for (int i = 6; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
}
|
||||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = GPIOC_13;
|
||||
engineConfiguration->ignitionPins[1] = GPIOE_5;
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_4;
|
||||
engineConfiguration->ignitionPins[3] = GPIOE_3;
|
||||
engineConfiguration->ignitionPins[4] = GPIOE_2;
|
||||
engineConfiguration->ignitionPins[5] = GPIOB_8;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::C13;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::E5;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E4;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::E3;
|
||||
engineConfiguration->ignitionPins[4] = Gpio::E2;
|
||||
engineConfiguration->ignitionPins[5] = Gpio::B8;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 6; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -63,8 +63,8 @@ static void setupVbatt() {
|
|||
static void setupDefaultSensorInputs() {
|
||||
// trigger inputs
|
||||
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
// Direct hall-only cam input
|
||||
engineConfiguration->camInputs[0] = H144_IN_CAM;
|
||||
|
||||
|
@ -121,21 +121,21 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->enableSoftwareKnock = true;
|
||||
engineConfiguration->canNbcType = CAN_BUS_NISSAN_VQ;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIOD_12; // OUT_IO9 // 113 Fuel Pump Relay
|
||||
engineConfiguration->fuelPumpPin = Gpio::D12; // OUT_IO9 // 113 Fuel Pump Relay
|
||||
engineConfiguration->idle.solenoidPin = H144_OUT_PWM5;
|
||||
// engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = GPIOG_14; // pin: 111a, OUT_IO3
|
||||
// engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = Gpio::G14; // pin: 111a, OUT_IO3
|
||||
engineConfiguration->tachOutputPin = H144_OUT_PWM7;
|
||||
|
||||
// "required" hardware is done - set some reasonable defaults
|
||||
setupDefaultSensorInputs();
|
||||
|
||||
engineConfiguration->etbIo[0].directionPin1 = GPIOD_15; // out_pwm7
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIOD_14; // out_pwm6
|
||||
engineConfiguration->etbIo[0].controlPin = GPIOD_13; // ETB_EN out_pwm1
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::D15; // out_pwm7
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::D14; // out_pwm6
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::D13; // ETB_EN out_pwm1
|
||||
engineConfiguration->etb_use_two_wires = true;
|
||||
|
||||
// Some sensible defaults for other options
|
||||
|
@ -155,7 +155,7 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
engineConfiguration->injectionMode = IM_SIMULTANEOUS;//IM_BATCH;// IM_SEQUENTIAL;
|
||||
|
||||
engineConfiguration->luaOutputPins[0] = GPIOG_5; // 104 ETB Relay
|
||||
engineConfiguration->luaOutputPins[0] = Gpio::G5; // 104 ETB Relay
|
||||
|
||||
engineConfiguration->throttlePedalUpVoltage = 0.75;
|
||||
engineConfiguration->throttlePedalWOTVoltage = 4.45;
|
||||
|
@ -178,14 +178,14 @@ void setBoardDefaultConfiguration() {
|
|||
void setSdCardConfigurationOverrides() {
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
|
||||
engineConfiguration->spi3mosiPin = GPIOC_12;
|
||||
engineConfiguration->spi3misoPin = GPIOC_11;
|
||||
engineConfiguration->spi3sckPin = GPIOC_10;
|
||||
engineConfiguration->sdCardCsPin = GPIOA_15;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->sdCardCsPin = Gpio::A15;
|
||||
|
||||
// engineConfiguration->spi2mosiPin = GPIOB_15;
|
||||
// engineConfiguration->spi2misoPin = GPIOB_14;
|
||||
// engineConfiguration->spi2sckPin = GPIOB_13;
|
||||
// engineConfiguration->sdCardCsPin = GPIOB_12;
|
||||
// engineConfiguration->spi2mosiPin = Gpio::B15;
|
||||
// engineConfiguration->spi2misoPin = Gpio::B14;
|
||||
// engineConfiguration->spi2sckPin = Gpio::B13;
|
||||
// engineConfiguration->sdCardCsPin = Gpio::B12;
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
}
|
||||
|
|
|
@ -2,40 +2,40 @@
|
|||
|
||||
pins:
|
||||
- pin: 1
|
||||
id: GPIOG_14
|
||||
id: G14
|
||||
class: outputs
|
||||
function: Fuel Pump Relay Output (low)
|
||||
ts_name: 1 - OUT_PUMP
|
||||
|
||||
- pin: 2
|
||||
# H144_OUT_PWM8
|
||||
id: GPIOD_12
|
||||
id: D12
|
||||
class: outputs
|
||||
ts_name: 2 - IdleC
|
||||
|
||||
- pin: 3
|
||||
id: GPIOD_9
|
||||
id: D9
|
||||
function: Injector 5 Output
|
||||
class: outputs
|
||||
ts_name: 3 - INJ_5
|
||||
type: inj
|
||||
|
||||
- pin: 4
|
||||
id: GPIOF_12
|
||||
id: F12
|
||||
function: Injector 6 Output
|
||||
class: outputs
|
||||
ts_name: 4 - INJ_6
|
||||
type: inj
|
||||
|
||||
- pin: 5
|
||||
id: GPIOD_10
|
||||
id: D10
|
||||
function: Injector 4 Output
|
||||
class: outputs
|
||||
ts_name: 5 - INJ_4
|
||||
type: inj
|
||||
|
||||
- pin: 7
|
||||
id: GPIOF_13
|
||||
id: F13
|
||||
function: Injector 7/VVT Output
|
||||
class: outputs
|
||||
ts_name: 7 - INJ_7/VVT
|
||||
|
@ -45,40 +45,40 @@ pins:
|
|||
ts_name: CEL
|
||||
|
||||
- pin: 16
|
||||
id: [GPIOB_1, EFI_ADC_9]
|
||||
id: [B1, EFI_ADC_9]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 16 - CRANK
|
||||
function: Crankshaft Sensor
|
||||
|
||||
- pin: 17
|
||||
id: [GPIOA_6, EFI_ADC_6]
|
||||
id: [A6, EFI_ADC_6]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 17 - CAM
|
||||
function: Camshaft Sensor
|
||||
|
||||
- pin: 23
|
||||
id: GPIOE_3
|
||||
id: E3
|
||||
class: outputs
|
||||
ts_name: 23 - Coil 4
|
||||
function: Coil 4
|
||||
type: ign
|
||||
|
||||
- pin: 24
|
||||
id: GPIOB_8
|
||||
id: B8
|
||||
class: outputs
|
||||
ts_name: 24 - Coil 6
|
||||
function: Coil 6
|
||||
type: ign
|
||||
|
||||
- pin: 25
|
||||
id: GPIOE_2
|
||||
id: E2
|
||||
class: outputs
|
||||
ts_name: 25 - Coil 5
|
||||
function: Coil 5
|
||||
type: ign
|
||||
|
||||
- pin: 27
|
||||
id: GPIOD_3
|
||||
id: D3
|
||||
class: outputs
|
||||
ts_name: 27 - MAIN
|
||||
function: Main relay control
|
||||
|
@ -86,33 +86,33 @@ pins:
|
|||
|
||||
- pin: 29
|
||||
# H144_OUT_PWM5
|
||||
id: GPIOC_9
|
||||
id: C9
|
||||
class: outputs
|
||||
ts_name: 29 - Idle
|
||||
|
||||
- pin: 31
|
||||
id: GPIOD_11
|
||||
id: D11
|
||||
function: Injector 3 Output
|
||||
class: outputs
|
||||
ts_name: 31 - INJ_3
|
||||
type: inj
|
||||
|
||||
- pin: 32
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
function: Injector 2 Output
|
||||
class: outputs
|
||||
ts_name: 32 - INJ_2
|
||||
type: inj
|
||||
|
||||
- pin: 33
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
function: Injector 1 Output
|
||||
class: outputs
|
||||
ts_name: 33 - INJ_1
|
||||
type: inj
|
||||
|
||||
- pin: 35
|
||||
id: GPIOF_14
|
||||
id: F14
|
||||
function: Injector 8 Output
|
||||
class: outputs
|
||||
ts_name: 35 - INJ_8
|
||||
|
@ -126,12 +126,12 @@ pins:
|
|||
|
||||
- pin: 47
|
||||
# H144_OUT_PWM7
|
||||
id: GPIOD_15
|
||||
id: D15
|
||||
class: outputs
|
||||
ts_name: 47 - Tach
|
||||
|
||||
- pin: 50
|
||||
id: GPIOC_13
|
||||
id: C13
|
||||
class: outputs
|
||||
ts_name: 50 - Coil 1
|
||||
function: Coil 1
|
||||
|
@ -139,14 +139,14 @@ pins:
|
|||
|
||||
|
||||
- pin: 51
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
ts_name: 51 - Coil 2
|
||||
function: Coil 2
|
||||
type: ign
|
||||
|
||||
- pin: 52
|
||||
id: GPIOE_4
|
||||
id: E4
|
||||
class: outputs
|
||||
ts_name: 52 - Coil 3
|
||||
function: Coil 3
|
||||
|
|
|
@ -22,12 +22,12 @@ static void setInjectorPins() {
|
|||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->clutchDownPin = GPIOC_4; // Clutch switch input
|
||||
engineConfiguration->clutchDownPin = Gpio::C4; // Clutch switch input
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
|
||||
engineConfiguration->malfunctionIndicatorPin = H144_OUT_IO8;
|
||||
|
@ -35,13 +35,13 @@ static void setInjectorPins() {
|
|||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[2] = H144_IGN_2;
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -65,8 +65,8 @@ static void setupDefaultSensorInputs() {
|
|||
// trigger inputs, hall
|
||||
engineConfiguration->triggerInputPins[0] = H144_IN_CAM;
|
||||
engineConfiguration->triggerInputPins[1] = H144_IN_CRANK;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->camInputs[0] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_4;
|
||||
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
|
||||
|
@ -92,13 +92,13 @@ void setBoardConfigOverrides() {
|
|||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
|
||||
engineConfiguration->etb_use_two_wires = true;
|
||||
engineConfiguration->etbIo[0].directionPin1 = GPIOC_7; // PWM 3
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIOC_8; // PWM 4
|
||||
engineConfiguration->etbIo[0].controlPin = GPIOC_6; // PWM 2
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::C7; // PWM 3
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::C8; // PWM 4
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::C6; // PWM 2
|
||||
}
|
||||
|
||||
void setSerialConfigurationOverrides() {
|
||||
|
@ -128,10 +128,10 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->boostControlPin = H144_LS_6;
|
||||
engineConfiguration->acSwitch = H144_IN_D_AUX3;
|
||||
engineConfiguration->acRelayPin = H144_OUT_IO6;
|
||||
engineConfiguration->fuelPumpPin = GPIOG_2; // OUT_IO9
|
||||
engineConfiguration->idle.solenoidPin = GPIOD_14; // OUT_PWM5
|
||||
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = GPIOI_2; // OUT_LOW3
|
||||
engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
|
||||
engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
|
||||
engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
|
||||
engineConfiguration->mainRelayPin = Gpio::I2; // OUT_LOW3
|
||||
engineConfiguration->tachOutputPin = H144_OUT_PWM1;
|
||||
engineConfiguration->alternatorControlPin = H144_OUT_PWM7;
|
||||
engineConfiguration->fan2Pin = H144_OUT_IO2;
|
||||
|
@ -149,7 +149,7 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->clutchDownPin = H144_IN_D_2;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
|
||||
// ? engineConfiguration->malfunctionIndicatorPin = GPIOG_4; //1E - Check Engine Light
|
||||
// ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd ..
|
||||
bash ../common_make.sh hellen/hellen-nb1 ARCH_STM32F4
|
||||
bash ../common_make.sh hellen/hellenNA8_96 ARCH_STM32F4
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
|
||||
pins:
|
||||
- pin: 1A
|
||||
id: GPIOD_12
|
||||
id: D12
|
||||
class: outputs
|
||||
ts_name: 1A - ECF
|
||||
function: Engine Radiator Fan
|
||||
type: ls
|
||||
|
||||
- pin: 1B
|
||||
id: GPIOA_9
|
||||
id: A9
|
||||
class: outputs
|
||||
ts_name: 1B - AC Fan Relay
|
||||
function: AC Fan Relay
|
||||
|
@ -22,14 +22,14 @@ pins:
|
|||
type: can
|
||||
|
||||
- pin: 1E
|
||||
id: GPIOG_4
|
||||
id: G4
|
||||
class: outputs
|
||||
ts_name: 1E - Check Engine Light
|
||||
function: Check Engine Light
|
||||
type: ls
|
||||
|
||||
- pin: 1G
|
||||
id: GPIOG_11
|
||||
id: G11
|
||||
class: outputs
|
||||
ts_name: 1G - AC Relay
|
||||
function: A/C Relay
|
||||
|
@ -40,20 +40,20 @@ pins:
|
|||
type: ls
|
||||
|
||||
- pin: 1K
|
||||
id: [GPIOC_5, EFI_ADC_15]
|
||||
id: [C5, EFI_ADC_15]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 1K - AC Switch
|
||||
function: A/C Pressure In
|
||||
|
||||
- pin: 1L
|
||||
id: GPIOE_13
|
||||
id: E13
|
||||
class: switch_inputs
|
||||
ts_name: 1L - Clutch
|
||||
function: Clutch Switch
|
||||
|
||||
- pin: 1M
|
||||
# H144_IN_VSS
|
||||
id: GPIOF_11
|
||||
id: F11
|
||||
class: event_inputs
|
||||
ts_name: 1M - VSS
|
||||
function: VSS in
|
||||
|
@ -62,26 +62,26 @@ pins:
|
|||
function: GND
|
||||
|
||||
- pin: 1Q
|
||||
id: [GPIOF_9, ADC3_CHANNEL_7]
|
||||
id: [F9, ADC3_CHANNEL_7]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 1Q - Brake/RES1
|
||||
function: Brake Switch
|
||||
|
||||
- pin: 1S
|
||||
id: GPIOF_7
|
||||
id: F7
|
||||
class: analog_inputs
|
||||
ts_name: 2M - KNOCK
|
||||
function: Knock sens. in
|
||||
|
||||
- pin: 1U
|
||||
id: GPIOG_2
|
||||
id: G2
|
||||
class: outputs
|
||||
ts_name: 1U - Fuel Pump
|
||||
function: Fuel Pump Relay
|
||||
type: ls
|
||||
|
||||
- pin: 2A
|
||||
id: [GPIOB_0, EFI_ADC_8]
|
||||
id: [B0, EFI_ADC_8]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 2A - Pressure Input
|
||||
function: FTP input
|
||||
|
@ -99,7 +99,7 @@ pins:
|
|||
function: Front O2 Sensor Signal
|
||||
|
||||
- pin: 2D
|
||||
id: GPIOF_3
|
||||
id: F3
|
||||
class: switch_inputs
|
||||
ts_name: 2D - O2S2
|
||||
function: Rear O2 Sensor Signal
|
||||
|
@ -150,13 +150,13 @@ pins:
|
|||
ts_name: intMAP
|
||||
|
||||
- pin: 3F
|
||||
id: [GPIOB_1, EFI_ADC_9]
|
||||
id: [B1, EFI_ADC_9]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 3F - CRANK
|
||||
function: Crankshaft Sensor
|
||||
|
||||
- pin: 3G
|
||||
id: [GPIOA_6, EFI_ADC_6]
|
||||
id: [A6, EFI_ADC_6]
|
||||
class: [event_inputs, analog_inputs]
|
||||
ts_name: 3G - CAM
|
||||
function: Camshaft Sensor
|
||||
|
@ -165,69 +165,69 @@ pins:
|
|||
function: +12V
|
||||
|
||||
- pin: 3L
|
||||
id: GPIOD_13
|
||||
id: D13
|
||||
class: outputs
|
||||
ts_name: 3L - TACH
|
||||
function: Tach Out
|
||||
type: ls
|
||||
|
||||
- pin: 3N
|
||||
id: GPIOC_13
|
||||
id: C13
|
||||
class: outputs
|
||||
ts_name: 3N - IGN_1 (1&4)
|
||||
function: Coil #1
|
||||
type: ign
|
||||
|
||||
- pin: 3Q
|
||||
id: GPIOD_14
|
||||
id: D14
|
||||
class: outputs
|
||||
ts_name: 3Q - IDLE
|
||||
function: IAC (negative), with diode
|
||||
type: ls
|
||||
|
||||
- pin: 3R
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
ts_name: 3R - IGN_2 (2&3)
|
||||
function: Coil #2
|
||||
type: ign
|
||||
|
||||
- pin: 3S
|
||||
id: [GPIOA_7, EFI_ADC_7]
|
||||
id: [A7, EFI_ADC_7]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 3S - EGR BOOST IN
|
||||
function: EGR BOOST
|
||||
|
||||
- pin: 3U
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
class: outputs
|
||||
ts_name: 3U - INJ_1
|
||||
function: Injector #1
|
||||
type: inj
|
||||
|
||||
- pin: 3V
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
class: outputs
|
||||
ts_name: 3V - INJ_2
|
||||
function: Injector #2
|
||||
type: inj
|
||||
|
||||
- pin: 3W
|
||||
id: GPIOD_11
|
||||
id: D11
|
||||
class: outputs
|
||||
ts_name: 3W - INJ_3
|
||||
function: Injector #3
|
||||
type: inj
|
||||
|
||||
- pin: 3X
|
||||
id: GPIOD_10
|
||||
id: D10
|
||||
class: outputs
|
||||
ts_name: 3X - INJ_4
|
||||
function: Injector #4
|
||||
type: inj
|
||||
|
||||
- pin: 3Z
|
||||
id: GPIOG_13
|
||||
id: G13
|
||||
class: outputs
|
||||
ts_name: 3Z - O2H2
|
||||
function: Rear O2 sensor heater
|
||||
|
@ -237,26 +237,26 @@ pins:
|
|||
function: GND
|
||||
|
||||
- pin: 4B
|
||||
id: GPIOE_12
|
||||
id: E12
|
||||
class: event_inputs
|
||||
ts_name: 4B - DIGITAL/FLEX
|
||||
function: DIGITAL
|
||||
|
||||
- pin: 4C
|
||||
id: [GPIOC_4, EFI_ADC_14]
|
||||
id: [C4, EFI_ADC_14]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: 4C - IN TEMP/PPS2
|
||||
function: TEMP OR PPS2
|
||||
|
||||
- pin: 4D
|
||||
id: GPIOF_12
|
||||
id: F12
|
||||
class: outputs
|
||||
ts_name: 4D - BOOST OUT
|
||||
function: BOOST OUT
|
||||
type: inj
|
||||
|
||||
- pin: 4E
|
||||
id: GPIOD_9
|
||||
id: D9
|
||||
class: outputs
|
||||
ts_name: 4E - VVT
|
||||
function: VVT Oil Control Valve neg.
|
||||
|
@ -284,27 +284,27 @@ pins:
|
|||
function: WBO
|
||||
|
||||
- pin: int_pps1
|
||||
id: [GPIOA_3, EFI_ADC_3]
|
||||
id: [A3, EFI_ADC_3]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: PPS1
|
||||
|
||||
- pin: int_tps2
|
||||
id: [GPIOA_1, EFI_ADC_1]
|
||||
id: [A1, EFI_ADC_1]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: TPS1
|
||||
|
||||
- pin: int_etb+
|
||||
id: GPIOC_7
|
||||
id: C7
|
||||
class: outputs
|
||||
ts_name: ETB +
|
||||
|
||||
- pin: int_etb-
|
||||
id: GPIOC_8
|
||||
id: C8
|
||||
class: outputs
|
||||
ts_name: ETB -
|
||||
|
||||
- pin: int_etb_EN
|
||||
id: GPIOC_6
|
||||
id: C6
|
||||
class: outputs
|
||||
ts_name: ETB EN
|
||||
|
||||
|
|
|
@ -22,16 +22,16 @@
|
|||
*
|
||||
* The math proof:
|
||||
* - Charging formula #1:
|
||||
* Vt = Vññ * (1 - exp(-Tc1 / RC))
|
||||
* Vt = V<EFBFBD><EFBFBD> * (1 - exp(-Tc1 / RC))
|
||||
* - Discharging formula:
|
||||
* Vl = Vt * exp(-Td / RC)
|
||||
* - Charging formula #2:
|
||||
* Vl = Vññ * (1 - exp(-Tl / (RC)))
|
||||
* Vl = V<EFBFBD><EFBFBD> * (1 - exp(-Tl / (RC)))
|
||||
* - Where Tl is a charging time from 0 to Vl:
|
||||
* Tl = Tc1 - Tc2
|
||||
* - Solve the equations:
|
||||
* Vl = Vññ * (1 - exp(-Tl / RC)) = Vt * exp(-Td / RC)
|
||||
* Vññ * (1 - exp(-Tl / RC)) = Vññ * (1 - exp(-Tc1 / RC)) * exp(-Td / RC)
|
||||
* Vl = V<EFBFBD><EFBFBD> * (1 - exp(-Tl / RC)) = Vt * exp(-Td / RC)
|
||||
* V<EFBFBD><EFBFBD> * (1 - exp(-Tl / RC)) = V<EFBFBD><EFBFBD> * (1 - exp(-Tc1 / RC)) * exp(-Td / RC)
|
||||
* (1 - exp(-Tl / RC)) = (1 - exp(-Tc1 / RC)) * exp(-Td / RC)
|
||||
* - Simplify the equation:
|
||||
* X = exp(-1/(RC))
|
||||
|
@ -312,9 +312,9 @@ int detectHellenBoardId() {
|
|||
efiPrintf("Starting Hellen Board ID detection...");
|
||||
efitick_t beginNt = getTimeNowNt();
|
||||
|
||||
// Hellen boards use GPIOF_0 and GPIOF_1.
|
||||
// Hellen boards use Gpio::F0 and Gpio::F1.
|
||||
const int numPins = 2;
|
||||
brain_pin_e rPins[numPins] = { GPIOF_0, GPIOF_1 };
|
||||
Gpio rPins[numPins] = { Gpio::F0, Gpio::F1 };
|
||||
|
||||
// We start from the estimated capacitance, but the real one can be +-10%
|
||||
float C = HELLEN_BOARD_ID_CAPACITOR;
|
||||
|
|
|
@ -26,10 +26,10 @@ void setHellen176LedPins() {
|
|||
#ifdef EFI_COMMUNICATION_PIN
|
||||
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
|
||||
#else
|
||||
engineConfiguration->communicationLedPin = GPIOH_10;
|
||||
engineConfiguration->communicationLedPin = Gpio::H10;
|
||||
#endif /* EFI_COMMUNICATION_PIN */
|
||||
engineConfiguration->runningLedPin = GPIOH_9; // green
|
||||
engineConfiguration->warningLedPin = GPIOH_11; // yellow
|
||||
engineConfiguration->runningLedPin = Gpio::H9; // green
|
||||
engineConfiguration->warningLedPin = Gpio::H11; // yellow
|
||||
}
|
||||
|
||||
// this should be called before setHellenXXXLedPins()
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// knock 1 - pin PF7
|
||||
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN5
|
||||
#define KNOCK_PIN_CH1 GPIOF_7
|
||||
#define KNOCK_PIN_CH1 Gpio::F7
|
||||
|
||||
// Sample rate & time - depends on the exact MCU
|
||||
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84
|
||||
|
|
|
@ -17,72 +17,72 @@ int detectHellenBoardId();
|
|||
void detectHellenBoardType();
|
||||
|
||||
// stm32 UART8
|
||||
#define H144_UART1_RX GPIOE_0
|
||||
#define H144_UART1_TX GPIOE_1
|
||||
#define H144_UART1_RX Gpio::E0
|
||||
#define H144_UART1_TX Gpio::E1
|
||||
|
||||
// stm32 UART2
|
||||
#define H144_UART2_RX GPIOD_6
|
||||
#define H144_UART2_TX GPIOD_5
|
||||
#define H144_UART2_RX Gpio::D6
|
||||
#define H144_UART2_TX Gpio::D5
|
||||
|
||||
#define H144_LED1_RED GPIOG_0
|
||||
#define H144_LED2 GPIOG_1
|
||||
#define H144_LED3 GPIOE_7
|
||||
#define H144_LED4 GPIOE_8
|
||||
#define H144_LED1_RED Gpio::G0
|
||||
#define H144_LED2 Gpio::G1
|
||||
#define H144_LED3 Gpio::E7
|
||||
#define H144_LED4 Gpio::E8
|
||||
|
||||
#define H176_LED1_RED GPIOH_8
|
||||
#define H176_LED1_RED Gpio::H8
|
||||
|
||||
#define H144_LS_1 GPIOG_7
|
||||
#define H144_LS_2 GPIOG_8
|
||||
#define H144_LS_3 GPIOD_11
|
||||
#define H144_LS_4 GPIOD_10
|
||||
#define H144_LS_5 GPIOD_9
|
||||
#define H144_LS_6 GPIOF_12
|
||||
#define H144_LS_7 GPIOF_13
|
||||
#define H144_LS_8 GPIOF_14
|
||||
#define H144_LS_1 Gpio::G7
|
||||
#define H144_LS_2 Gpio::G8
|
||||
#define H144_LS_3 Gpio::D11
|
||||
#define H144_LS_4 Gpio::D10
|
||||
#define H144_LS_5 Gpio::D9
|
||||
#define H144_LS_6 Gpio::F12
|
||||
#define H144_LS_7 Gpio::F13
|
||||
#define H144_LS_8 Gpio::F14
|
||||
|
||||
#define H144_IGN_1 GPIOC_13
|
||||
#define H144_IGN_2 GPIOE_5
|
||||
#define H144_IGN_3 GPIOE_4
|
||||
#define H144_IGN_4 GPIOE_3
|
||||
#define H144_IGN_5 GPIOE_2
|
||||
#define H144_IGN_6 GPIOB_8
|
||||
#define H144_IGN_1 Gpio::C13
|
||||
#define H144_IGN_2 Gpio::E5
|
||||
#define H144_IGN_3 Gpio::E4
|
||||
#define H144_IGN_4 Gpio::E3
|
||||
#define H144_IGN_5 Gpio::E2
|
||||
#define H144_IGN_6 Gpio::B8
|
||||
|
||||
#define H144_OUT_PWM1 GPIOD_13
|
||||
#define H144_OUT_PWM2 GPIOC_6
|
||||
#define H144_OUT_PWM3 GPIOC_7
|
||||
#define H144_OUT_PWM4 GPIOC_8
|
||||
#define H144_OUT_PWM5 GPIOC_9
|
||||
#define H144_OUT_PWM6 GPIOD_14
|
||||
#define H144_OUT_PWM7 GPIOD_15
|
||||
#define H144_OUT_PWM8 GPIOD_12
|
||||
#define H144_OUT_PWM1 Gpio::D13
|
||||
#define H144_OUT_PWM2 Gpio::C6
|
||||
#define H144_OUT_PWM3 Gpio::C7
|
||||
#define H144_OUT_PWM4 Gpio::C8
|
||||
#define H144_OUT_PWM5 Gpio::C9
|
||||
#define H144_OUT_PWM6 Gpio::D14
|
||||
#define H144_OUT_PWM7 Gpio::D15
|
||||
#define H144_OUT_PWM8 Gpio::D12
|
||||
|
||||
|
||||
// also IO1/IO5 on rev 0.6
|
||||
#define H144_GP1 GPIOD_4
|
||||
#define H144_GP1 Gpio::D4
|
||||
// also IO2/IO5 on rev 0.6
|
||||
#define H144_GP2 GPIOD_7
|
||||
#define H144_GP2 Gpio::D7
|
||||
|
||||
|
||||
#define H144_OUT_IO1 GPIOD_3
|
||||
#define H144_OUT_IO2 GPIOA_9
|
||||
#define H144_OUT_IO3 GPIOG_14
|
||||
#define H144_OUT_IO4 GPIOG_5
|
||||
#define H144_OUT_IO5 GPIOD_2
|
||||
#define H144_OUT_IO6 GPIOG_11
|
||||
#define H144_OUT_IO7 GPIOG_3
|
||||
#define H144_OUT_IO8 GPIOG_4
|
||||
#define H144_OUT_IO9 GPIOG_13
|
||||
#define H144_OUT_IO10 GPIOG_12
|
||||
#define H144_OUT_IO11 GPIOG_2
|
||||
#define H144_OUT_IO12 GPIOA_8
|
||||
#define H144_OUT_IO13 GPIOG_6
|
||||
#define H144_OUT_IO1 Gpio::D3
|
||||
#define H144_OUT_IO2 Gpio::A9
|
||||
#define H144_OUT_IO3 Gpio::G14
|
||||
#define H144_OUT_IO4 Gpio::G5
|
||||
#define H144_OUT_IO5 Gpio::D2
|
||||
#define H144_OUT_IO6 Gpio::G11
|
||||
#define H144_OUT_IO7 Gpio::G3
|
||||
#define H144_OUT_IO8 Gpio::G4
|
||||
#define H144_OUT_IO9 Gpio::G13
|
||||
#define H144_OUT_IO10 Gpio::G12
|
||||
#define H144_OUT_IO11 Gpio::G2
|
||||
#define H144_OUT_IO12 Gpio::A8
|
||||
#define H144_OUT_IO13 Gpio::G6
|
||||
|
||||
// A24
|
||||
#define H144_IN_CRANK GPIOB_1
|
||||
#define H144_IN_CRANK Gpio::B1
|
||||
// A19
|
||||
#define H144_IN_CAM GPIOA_6
|
||||
#define H144_IN_CAM Gpio::A6
|
||||
// DIN5
|
||||
#define H144_IN_VSS GPIOF_11
|
||||
#define H144_IN_VSS Gpio::F11
|
||||
|
||||
// IN_CLT AIN11 PC2
|
||||
#define H144_IN_CLT EFI_ADC_12
|
||||
|
@ -104,13 +104,13 @@ void detectHellenBoardType();
|
|||
#define H144_IN_MAP3 EFI_ADC_2
|
||||
|
||||
// AIN7
|
||||
#define H144_IN_RES1 GPIOF_9
|
||||
#define H144_IN_RES1 Gpio::F9
|
||||
|
||||
// AIN16
|
||||
#define H144_IN_RES2 GPIOF_10
|
||||
#define H144_IN_RES2 Gpio::F10
|
||||
|
||||
// AIN8
|
||||
#define H144_IN_RES3 GPIOF_8
|
||||
#define H144_IN_RES3 Gpio::F8
|
||||
|
||||
|
||||
#define H144_IN_AUX1 EFI_ADC_8
|
||||
|
@ -123,55 +123,55 @@ void detectHellenBoardType();
|
|||
#define H144_IN_AUX4 EFI_ADC_7
|
||||
|
||||
// A1 AIN1 no code to use ADC3 as analog
|
||||
#define H144_IN_SENS1 GPIOF_3
|
||||
#define H144_IN_SENS1 Gpio::F3
|
||||
// A2 AIN2 no code to use ADC3 as analog
|
||||
#define H144_IN_SENS2 GPIOF_4
|
||||
#define H144_IN_SENS2 Gpio::F4
|
||||
// A3 AIN3 no code to use ADC3 as analog
|
||||
#define H144_IN_SENS3 GPIOF_5
|
||||
#define H144_IN_SENS3 Gpio::F5
|
||||
// A4 AIN4 no code to use ADC3 as analog
|
||||
#define H144_IN_SENS4 GPIOF_6
|
||||
#define H144_IN_SENS4 Gpio::F6
|
||||
|
||||
// IN_O2S AIN13 A13 PA0
|
||||
#define H144_IN_O2S EFI_ADC_0
|
||||
// IN_O2S2 AIN12 PA1
|
||||
#define H144_IN_O2S2 EFI_ADC_1
|
||||
|
||||
#define H144_IN_D_1 GPIOE_12
|
||||
#define H144_IN_D_2 GPIOE_13
|
||||
#define H144_IN_D_3 GPIOE_14
|
||||
#define H144_IN_D_4 GPIOE_15
|
||||
#define H144_IN_D_1 Gpio::E12
|
||||
#define H144_IN_D_2 Gpio::E13
|
||||
#define H144_IN_D_3 Gpio::E14
|
||||
#define H144_IN_D_4 Gpio::E15
|
||||
|
||||
// A22
|
||||
#define H144_IN_D_AUX3 GPIOC_5
|
||||
#define H144_IN_D_AUX3 Gpio::C5
|
||||
// A20 AIN20
|
||||
#define H144_IN_D_AUX4 GPIOA_7
|
||||
#define H144_IN_D_AUX4 Gpio::A7
|
||||
|
||||
#define H176_LS_1 GPIOG_7
|
||||
#define H176_LS_2 GPIOG_8
|
||||
#define H176_LS_3 GPIOD_11
|
||||
#define H176_LS_4 GPIOD_10
|
||||
#define H176_LS_5 GPIOD_9
|
||||
#define H176_LS_6 GPIOF_12
|
||||
#define H176_LS_7 GPIOF_13
|
||||
#define H176_LS_8 GPIOF_14
|
||||
#define H176_LS_1 Gpio::G7
|
||||
#define H176_LS_2 Gpio::G8
|
||||
#define H176_LS_3 Gpio::D11
|
||||
#define H176_LS_4 Gpio::D10
|
||||
#define H176_LS_5 Gpio::D9
|
||||
#define H176_LS_6 Gpio::F12
|
||||
#define H176_LS_7 Gpio::F13
|
||||
#define H176_LS_8 Gpio::F14
|
||||
|
||||
#define H176_OUT_PWM1 GPIOD_13
|
||||
#define H176_OUT_PWM2 GPIOC_6
|
||||
#define H176_OUT_PWM3 GPIOC_7
|
||||
#define H176_OUT_PWM1 Gpio::D13
|
||||
#define H176_OUT_PWM2 Gpio::C6
|
||||
#define H176_OUT_PWM3 Gpio::C7
|
||||
|
||||
#define H176_OUT_IO6 GPIOH_15
|
||||
#define H176_OUT_IO9 GPIOI_1
|
||||
#define H176_OUT_IO10 GPIOI_0
|
||||
#define H176_OUT_IO6 Gpio::H15
|
||||
#define H176_OUT_IO9 Gpio::I1
|
||||
#define H176_OUT_IO10 Gpio::I0
|
||||
|
||||
// same pins 144 and 176
|
||||
#define H176_CAN_RX GPIOD_0
|
||||
#define H176_CAN_TX GPIOD_1
|
||||
#define H176_CAN_RX Gpio::D0
|
||||
#define H176_CAN_TX Gpio::D1
|
||||
|
||||
#define H176_IN_A16 GPIOF_10
|
||||
#define H176_IN_A16 Gpio::F10
|
||||
|
||||
|
||||
// looks like same pins 144 and 176
|
||||
#define H_SPI2_MOSI GPIOB_15
|
||||
#define H_SPI2_MISO GPIOB_14
|
||||
#define H_SPI2_SCK GPIOB_13
|
||||
#define H_SPI2_CS GPIOB_12
|
||||
#define H_SPI2_MOSI Gpio::B15
|
||||
#define H_SPI2_MISO Gpio::B14
|
||||
#define H_SPI2_SCK Gpio::B13
|
||||
#define H_SPI2_CS Gpio::B12
|
||||
|
|
|
@ -5,10 +5,10 @@ set PROJECT_BOARD=microrusefi
|
|||
set PROJECT_CPU=ARCH_STM32F7
|
||||
|
||||
set VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=BMW_M73_F
|
||||
set LED_CRITICAL_ERROR_BRAIN_PIN = -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOB_14
|
||||
set LED_CRITICAL_ERROR_BRAIN_PIN = -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::B14
|
||||
|
||||
set EXTRA_PARAMS=-DDUMMY ^
|
||||
-DEFI_COMMUNICATION_PIN=GPIOB_7
|
||||
-DEFI_COMMUNICATION_PIN=Gpio::B7
|
||||
|
||||
call config/boards/common_make.bat
|
||||
|
||||
|
|
|
@ -13,13 +13,13 @@ else
|
|||
endif
|
||||
|
||||
ifeq ($(LED_CRITICAL_ERROR_BRAIN_PIN),)
|
||||
LED_CRITICAL_ERROR_BRAIN_PIN = -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOE_3
|
||||
LED_CRITICAL_ERROR_BRAIN_PIN = -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::E3
|
||||
endif
|
||||
|
||||
|
||||
# *TEMPORARY* breaking TTL thus breaking Bluetooth for microRusEFI in order to enable SPI3 for SD card
|
||||
# *TODO* need to give people the horrible choice between Bluetooth via TTL or SD card via SPI :( horrible choice
|
||||
EFI_CONSOLE_TTL_PINS = -DEFI_CONSOLE_TX_BRAIN_PIN=GPIOB_10 -DEFI_CONSOLE_RX_BRAIN_PIN=GPIOB_11
|
||||
EFI_CONSOLE_TTL_PINS = -DEFI_CONSOLE_TX_BRAIN_PIN=Gpio::B10 -DEFI_CONSOLE_RX_BRAIN_PIN=Gpio::B11
|
||||
|
||||
DDEFS += -DEFI_CAN_SERIAL=TRUE
|
||||
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
#include "mre_meta.h"
|
||||
|
||||
static void setInjectorPins() {
|
||||
engineConfiguration->injectionPins[0] = TLE8888_PIN_1;
|
||||
engineConfiguration->injectionPins[1] = TLE8888_PIN_2;
|
||||
engineConfiguration->injectionPins[2] = TLE8888_PIN_3;
|
||||
engineConfiguration->injectionPins[3] = TLE8888_PIN_4;
|
||||
engineConfiguration->injectionPins[0] = Gpio::TLE8888_PIN_1;
|
||||
engineConfiguration->injectionPins[1] = Gpio::TLE8888_PIN_2;
|
||||
engineConfiguration->injectionPins[2] = Gpio::TLE8888_PIN_3;
|
||||
engineConfiguration->injectionPins[3] = Gpio::TLE8888_PIN_4;
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
|
@ -37,14 +37,14 @@ static void setInjectorPins() {
|
|||
|
||||
static void setIgnitionPins() {
|
||||
// todo: I wonder if these are not right in light of the network rename and the +12 VP issue?
|
||||
engineConfiguration->ignitionPins[0] = GPIOD_4;
|
||||
engineConfiguration->ignitionPins[1] = GPIOD_3;
|
||||
engineConfiguration->ignitionPins[2] = GPIOD_2;
|
||||
engineConfiguration->ignitionPins[3] = GPIOD_1;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::D4;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::D3;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::D2;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::D1;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -54,10 +54,10 @@ static void setLedPins() {
|
|||
#ifdef EFI_COMMUNICATION_PIN
|
||||
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
|
||||
#else
|
||||
engineConfiguration->communicationLedPin = GPIOE_2; // d23 = blue
|
||||
engineConfiguration->communicationLedPin = Gpio::E2; // d23 = blue
|
||||
#endif /* EFI_COMMUNICATION_PIN */
|
||||
engineConfiguration->runningLedPin = GPIOE_4; // d22 = green
|
||||
engineConfiguration->warningLedPin = GPIOE_1; // d27 = orange or yellow
|
||||
engineConfiguration->runningLedPin = Gpio::E4; // d22 = green
|
||||
engineConfiguration->warningLedPin = Gpio::E1; // d27 = orange or yellow
|
||||
}
|
||||
|
||||
static void setupVbatt() {
|
||||
|
@ -86,12 +86,12 @@ static void setupTle8888() {
|
|||
engineConfiguration->is_enabled_spi_1 = true;
|
||||
|
||||
// Wire up spi1
|
||||
engineConfiguration->spi1mosiPin = GPIOB_5;
|
||||
engineConfiguration->spi1misoPin = GPIOB_4;
|
||||
engineConfiguration->spi1sckPin = GPIOB_3;
|
||||
engineConfiguration->spi1mosiPin = Gpio::B5;
|
||||
engineConfiguration->spi1misoPin = Gpio::B4;
|
||||
engineConfiguration->spi1sckPin = Gpio::B3;
|
||||
|
||||
// Chip select
|
||||
engineConfiguration->tle8888_cs = GPIOD_5;
|
||||
engineConfiguration->tle8888_cs = Gpio::D5;
|
||||
|
||||
// SPI device
|
||||
engineConfiguration->tle8888spiDevice = SPI_DEVICE_1;
|
||||
|
@ -105,13 +105,13 @@ static void setupEtb() {
|
|||
// DIS - disables motor (enable low)
|
||||
|
||||
// PWM pin
|
||||
engineConfiguration->etbIo[0].controlPin = GPIOC_7;
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::C7;
|
||||
// DIR pin
|
||||
engineConfiguration->etbIo[0].directionPin1 = GPIOA_8;
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::A8;
|
||||
// Disable pin
|
||||
engineConfiguration->etbIo[0].disablePin = GPIOC_8;
|
||||
engineConfiguration->etbIo[0].disablePin = Gpio::C8;
|
||||
// Unused
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
||||
|
||||
// we only have pwm/dir, no dira/dirb
|
||||
engineConfiguration->etb_use_two_wires = false;
|
||||
|
@ -120,11 +120,11 @@ static void setupEtb() {
|
|||
static void setupDefaultSensorInputs() {
|
||||
// trigger inputs
|
||||
// tle8888 VR conditioner
|
||||
engineConfiguration->triggerInputPins[0] = GPIOC_6;
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::C6;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
// Direct hall-only cam input
|
||||
engineConfiguration->camInputs[0] = GPIOA_5;
|
||||
engineConfiguration->camInputs[0] = Gpio::A5;
|
||||
|
||||
// open question if it's great to have TPS in default TPS - the down-side is for
|
||||
// vehicles without TPS or for first start without TPS one would have to turn in off
|
||||
|
@ -160,16 +160,16 @@ void setBoardConfigOverrides() {
|
|||
engineConfiguration->clt.config.bias_resistor = 2700;
|
||||
engineConfiguration->iat.config.bias_resistor = 2700;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOB_6;
|
||||
engineConfiguration->canRxPin = GPIOB_12;
|
||||
engineConfiguration->canTxPin = Gpio::B6;
|
||||
engineConfiguration->canRxPin = Gpio::B12;
|
||||
|
||||
// SPI for SD card
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
|
||||
engineConfiguration->spi3mosiPin = GPIOC_12;
|
||||
engineConfiguration->spi3misoPin = GPIOC_11;
|
||||
engineConfiguration->spi3sckPin = GPIOC_10;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
}
|
||||
|
||||
void setSerialConfigurationOverrides() {
|
||||
|
@ -192,24 +192,24 @@ void setSerialConfigurationOverrides() {
|
|||
void setBoardDefaultConfiguration() {
|
||||
setInjectorPins();
|
||||
setIgnitionPins();
|
||||
engineConfiguration->sdCardCsPin = GPIOB_9;
|
||||
engineConfiguration->sdCardCsPin = Gpio::B9;
|
||||
|
||||
// MRE has a special main relay control low side pin
|
||||
// rusEfi firmware is totally not involved with main relay control on microRusEfi board
|
||||
// todo: maybe even set EFI_MAIN_RELAY_CONTROL to FALSE for MRE configuration
|
||||
// TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_IN11 / TLE8888_OUT21
|
||||
// TLE8888_PIN_21: "35 - GP Out 1"
|
||||
engineConfiguration->fuelPumpPin = TLE8888_PIN_21;
|
||||
// Gpio::TLE8888_PIN_21: "35 - GP Out 1"
|
||||
engineConfiguration->fuelPumpPin = Gpio::TLE8888_PIN_21;
|
||||
|
||||
// engineConfiguration->isSdCardEnabled = true;
|
||||
|
||||
// TLE8888 high current low side: VVT2 IN9 / OUT5
|
||||
// GPIOE_10: "3 - Lowside 2"
|
||||
engineConfiguration->idle.solenoidPin = TLE8888_PIN_5;
|
||||
// Gpio::E10: "3 - Lowside 2"
|
||||
engineConfiguration->idle.solenoidPin = Gpio::TLE8888_PIN_5;
|
||||
|
||||
|
||||
// TLE8888_PIN_22: "34 - GP Out 2"
|
||||
engineConfiguration->fanPin = TLE8888_PIN_22;
|
||||
// Gpio::TLE8888_PIN_22: "34 - GP Out 2"
|
||||
engineConfiguration->fanPin = Gpio::TLE8888_PIN_22;
|
||||
|
||||
// "required" hardware is done - set some reasonable defaults
|
||||
setupDefaultSensorInputs();
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
pins:
|
||||
- pin: 3
|
||||
id: GPIOB_8
|
||||
id: B8
|
||||
class: outputs
|
||||
function: I2C1_SCL or CAN1_RX
|
||||
ts_name: AUX J2 PB8
|
||||
|
||||
- pin: 6
|
||||
id: GPIOB_9
|
||||
id: B9
|
||||
class: outputs
|
||||
function: I2C1_SDA or CAN1_TX
|
||||
ts_name: AUX J2 PB9
|
||||
|
||||
- pin: 10
|
||||
id: GPIOC_12
|
||||
id: C12
|
||||
class: outputs
|
||||
function: SPI3_MOSI or USART3_CK or UART5_TX
|
||||
ts_name: AUX J2 PC12
|
||||
|
||||
- pin: 7
|
||||
id: GPIOA_15
|
||||
id: A15
|
||||
class: outputs
|
||||
function: SPI3_NSS (Chip Select)
|
||||
ts_name: AUX J2 PA15
|
||||
|
|
|
@ -57,7 +57,7 @@ pins:
|
|||
|
||||
# TC4427 ignition outputs (5v)
|
||||
- pin: 9
|
||||
id: GPIOD_4
|
||||
id: D4
|
||||
class: outputs
|
||||
color: dark blue
|
||||
function: Ignition 1
|
||||
|
@ -65,7 +65,7 @@ pins:
|
|||
type: ign
|
||||
|
||||
- pin: 10
|
||||
id: GPIOD_3
|
||||
id: D3
|
||||
class: outputs
|
||||
color: dark blue
|
||||
function: Ignition 2
|
||||
|
@ -73,7 +73,7 @@ pins:
|
|||
type: ign
|
||||
|
||||
- pin: 11
|
||||
id: GPIOD_2
|
||||
id: D2
|
||||
class: outputs
|
||||
color: dark blue
|
||||
function: Ignition 3
|
||||
|
@ -81,7 +81,7 @@ pins:
|
|||
type: ign
|
||||
|
||||
- pin: 12
|
||||
id: GPIOD_1
|
||||
id: D1
|
||||
class: outputs
|
||||
color: dark blue
|
||||
function: Ignition 4
|
||||
|
@ -89,7 +89,7 @@ pins:
|
|||
type: ign
|
||||
|
||||
- pin: 13
|
||||
id: GPIOD_6
|
||||
id: D6
|
||||
class: outputs
|
||||
color: yellow
|
||||
function: Alternator (see JP2 jumper note)
|
||||
|
@ -98,7 +98,7 @@ pins:
|
|||
|
||||
# TC4427 general purpose output (selectable 5v/12v)
|
||||
- pin: 14
|
||||
id: GPIOD_7
|
||||
id: D7
|
||||
class: outputs
|
||||
color: yellow
|
||||
function: (see JP2 jumper note)
|
||||
|
@ -121,7 +121,7 @@ pins:
|
|||
color: red right
|
||||
|
||||
- pin: 18
|
||||
id: [GPIOA_0, EFI_ADC_0]
|
||||
id: [A0, EFI_ADC_0]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: red
|
||||
function: CLT sensor
|
||||
|
@ -129,7 +129,7 @@ pins:
|
|||
type: at
|
||||
|
||||
- pin: 19
|
||||
id: [GPIOC_2, EFI_ADC_12]
|
||||
id: [C2, EFI_ADC_12]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: red
|
||||
function: Starting from version 0.5.0 this pin can be used as 5V input for USB connection through main connector (No need to open case to access micro-USB connector)
|
||||
|
@ -137,7 +137,7 @@ pins:
|
|||
type: av
|
||||
|
||||
- pin: 20
|
||||
id: [GPIOC_3, EFI_ADC_13]
|
||||
id: [C3, EFI_ADC_13]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: red left
|
||||
function: Throttle position sensor (TPS)
|
||||
|
@ -150,14 +150,14 @@ pins:
|
|||
color: dark green
|
||||
|
||||
- pin: 22
|
||||
id: [GPIOA_3, GPIOA_3, EFI_ADC_3]
|
||||
id: [A3, A3, EFI_ADC_3]
|
||||
class: [event_inputs, switch_inputs, analog_inputs]
|
||||
color: dark green
|
||||
ts_name: 22 - AN temp 4
|
||||
type: at
|
||||
|
||||
- pin: 23
|
||||
id: [GPIOA_1, EFI_ADC_1]
|
||||
id: [A1, EFI_ADC_1]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: dark green
|
||||
function: IAT sensor
|
||||
|
@ -165,7 +165,7 @@ pins:
|
|||
type: at
|
||||
|
||||
- pin: 24
|
||||
id: [GPIOA_2, GPIOA_2, EFI_ADC_2]
|
||||
id: [A2, A2, EFI_ADC_2]
|
||||
class: [event_inputs, switch_inputs, analog_inputs]
|
||||
color: dark green
|
||||
ts_name: 24 - AN temp 3
|
||||
|
@ -173,21 +173,21 @@ pins:
|
|||
|
||||
# RC filter input for hall
|
||||
- pin: 25
|
||||
id: [GPIOA_5, GPIOA_5]
|
||||
id: [A5, A5]
|
||||
class: [event_inputs, switch_inputs]
|
||||
color: light blue right
|
||||
ts_name: 25 - Hall Cam
|
||||
type: hall
|
||||
|
||||
- pin: 26
|
||||
id: [GPIOA_6, EFI_ADC_6]
|
||||
id: [A6, EFI_ADC_6]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: light blue
|
||||
ts_name: 26 - AN volt 2
|
||||
type: av
|
||||
|
||||
- pin: 27
|
||||
id: [GPIOC_0, EFI_ADC_10]
|
||||
id: [C0, EFI_ADC_10]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: light blue
|
||||
function: MAP sensor
|
||||
|
@ -195,22 +195,22 @@ pins:
|
|||
type: av
|
||||
|
||||
- pin: 28
|
||||
id: [GPIOA_4, GPIOA_4, EFI_ADC_4]
|
||||
id: [A4, A4, EFI_ADC_4]
|
||||
class: [outputs, switch_inputs, analog_inputs]
|
||||
color: light blue left
|
||||
function: AN volt 10, for aux see R85
|
||||
ts_name: 28 - AN volt 10, Aux Reuse
|
||||
type: av
|
||||
|
||||
- id: GPIOE_0
|
||||
- id: E0
|
||||
class: outputs
|
||||
ts_name: AUX J6
|
||||
|
||||
- id: GPIOB_11
|
||||
- id: B11
|
||||
class: outputs
|
||||
ts_name: AUX J12
|
||||
|
||||
- id: GPIOB_10
|
||||
- id: B10
|
||||
class: outputs
|
||||
ts_name: AUX J13
|
||||
|
||||
|
@ -220,14 +220,14 @@ pins:
|
|||
color: pink right
|
||||
|
||||
- pin: 30
|
||||
id: [GPIOC_5, EFI_ADC_15]
|
||||
id: [C5, EFI_ADC_15]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: pink
|
||||
ts_name: 30 - AN volt 7
|
||||
type: av
|
||||
|
||||
- pin: 31
|
||||
id: [GPIOA_7, EFI_ADC_7]
|
||||
id: [A7, EFI_ADC_7]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: pink
|
||||
function: Throttle Pedal Position Sensor (PPS)
|
||||
|
@ -235,7 +235,7 @@ pins:
|
|||
type: av
|
||||
|
||||
- pin: 32
|
||||
id: [GPIOC_4, GPIOC_4, EFI_ADC_14]
|
||||
id: [C4, C4, EFI_ADC_14]
|
||||
class: [outputs, switch_inputs, analog_inputs]
|
||||
color: pink
|
||||
function: External wideband O2 sensor WBO AFR EGO, for aux see R86
|
||||
|
@ -270,7 +270,7 @@ pins:
|
|||
type: [gp_low, gp_pp]
|
||||
|
||||
- pin: 36
|
||||
id: [GPIOB_0, GPIOB_0, EFI_ADC_8]
|
||||
id: [B0, B0, EFI_ADC_8]
|
||||
class: [outputs, switch_inputs, analog_inputs]
|
||||
color: orange left
|
||||
function: AN volt 8, for aux see R84
|
||||
|
@ -299,7 +299,7 @@ pins:
|
|||
color: grey
|
||||
|
||||
- pin: 40
|
||||
id: [GPIOB_1, GPIOB_1, EFI_ADC_9]
|
||||
id: [B1, B1, EFI_ADC_9]
|
||||
class: [outputs, switch_inputs, analog_inputs]
|
||||
color: grey
|
||||
function: AN volt 9, for aux see R30
|
||||
|
@ -337,7 +337,7 @@ pins:
|
|||
color: brown left
|
||||
|
||||
- pin: 45
|
||||
id: GPIOC_6
|
||||
id: C6
|
||||
class: event_inputs
|
||||
color: light green right
|
||||
function: Crank VR+/hall
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
pins:
|
||||
|
||||
- pin: J10
|
||||
id: GPIOE_6
|
||||
id: E6
|
||||
class: outputs
|
||||
function: TIM9_CH2
|
||||
ts_name: AUX J10 PE6
|
||||
|
||||
- pin: J11
|
||||
id: GPIOE_5
|
||||
id: E5
|
||||
class: outputs
|
||||
function: TIM9_CH1
|
||||
ts_name: AUX J11 PE5
|
||||
|
||||
- pin: J18
|
||||
id: GPIOB_7
|
||||
id: B7
|
||||
class: outputs
|
||||
ts_name: AUX J18 PB7
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// knock 1 - pin PA3
|
||||
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN3
|
||||
#define KNOCK_PIN_CH1 GPIOA_3
|
||||
#define KNOCK_PIN_CH1 Gpio::A3
|
||||
|
||||
// Sample rate & time - depends on the exact MCU
|
||||
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#pragma once
|
||||
|
||||
// OpenDrain: 4.5A
|
||||
#define MRE_LS_1 TLE8888_PIN_6
|
||||
#define MRE_LS_1 Gpio::TLE8888_PIN_6
|
||||
|
||||
// clt = "18 - AN temp 1"
|
||||
// R27 pull-up
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
|
||||
void setSerialConfigurationOverrides() {
|
||||
engineConfiguration->useSerialPort = true;
|
||||
engineConfiguration->binarySerialTxPin = GPIOD_8;
|
||||
engineConfiguration->binarySerialRxPin = GPIOD_9;
|
||||
// engineConfiguration->consoleSerialTxPin = GPIOD_8;
|
||||
// engineConfiguration->consoleSerialRxPin = GPIOD_9;
|
||||
engineConfiguration->binarySerialTxPin = Gpio::D8;
|
||||
engineConfiguration->binarySerialRxPin = Gpio::D9;
|
||||
// engineConfiguration->consoleSerialTxPin = Gpio::D8;
|
||||
// engineConfiguration->consoleSerialRxPin = Gpio::D9;
|
||||
engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED;
|
||||
engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED;
|
||||
}
|
||||
|
@ -33,8 +33,8 @@ void setSdCardConfigurationOverrides() {
|
|||
void setBoardDefaultConfiguration() {
|
||||
setSerialConfigurationOverrides();
|
||||
|
||||
engineConfiguration->runningLedPin = GPIOB_0; //green LED
|
||||
engineConfiguration->warningLedPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->runningLedPin = Gpio::B0; //green LED
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
#if 0
|
||||
engineConfiguration->vbattAdcChannel = EFI_ADC_13;
|
||||
engineConfiguration->adcVcc = ADC_VCC;
|
||||
|
@ -44,13 +44,13 @@ void setBoardDefaultConfiguration() {
|
|||
|
||||
// not used
|
||||
for (int i = 0; i < DIGIPOT_COUNT ; i++) {
|
||||
engineConfiguration->digitalPotentiometerChipSelect[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->digitalPotentiometerChipSelect[i] = Gpio::Unassigned;
|
||||
}
|
||||
engineConfiguration->triggerSimulatorPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerSimulatorPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerSimulatorPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT;
|
||||
engineConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT;
|
||||
engineConfiguration->vehicleSpeedSensorInputPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->vehicleSpeedSensorInputPin = Gpio::Unassigned;
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
engineConfiguration->is_enabled_spi_1 = false;
|
||||
|
|
|
@ -6,10 +6,10 @@ SCRIPT_NAME="compile_nucleo_f767.sh"
|
|||
echo "Entering $SCRIPT_NAME"
|
||||
|
||||
export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \
|
||||
-DEFI_INJECTOR_PIN3=GPIO_UNASSIGNED \
|
||||
-DEFI_INJECTOR_PIN3=Gpio::Unassigned \
|
||||
-DFIRMWARE_ID=\\\"nucleo767\\\" \
|
||||
-DEFI_COMMUNICATION_PIN=GPIOB_7 \
|
||||
-DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOB_14 \
|
||||
-DEFI_COMMUNICATION_PIN=Gpio::B7 \
|
||||
-DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::B14 \
|
||||
-DEFI_ENABLE_ASSERTS=FALSE \
|
||||
-DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE"
|
||||
export DEBUG_LEVEL_OPT="-O2"
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
# STM32F767 version of the firmware for F767ZI chip NOT on Nucleo board, with a real oscilattor
|
||||
|
||||
export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \
|
||||
-DEFI_INJECTOR_PIN3=GPIO_UNASSIGNED \
|
||||
-DEFI_INJECTOR_PIN3=Gpio::Unassigned \
|
||||
-DFIRMWARE_ID=\\\"board767\\\" \
|
||||
-DEFI_COMMUNICATION_PIN=GPIOB_7 \
|
||||
-DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOB_14 \
|
||||
-DEFI_COMMUNICATION_PIN=Gpio::B7 \
|
||||
-DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::B14 \
|
||||
-DEFI_ENABLE_ASSERTS=FALSE \
|
||||
-DEFI_USE_OSC=TRUE \
|
||||
-DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE"
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
DDEFS = -DTS_NO_PRIMARY=0 \
|
||||
-DTS_PRIMARY_PORT=SD3 \
|
||||
-DEFI_CONSOLE_TX_BRAIN_PIN=GPIOD_8 \
|
||||
-DEFI_CONSOLE_RX_BRAIN_PIN=GPIOD_9 \
|
||||
-DEFI_CONSOLE_TX_BRAIN_PIN=Gpio::D8 \
|
||||
-DEFI_CONSOLE_RX_BRAIN_PIN=Gpio::D9 \
|
||||
|
||||
|
||||
# Shared variables
|
||||
|
|
|
@ -6,10 +6,10 @@ SCRIPT_NAME="compile_nucleo_h743.sh"
|
|||
echo "Entering $SCRIPT_NAME"
|
||||
|
||||
export EXTRA_PARAMS="-DDUMMY \
|
||||
-DEFI_INJECTOR_PIN3=GPIO_UNASSIGNED \
|
||||
-DEFI_INJECTOR_PIN3=Gpio::Unassigned \
|
||||
-DFIRMWARE_ID=\\\"nucleoH743\\\" \
|
||||
-DEFI_COMMUNICATION_PIN=GPIOB_7 \
|
||||
-DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOB_14"
|
||||
-DEFI_COMMUNICATION_PIN=Gpio::B7 \
|
||||
-DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::B14"
|
||||
export DEBUG_LEVEL_OPT="-O2"
|
||||
|
||||
bash ../common_make.sh nucleo_h743 ARCH_STM32H7
|
||||
|
|
|
@ -58,15 +58,15 @@ static void setPrometheusDefaults() {
|
|||
|
||||
void setPinConfigurationOverrides() {
|
||||
#if 0
|
||||
engineConfiguration->injectionPins[0] = is469 ? GPIOD_9 : GPIOB_14; // #1
|
||||
engineConfiguration->injectionPins[1] = is469 ? GPIOD_15 : GPIOC_7; // #2
|
||||
engineConfiguration->injectionPins[2] = is469 ? GPIOD_10 : GPIOB_15; // #3
|
||||
engineConfiguration->injectionPins[3] = is469 ? GPIOD_14 : GPIOC_6; // #4
|
||||
engineConfiguration->injectionPins[0] = is469 ? Gpio::D9 : Gpio::B14; // #1
|
||||
engineConfiguration->injectionPins[1] = is469 ? Gpio::D15 : Gpio::C7; // #2
|
||||
engineConfiguration->injectionPins[2] = is469 ? Gpio::D10 : Gpio::B15; // #3
|
||||
engineConfiguration->injectionPins[3] = is469 ? Gpio::D14 : Gpio::C6; // #4
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOA_10;
|
||||
engineConfiguration->ignitionPins[1] = GPIOA_9;
|
||||
engineConfiguration->ignitionPins[2] = GPIOA_8;
|
||||
engineConfiguration->ignitionPins[3] = GPIOA_11;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::A10;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::A9;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::A8;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::A11;
|
||||
engineConfiguration->ignitionPinMode = OM_INVERTED;
|
||||
|
||||
enginePins.startInjectionPins();
|
||||
|
@ -99,10 +99,10 @@ void setPinConfigurationOverrides() {
|
|||
|
||||
void setSerialConfigurationOverrides() {
|
||||
engineConfiguration->useSerialPort = true;
|
||||
engineConfiguration->binarySerialTxPin = GPIOA_0;
|
||||
engineConfiguration->binarySerialRxPin = GPIOA_1;
|
||||
// engineConfiguration->consoleSerialTxPin = GPIOA_0;
|
||||
// engineConfiguration->consoleSerialRxPin = GPIOA_1;
|
||||
engineConfiguration->binarySerialTxPin = Gpio::A0;
|
||||
engineConfiguration->binarySerialRxPin = Gpio::A1;
|
||||
// engineConfiguration->consoleSerialTxPin = Gpio::A0;
|
||||
// engineConfiguration->consoleSerialRxPin = Gpio::A1;
|
||||
engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED;
|
||||
engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ void setSerialConfigurationOverrides() {
|
|||
void setSdCardConfigurationOverrides() {
|
||||
engineConfiguration->is_enabled_spi_1 = true;
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_1;
|
||||
engineConfiguration->sdCardCsPin = GPIOA_2;
|
||||
engineConfiguration->sdCardCsPin = Gpio::A2;
|
||||
engineConfiguration->isSdCardEnabled = true;
|
||||
}
|
||||
|
||||
|
@ -137,15 +137,15 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->baroSensor.hwChannel = EFI_ADC_NONE;
|
||||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_NONE;
|
||||
|
||||
engineConfiguration->injectionPins[0] = is469 ? GPIOD_9 : GPIOB_14; // #1
|
||||
engineConfiguration->injectionPins[1] = is469 ? GPIOD_15 : GPIOC_7; // #2
|
||||
engineConfiguration->injectionPins[2] = is469 ? GPIOD_10 : GPIOB_15; // #3
|
||||
engineConfiguration->injectionPins[3] = is469 ? GPIOD_14 : GPIOC_6; // #4
|
||||
engineConfiguration->injectionPins[0] = is469 ? Gpio::D9 : Gpio::B14; // #1
|
||||
engineConfiguration->injectionPins[1] = is469 ? Gpio::D15 : Gpio::C7; // #2
|
||||
engineConfiguration->injectionPins[2] = is469 ? Gpio::D10 : Gpio::B15; // #3
|
||||
engineConfiguration->injectionPins[3] = is469 ? Gpio::D14 : Gpio::C6; // #4
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOA_10;
|
||||
engineConfiguration->ignitionPins[1] = GPIOA_9;
|
||||
engineConfiguration->ignitionPins[2] = GPIOA_8;
|
||||
engineConfiguration->ignitionPins[3] = GPIOA_11;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::A10;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::A9;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::A8;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::A11;
|
||||
engineConfiguration->ignitionPinMode = OM_INVERTED;
|
||||
|
||||
engineConfiguration->vbattDividerCoeff = ((float) (2 + 10)) / 2;
|
||||
|
@ -153,53 +153,53 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->iat.config.bias_resistor = 2700;
|
||||
|
||||
engineConfiguration->useStepperIdle = true;
|
||||
engineConfiguration->idle.stepperDirectionPin = is469 ? GPIOB_14 : GPIOB_12;
|
||||
engineConfiguration->idle.stepperStepPin = is469 ? GPIOB_15 : GPIOB_13;
|
||||
engineConfiguration->stepperEnablePin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->idle.stepperDirectionPin = is469 ? Gpio::B14 : Gpio::B12;
|
||||
engineConfiguration->idle.stepperStepPin = is469 ? Gpio::B15 : Gpio::B13;
|
||||
engineConfiguration->stepperEnablePin = Gpio::Unassigned;
|
||||
engineConfiguration->stepperEnablePinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->communicationLedPin = GPIO_UNASSIGNED;// GPIOA_13; // yellow LED
|
||||
engineConfiguration->runningLedPin = GPIOA_13; //GPIOA_13; // yellow LED
|
||||
engineConfiguration->warningLedPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->communicationLedPin = Gpio::Unassigned;// Gpio::A13; // yellow LED
|
||||
engineConfiguration->runningLedPin = Gpio::A13; //Gpio::A13; // yellow LED
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->camInputs[0] = is469 ? GPIOE_9 : GPIOA_6;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::A5;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->camInputs[0] = is469 ? Gpio::E9 : Gpio::A6;
|
||||
|
||||
engineConfiguration->tachOutputPin = GPIOC_8;
|
||||
engineConfiguration->tachOutputPin = Gpio::C8;
|
||||
engineConfiguration->tachOutputPinMode = OM_DEFAULT;
|
||||
engineConfiguration->fuelPumpPin = is469 ? GPIOD_6 : GPIOB_7;
|
||||
engineConfiguration->fuelPumpPin = is469 ? Gpio::D6 : Gpio::B7;
|
||||
engineConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||
engineConfiguration->mainRelayPin = is469 ? GPIOB_11 : GPIOB_2;
|
||||
engineConfiguration->mainRelayPin = is469 ? Gpio::B11 : Gpio::B2;
|
||||
engineConfiguration->mainRelayPinMode = OM_DEFAULT;
|
||||
engineConfiguration->fanPin = GPIOC_9;
|
||||
engineConfiguration->fanPin = Gpio::C9;
|
||||
engineConfiguration->fanPinMode = OM_DEFAULT;
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIOC_1;
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::C1;
|
||||
engineConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
|
||||
|
||||
|
||||
|
||||
// debug pad
|
||||
engineConfiguration->triggerSimulatorPins[0] = GPIOD_8;
|
||||
engineConfiguration->triggerSimulatorPins[0] = Gpio::D8;
|
||||
engineConfiguration->triggerSimulatorPinModes[0] = OM_DEFAULT;
|
||||
|
||||
// not used
|
||||
engineConfiguration->displayMode = DM_NONE;
|
||||
engineConfiguration->HD44780_rs = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_e = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_db4 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_db5 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_db6 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_db7 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_rs = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_e = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_db4 = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_db5 = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_db6 = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_db7 = Gpio::Unassigned;
|
||||
for (int i = 0; i < DIGIPOT_COUNT ; i++) {
|
||||
engineConfiguration->digitalPotentiometerChipSelect[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->digitalPotentiometerChipSelect[i] = Gpio::Unassigned;
|
||||
}
|
||||
engineConfiguration->triggerSimulatorPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerSimulatorPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerSimulatorPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT;
|
||||
engineConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT;
|
||||
engineConfiguration->vehicleSpeedSensorInputPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->vehicleSpeedSensorInputPin = Gpio::Unassigned;
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -207,24 +207,24 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->is_enabled_spi_2 = false;
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
|
||||
engineConfiguration->spi1mosiPin = GPIOB_5;
|
||||
engineConfiguration->spi1mosiPin = Gpio::B5;
|
||||
engineConfiguration->spi1MosiMode = PO_DEFAULT; // PAL_STM32_OTYPE_PUSHPULL
|
||||
engineConfiguration->spi1misoPin = GPIOB_4;
|
||||
engineConfiguration->spi1misoPin = Gpio::B4;
|
||||
engineConfiguration->spi1MisoMode = PO_DEFAULT; // PAL_STM32_OTYPE_PUSHPULL
|
||||
engineConfiguration->spi1sckPin = GPIOB_3;
|
||||
engineConfiguration->spi1sckPin = Gpio::B3;
|
||||
engineConfiguration->spi1SckMode = PO_DEFAULT; // PAL_STM32_OTYPE_PUSHPULL
|
||||
|
||||
engineConfiguration->spi3mosiPin = GPIOC_12;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3MosiMode = PO_OPENDRAIN; // 4
|
||||
engineConfiguration->spi3misoPin = GPIOC_11;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3MisoMode = PO_PULLUP; // 32
|
||||
engineConfiguration->spi3sckPin = GPIOC_10;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->spi3SckMode = PO_OPENDRAIN; // 4
|
||||
|
||||
engineConfiguration->hip9011SpiDevice = SPI_DEVICE_3;
|
||||
engineConfiguration->hip9011CsPin = is469 ? GPIOD_1 : GPIOD_2;
|
||||
engineConfiguration->hip9011CsPin = is469 ? Gpio::D1 : Gpio::D2;
|
||||
engineConfiguration->hip9011CsPinMode = OM_OPENDRAIN;
|
||||
engineConfiguration->hip9011IntHoldPin = GPIOC_14;
|
||||
engineConfiguration->hip9011IntHoldPin = Gpio::C14;
|
||||
engineConfiguration->hip9011IntHoldPinMode = OM_OPENDRAIN;
|
||||
engineConfiguration->hipOutputChannel = EFI_ADC_10; // PC0
|
||||
engineConfiguration->isHip9011Enabled = true;
|
||||
|
@ -232,15 +232,15 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->cj125SpiDevice = SPI_DEVICE_3;
|
||||
engineConfiguration->cj125ua = is469 ? EFI_ADC_9 : EFI_ADC_8;
|
||||
engineConfiguration->cj125ur = EFI_ADC_12;
|
||||
engineConfiguration->cj125CsPin = GPIOA_15;
|
||||
engineConfiguration->cj125CsPin = Gpio::A15;
|
||||
engineConfiguration->cj125CsPinMode = OM_OPENDRAIN;
|
||||
engineConfiguration->wboHeaterPin = GPIOC_13;
|
||||
engineConfiguration->o2heaterPin = GPIOC_13;
|
||||
engineConfiguration->wboHeaterPin = Gpio::C13;
|
||||
engineConfiguration->o2heaterPin = Gpio::C13;
|
||||
//engineConfiguration->isCJ125Enabled = true;
|
||||
engineConfiguration->isCJ125Enabled = false;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOB_9;
|
||||
engineConfiguration->canRxPin = GPIOB_8;
|
||||
engineConfiguration->canTxPin = Gpio::B9;
|
||||
engineConfiguration->canRxPin = Gpio::B8;
|
||||
|
||||
//!!!!!!!!!!!!!!!
|
||||
#if 1
|
||||
|
|
|
@ -66,10 +66,10 @@
|
|||
|
||||
|
||||
#undef EFI_CONSOLE_TX_BRAIN_PIN
|
||||
#define EFI_CONSOLE_TX_BRAIN_PIN GPIOA_0
|
||||
#define EFI_CONSOLE_TX_BRAIN_PIN Gpio::A0
|
||||
|
||||
#undef EFI_CONSOLE_RX_BRAIN_PIN
|
||||
#define EFI_CONSOLE_RX_BRAIN_PIN GPIOA_1
|
||||
#define EFI_CONSOLE_RX_BRAIN_PIN Gpio::A1
|
||||
|
||||
#undef EFI_CONSOLE_AF
|
||||
#define EFI_CONSOLE_AF 8
|
||||
|
@ -78,7 +78,7 @@
|
|||
#define TS_SERIAL_AF 8
|
||||
|
||||
#undef LED_CRITICAL_ERROR_BRAIN_PIN
|
||||
#define LED_CRITICAL_ERROR_BRAIN_PIN GPIOA_13
|
||||
#define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::A13
|
||||
#undef LED_ERROR_BRAIN_PIN_MODE
|
||||
#define LED_ERROR_BRAIN_PIN_MODE DEFAULT_OUTPUT
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ static NO_CACHE adcsample_t samples[8];
|
|||
|
||||
// we use this as a hook to run near the rest of ADC init...
|
||||
void setAdcChannelOverrides() {
|
||||
efiSetPadMode("adc input", GPIOF_3, PAL_MODE_INPUT_ANALOG);
|
||||
efiSetPadMode("adc input", Gpio::F3, PAL_MODE_INPUT_ANALOG);
|
||||
|
||||
adcStart(&ADCD3, nullptr);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ ifeq ($(PROJECT_CPU),ARCH_STM32F4)
|
|||
endif
|
||||
|
||||
DDEFS += -DEFI_USE_OSC=TRUE
|
||||
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOE_3
|
||||
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::E3
|
||||
DDEFS += -DFIRMWARE_ID=\"proteus\"
|
||||
|
||||
DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
||||
|
@ -33,7 +33,7 @@ ifeq ($(PROJECT_CPU),ARCH_STM32F4)
|
|||
# Hardware serial port on UART 2 -> PD5/PD6
|
||||
DDEFS += -DSTM32_UART_USE_USART2=TRUE
|
||||
DDEFS += -DTS_PRIMARY_PORT=UARTD2
|
||||
DDEFS += -DEFI_CONSOLE_TX_BRAIN_PIN=GPIOD_5 -DEFI_CONSOLE_RX_BRAIN_PIN=GPIOD_6
|
||||
DDEFS += -DEFI_CONSOLE_TX_BRAIN_PIN=Gpio::D5 -DEFI_CONSOLE_RX_BRAIN_PIN=Gpio::D6
|
||||
endif
|
||||
|
||||
# We are running on Proteus hardware!
|
||||
|
|
|
@ -54,9 +54,9 @@ void setSdCardConfigurationOverrides() {
|
|||
|
||||
static void setLedPins() {
|
||||
// PE3 is error LED, configured in board.mk
|
||||
engineConfiguration->communicationLedPin = GPIOE_4;
|
||||
engineConfiguration->runningLedPin = GPIOE_5;
|
||||
engineConfiguration->warningLedPin = GPIOE_6;
|
||||
engineConfiguration->communicationLedPin = Gpio::E4;
|
||||
engineConfiguration->runningLedPin = Gpio::E5;
|
||||
engineConfiguration->warningLedPin = Gpio::E6;
|
||||
}
|
||||
|
||||
static void setupVbatt() {
|
||||
|
@ -81,23 +81,23 @@ static void setupEtb() {
|
|||
|
||||
// Throttle #1
|
||||
// PWM pin
|
||||
engineConfiguration->etbIo[0].controlPin = GPIOD_12;
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::D12;
|
||||
// DIR pin
|
||||
engineConfiguration->etbIo[0].directionPin1 = GPIOD_10;
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::D10;
|
||||
// Disable pin
|
||||
engineConfiguration->etbIo[0].disablePin = GPIOD_11;
|
||||
engineConfiguration->etbIo[0].disablePin = Gpio::D11;
|
||||
// Unused
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
||||
|
||||
// Throttle #2
|
||||
// PWM pin
|
||||
engineConfiguration->etbIo[1].controlPin = GPIOD_13;
|
||||
engineConfiguration->etbIo[1].controlPin = Gpio::D13;
|
||||
// DIR pin
|
||||
engineConfiguration->etbIo[1].directionPin1 = GPIOD_9;
|
||||
engineConfiguration->etbIo[1].directionPin1 = Gpio::D9;
|
||||
// Disable pin
|
||||
engineConfiguration->etbIo[1].disablePin = GPIOD_8;
|
||||
engineConfiguration->etbIo[1].disablePin = Gpio::D8;
|
||||
// Unused
|
||||
engineConfiguration->etbIo[1].directionPin2 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
|
||||
|
||||
// we only have pwm/dir, no dira/dirb
|
||||
engineConfiguration->etb_use_two_wires = false;
|
||||
|
@ -112,11 +112,11 @@ static void setupDefaultSensorInputs() {
|
|||
#else
|
||||
// Digital channel 1 as default - others not set
|
||||
engineConfiguration->triggerInputPins[0] = PROTEUS_DIGITAL_1;
|
||||
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->camInputs[0] = Gpio::Unassigned;
|
||||
#endif
|
||||
|
||||
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
|
||||
|
||||
|
||||
engineConfiguration->clt.adcChannel = PROTEUS_IN_CLT;
|
||||
|
@ -131,12 +131,12 @@ static void setupDefaultSensorInputs() {
|
|||
static void setupSdCard() {
|
||||
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
engineConfiguration->sdCardCsPin = GPIOD_2;
|
||||
engineConfiguration->sdCardCsPin = Gpio::D2;
|
||||
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
engineConfiguration->spi3sckPin = GPIOC_10;
|
||||
engineConfiguration->spi3misoPin = GPIOC_11;
|
||||
engineConfiguration->spi3mosiPin = GPIOC_12;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
}
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
|
@ -147,16 +147,16 @@ void setBoardConfigOverrides() {
|
|||
engineConfiguration->clt.config.bias_resistor = 2700;
|
||||
engineConfiguration->iat.config.bias_resistor = 2700;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
|
||||
#if defined(STM32F4) || defined(STM32F7)
|
||||
engineConfiguration->can2RxPin = GPIOB_12;
|
||||
engineConfiguration->can2TxPin = GPIOB_13;
|
||||
engineConfiguration->can2RxPin = Gpio::B12;
|
||||
engineConfiguration->can2TxPin = Gpio::B13;
|
||||
#endif
|
||||
|
||||
engineConfiguration->lps25BaroSensorScl = GPIOB_10;
|
||||
engineConfiguration->lps25BaroSensorSda = GPIOB_11;
|
||||
engineConfiguration->lps25BaroSensorScl = Gpio::B10;
|
||||
engineConfiguration->lps25BaroSensorSda = Gpio::B11;
|
||||
}
|
||||
|
||||
void setSerialConfigurationOverrides() {
|
||||
|
@ -202,8 +202,8 @@ void setBoardDefaultConfiguration() {
|
|||
|
||||
// If we're running as hardware CI, borrow a few extra pins for that
|
||||
#ifdef HARDWARE_CI
|
||||
engineConfiguration->triggerSimulatorPins[0] = GPIOG_3;
|
||||
engineConfiguration->triggerSimulatorPins[1] = GPIOG_2;
|
||||
engineConfiguration->triggerSimulatorPins[0] = Gpio::G3;
|
||||
engineConfiguration->triggerSimulatorPins[1] = Gpio::G2;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
pins:
|
||||
- pin: 1
|
||||
id: [GPIOE_11, GPIOE_11]
|
||||
id: [E11, E11]
|
||||
class: [event_inputs, switch_inputs]
|
||||
function: Digital trigger/switch input for instance Hall type CAM
|
||||
ts_name: Digital 2
|
||||
type: din
|
||||
|
||||
- pin: 2
|
||||
id: [GPIOE_12, GPIOE_12]
|
||||
id: [E12, E12]
|
||||
class: [event_inputs, switch_inputs]
|
||||
function: Digital trigger/switch input for instance VSS
|
||||
ts_name: Digital 3
|
||||
type: din
|
||||
|
||||
- pin: 3
|
||||
id: [GPIOE_14, GPIOE_14]
|
||||
id: [E14, E14]
|
||||
class: [event_inputs, switch_inputs]
|
||||
function: Digital trigger/switch input for instance Start Button
|
||||
ts_name: Digital 4
|
||||
|
@ -24,7 +24,7 @@ pins:
|
|||
function: "Variable Reluctance #2 positive"
|
||||
type: vr
|
||||
|
||||
- id: GPIOE_8
|
||||
- id: E8
|
||||
class: event_inputs
|
||||
ts_name: VR 2
|
||||
|
||||
|
@ -32,7 +32,7 @@ pins:
|
|||
function: "Variable Reluctance #1 positive"
|
||||
type: vr
|
||||
|
||||
- id: GPIOE_7
|
||||
- id: E7
|
||||
class: event_inputs
|
||||
ts_name: VR 1
|
||||
|
||||
|
@ -49,21 +49,21 @@ pins:
|
|||
type: etb
|
||||
|
||||
- pin: 9
|
||||
id: [GPIOE_13, GPIOE_13]
|
||||
id: [E13, E13]
|
||||
class: [event_inputs, switch_inputs]
|
||||
function: Digital trigger/switch input
|
||||
ts_name: Digital 5
|
||||
type: din
|
||||
|
||||
- pin: 10
|
||||
id: [GPIOC_6, GPIOC_6]
|
||||
id: [C6, C6]
|
||||
class: [event_inputs, switch_inputs]
|
||||
function: Digital trigger/switch input
|
||||
ts_name: Digital 1
|
||||
type: din
|
||||
|
||||
- pin: 11
|
||||
id: [GPIOE_15, GPIOE_15]
|
||||
id: [E15, E15]
|
||||
class: [event_inputs, switch_inputs]
|
||||
function: Digital trigger/switch input
|
||||
ts_name: Digital 6
|
||||
|
@ -119,32 +119,32 @@ pins:
|
|||
type: 12v
|
||||
|
||||
- pin: PD8
|
||||
id: GPIOD_8
|
||||
id: D8
|
||||
class: outputs
|
||||
ts_name: STM32 PD8
|
||||
|
||||
- pin: PD9
|
||||
id: GPIOD_9
|
||||
id: D9
|
||||
class: outputs
|
||||
ts_name: STM32 PD9
|
||||
|
||||
- pin: PD10
|
||||
id: GPIOD_10
|
||||
id: D10
|
||||
class: outputs
|
||||
ts_name: STM32 PD10
|
||||
|
||||
- pin: PD11
|
||||
id: GPIOD_11
|
||||
id: D11
|
||||
class: outputs
|
||||
ts_name: STM32 PD11
|
||||
|
||||
- pin: PD12
|
||||
id: GPIOD_12
|
||||
id: D12
|
||||
class: outputs
|
||||
ts_name: STM32 PD12
|
||||
|
||||
- pin: PD13
|
||||
id: GPIOD_13
|
||||
id: D13
|
||||
class: outputs
|
||||
ts_name: STM32 PD13
|
||||
|
||||
|
|
|
@ -1,111 +1,111 @@
|
|||
pins:
|
||||
- pin: 1
|
||||
id: GPIOA_8
|
||||
id: A8
|
||||
function: output
|
||||
class: outputs
|
||||
ts_name: Highside 2
|
||||
type: hs
|
||||
|
||||
- pin: 2
|
||||
id: GPIOA_9
|
||||
id: A9
|
||||
function: output
|
||||
class: outputs
|
||||
ts_name: Highside 1
|
||||
type: hs
|
||||
|
||||
- pin: 3
|
||||
id: GPIOD_7
|
||||
id: D7
|
||||
function: "Injector #1"
|
||||
class: outputs
|
||||
ts_name: Lowside 1
|
||||
type: ls
|
||||
|
||||
- pin: 4
|
||||
id: GPIOG_10
|
||||
id: G10
|
||||
function: "Injector #3"
|
||||
class: outputs
|
||||
ts_name: Lowside 3
|
||||
type: ls
|
||||
|
||||
- pin: 5
|
||||
id: GPIOG_12
|
||||
id: G12
|
||||
function: "Injector #5"
|
||||
class: outputs
|
||||
ts_name: Lowside 5
|
||||
type: ls
|
||||
|
||||
- pin: 6
|
||||
id: GPIOG_13
|
||||
id: G13
|
||||
function: "Injector #6"
|
||||
class: outputs
|
||||
ts_name: Lowside 6
|
||||
type: ls
|
||||
|
||||
- pin: 7
|
||||
id: GPIOG_14
|
||||
id: G14
|
||||
function: "Injector #7"
|
||||
class: outputs
|
||||
ts_name: Lowside 7
|
||||
type: ls
|
||||
|
||||
- pin: 8
|
||||
id: GPIOB_5
|
||||
id: B5
|
||||
function: "Injector #9"
|
||||
class: outputs
|
||||
ts_name: Lowside 9
|
||||
type: ls
|
||||
|
||||
- pin: 9
|
||||
id: GPIOB_7
|
||||
id: B7
|
||||
function: "Injector #11"
|
||||
class: outputs
|
||||
ts_name: Lowside 11
|
||||
type: ls
|
||||
|
||||
- pin: 10
|
||||
id: GPIOB_9
|
||||
id: B9
|
||||
function: main relay
|
||||
class: outputs
|
||||
ts_name: Lowside 13
|
||||
type: ls
|
||||
|
||||
- pin: 11
|
||||
id: GPIOE_0
|
||||
id: E0
|
||||
function: Lowside output
|
||||
class: outputs
|
||||
ts_name: Lowside 14
|
||||
type: ls
|
||||
|
||||
- pin: 12
|
||||
id: GPIOE_1
|
||||
id: E1
|
||||
function: radiator fan relay
|
||||
class: outputs
|
||||
ts_name: Lowside 15
|
||||
type: ls
|
||||
|
||||
- pin: 13
|
||||
id: GPIOD_15
|
||||
id: D15
|
||||
function: output
|
||||
class: outputs
|
||||
ts_name: Highside 3
|
||||
type: hs
|
||||
|
||||
- pin: 14
|
||||
id: GPIOD_14
|
||||
id: D14
|
||||
function: output
|
||||
class: outputs
|
||||
ts_name: Highside 4
|
||||
type: hs
|
||||
|
||||
- pin: 15
|
||||
id: GPIOG_9
|
||||
id: G9
|
||||
function: "Injector #2"
|
||||
class: outputs
|
||||
ts_name: Lowside 2
|
||||
type: ls
|
||||
|
||||
- pin: 16
|
||||
id: GPIOG_11
|
||||
id: G11
|
||||
function: "Injector #4"
|
||||
class: outputs
|
||||
ts_name: Lowside 4
|
||||
|
@ -120,35 +120,35 @@ pins:
|
|||
type: gnd
|
||||
|
||||
- pin: 19
|
||||
id: GPIOB_4
|
||||
id: B4
|
||||
function: "Injector #8"
|
||||
class: outputs
|
||||
ts_name: Lowside 8
|
||||
type: ls
|
||||
|
||||
- pin: 20
|
||||
id: GPIOB_6
|
||||
id: B6
|
||||
function: "Injector #10"
|
||||
class: outputs
|
||||
ts_name: Lowside 10
|
||||
type: ls
|
||||
|
||||
- pin: 21
|
||||
id: GPIOB_8
|
||||
id: B8
|
||||
function: "Injector #12"
|
||||
class: outputs
|
||||
ts_name: Lowside 12
|
||||
type: ls
|
||||
|
||||
- pin: 22
|
||||
id: GPIOC_9
|
||||
id: C9
|
||||
function: Ignition cylinder 3
|
||||
class: outputs
|
||||
ts_name: Ign 3
|
||||
type: hl
|
||||
|
||||
- pin: 23
|
||||
id: GPIOE_2
|
||||
id: E2
|
||||
function: Fuel Pump
|
||||
class: outputs
|
||||
ts_name: Lowside 16
|
||||
|
@ -159,77 +159,77 @@ pins:
|
|||
type: gnd
|
||||
|
||||
- pin: 25
|
||||
id: GPIOG_2
|
||||
id: G2
|
||||
function: Ignition cylinder 12
|
||||
class: outputs
|
||||
ts_name: Ign 12
|
||||
type: hl
|
||||
|
||||
- pin: 26
|
||||
id: GPIOG_3
|
||||
id: G3
|
||||
function: Ignition cylinder 11
|
||||
class: outputs
|
||||
ts_name: Ign 11
|
||||
type: hl
|
||||
|
||||
- pin: 27
|
||||
id: GPIOG_4
|
||||
id: G4
|
||||
function: Ignition cylinder 10
|
||||
class: outputs
|
||||
ts_name: Ign 10
|
||||
type: hl
|
||||
|
||||
- pin: 28
|
||||
id: GPIOG_5
|
||||
id: G5
|
||||
function: Ignition cylinder 9
|
||||
class: outputs
|
||||
ts_name: Ign 9
|
||||
type: hl
|
||||
|
||||
- pin: 29
|
||||
id: GPIOG_6
|
||||
id: G6
|
||||
function: Ignition cylinder 8
|
||||
class: outputs
|
||||
ts_name: Ign 8
|
||||
type: hl
|
||||
|
||||
- pin: 30
|
||||
id: GPIOG_7
|
||||
id: G7
|
||||
function: Ignition cylinder 7
|
||||
class: outputs
|
||||
ts_name: Ign 7
|
||||
type: hl
|
||||
|
||||
- pin: 31
|
||||
id: GPIOG_8
|
||||
id: G8
|
||||
function: Ignition cylinder 6
|
||||
class: outputs
|
||||
ts_name: Ign 6
|
||||
type: hl
|
||||
|
||||
- pin: 32
|
||||
id: GPIOC_7
|
||||
id: C7
|
||||
function: Ignition cylinder 5
|
||||
class: outputs
|
||||
ts_name: Ign 5
|
||||
type: hl
|
||||
|
||||
- pin: 33
|
||||
id: GPIOC_8
|
||||
id: C8
|
||||
function: Ignition cylinder 4
|
||||
class: outputs
|
||||
ts_name: Ign 4
|
||||
type: hl
|
||||
|
||||
- pin: 34
|
||||
id: GPIOD_3
|
||||
id: D3
|
||||
function: Ignition cylinder 2
|
||||
class: outputs
|
||||
ts_name: Ign 2
|
||||
type: hl
|
||||
|
||||
- pin: 35
|
||||
id: GPIOD_4
|
||||
id: D4
|
||||
function: Ignition cylinder 1
|
||||
class: outputs
|
||||
ts_name: Ign 1
|
||||
|
|
|
@ -48,56 +48,56 @@ pins:
|
|||
type: 12v
|
||||
|
||||
- pin: 13
|
||||
id: [GPIOC_0, EFI_ADC_10]
|
||||
id: [C0, EFI_ADC_10]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Volt 1
|
||||
function: "Analog Voltage Input #1 MAP"
|
||||
type: av
|
||||
|
||||
- pin: 14
|
||||
id: [GPIOC_2, EFI_ADC_12]
|
||||
id: [C2, EFI_ADC_12]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Volt 3
|
||||
function: "Analog Voltage Input #3"
|
||||
type: av
|
||||
|
||||
- pin: 15
|
||||
id: [GPIOA_0, EFI_ADC_0]
|
||||
id: [A0, EFI_ADC_0]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Volt 5
|
||||
function: "Analog Voltage Input #5"
|
||||
type: av
|
||||
|
||||
- pin: 16
|
||||
id: [GPIOA_2, EFI_ADC_2]
|
||||
id: [A2, EFI_ADC_2]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Volt 7
|
||||
function: "Analog Voltage Input #7"
|
||||
type: av
|
||||
|
||||
- pin: 17
|
||||
id: [GPIOA_4, EFI_ADC_4]
|
||||
id: [A4, EFI_ADC_4]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Volt 9
|
||||
function: "Analog Voltage Input #9"
|
||||
type: av
|
||||
|
||||
- pin: 18
|
||||
id: [GPIOA_6, EFI_ADC_6]
|
||||
id: [A6, EFI_ADC_6]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Volt 11
|
||||
function: "Analog Voltage Input #11"
|
||||
type: av
|
||||
|
||||
- pin: 19
|
||||
id: [GPIOC_4, EFI_ADC_14]
|
||||
id: [C4, EFI_ADC_14]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Temp 1
|
||||
function: "Analog Thermistor Input #1"
|
||||
type: at
|
||||
|
||||
- pin: 20
|
||||
id: [GPIOB_0, EFI_ADC_8]
|
||||
id: [B0, EFI_ADC_8]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Temp 3
|
||||
function: "Analog Thermistor Input #3 (CLT)"
|
||||
|
@ -116,35 +116,35 @@ pins:
|
|||
type: sgnd
|
||||
|
||||
- pin: 24
|
||||
id: [GPIOC_1, EFI_ADC_11]
|
||||
id: [C1, EFI_ADC_11]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Volt 2
|
||||
function: "Analog Voltage Input #2 TPS"
|
||||
type: av
|
||||
|
||||
- pin: 25
|
||||
id: [GPIOC_3, EFI_ADC_13]
|
||||
id: [C3, EFI_ADC_13]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Volt 4
|
||||
function: "Analog Voltage Input #4"
|
||||
type: av
|
||||
|
||||
- pin: 26
|
||||
id: [GPIOA_1, EFI_ADC_1]
|
||||
id: [A1, EFI_ADC_1]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Volt 6
|
||||
function: "Analog Voltage Input #6"
|
||||
type: av
|
||||
|
||||
- pin: 27
|
||||
id: [GPIOA_3, EFI_ADC_3]
|
||||
id: [A3, EFI_ADC_3]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Volt 8
|
||||
function: "Analog Voltage Input #8"
|
||||
type: av
|
||||
|
||||
- pin: 28
|
||||
id: [GPIOA_5, EFI_ADC_5]
|
||||
id: [A5, EFI_ADC_5]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Volt 10
|
||||
function: "Analog Voltage Input #10"
|
||||
|
@ -155,14 +155,14 @@ pins:
|
|||
type: sgnd
|
||||
|
||||
- pin: 30
|
||||
id: [GPIOC_5, EFI_ADC_15]
|
||||
id: [C5, EFI_ADC_15]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Temp 2
|
||||
function: Intake air temperature IAT
|
||||
type: at
|
||||
|
||||
- pin: 31
|
||||
id: [GPIOB_1, EFI_ADC_9]
|
||||
id: [B1, EFI_ADC_9]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
ts_name: Analog Temp 4
|
||||
function: "Analog Thermistor Input #4"
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
// knock 1 - pin PF4
|
||||
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN14
|
||||
#define KNOCK_PIN_CH1 GPIOF_4
|
||||
#define KNOCK_PIN_CH1 Gpio::F4
|
||||
|
||||
// knock 2 - pin PF5
|
||||
#define KNOCK_HAS_CH2 true
|
||||
#define KNOCK_ADC_CH2 ADC_CHANNEL_IN15
|
||||
#define KNOCK_PIN_CH2 GPIOF_5
|
||||
#define KNOCK_PIN_CH2 Gpio::F5
|
||||
|
||||
// Sample rate & time - depends on the exact MCU
|
||||
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84
|
||||
|
|
|
@ -7,68 +7,68 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define PROTEUS_LS_1 GPIOD_7
|
||||
#define PROTEUS_LS_1 Gpio::D7
|
||||
// pin 15/black35
|
||||
#define PROTEUS_LS_2 GPIOG_9
|
||||
#define PROTEUS_LS_2 Gpio::G9
|
||||
|
||||
// pin 4/black35
|
||||
#define PROTEUS_LS_3 GPIOG_10
|
||||
#define PROTEUS_LS_3 Gpio::G10
|
||||
|
||||
// pin 16/black35
|
||||
#define PROTEUS_LS_4 GPIOG_11
|
||||
#define PROTEUS_LS_4 Gpio::G11
|
||||
|
||||
// pin 5/black35
|
||||
#define PROTEUS_LS_5 GPIOG_12
|
||||
#define PROTEUS_LS_5 Gpio::G12
|
||||
|
||||
// pin 6/black35
|
||||
#define PROTEUS_LS_6 GPIOG_13
|
||||
#define PROTEUS_LS_6 Gpio::G13
|
||||
|
||||
// pin 7/black35
|
||||
#define PROTEUS_LS_7 GPIOG_14
|
||||
#define PROTEUS_LS_8 GPIOB_4
|
||||
#define PROTEUS_LS_9 GPIOB_5
|
||||
#define PROTEUS_LS_7 Gpio::G14
|
||||
#define PROTEUS_LS_8 Gpio::B4
|
||||
#define PROTEUS_LS_9 Gpio::B5
|
||||
|
||||
// pin 20/black35
|
||||
#define PROTEUS_LS_10 GPIOB_6
|
||||
#define PROTEUS_LS_11 GPIOB_7
|
||||
#define PROTEUS_LS_12 GPIOB_8
|
||||
#define PROTEUS_LS_10 Gpio::B6
|
||||
#define PROTEUS_LS_11 Gpio::B7
|
||||
#define PROTEUS_LS_12 Gpio::B8
|
||||
|
||||
// pin 10/black35
|
||||
#define PROTEUS_LS_13 GPIOB_9
|
||||
#define PROTEUS_LS_14 GPIOE_0
|
||||
#define PROTEUS_LS_13 Gpio::B9
|
||||
#define PROTEUS_LS_14 Gpio::E0
|
||||
// pin 12/black35
|
||||
#define PROTEUS_LS_15 GPIOE_1
|
||||
#define PROTEUS_LS_15 Gpio::E1
|
||||
// pin 23/black35
|
||||
#define PROTEUS_LS_16 GPIOE_2
|
||||
#define PROTEUS_LS_16 Gpio::E2
|
||||
|
||||
|
||||
// pin 2/black35
|
||||
#define PROTEUS_HS_1 GPIOA_9
|
||||
#define PROTEUS_HS_1 Gpio::A9
|
||||
|
||||
// pin 1/black35
|
||||
#define PROTEUS_HS_2 GPIOA_8
|
||||
#define PROTEUS_HS_2 Gpio::A8
|
||||
|
||||
#define PROTEUS_HS_3 GPIOD_15
|
||||
#define PROTEUS_HS_3 Gpio::D15
|
||||
|
||||
#define PROTEUS_HS_4 GPIOD_14
|
||||
#define PROTEUS_HS_4 Gpio::D14
|
||||
|
||||
// pin 35/black35
|
||||
#define PROTEUS_IGN_1 GPIOD_4
|
||||
#define PROTEUS_IGN_1 Gpio::D4
|
||||
|
||||
// pin 34/black35
|
||||
#define PROTEUS_IGN_2 GPIOD_3
|
||||
#define PROTEUS_IGN_2 Gpio::D3
|
||||
|
||||
// pin 22/black35
|
||||
#define PROTEUS_IGN_3 GPIOC_9
|
||||
#define PROTEUS_IGN_4 GPIOC_8
|
||||
#define PROTEUS_IGN_5 GPIOC_7
|
||||
#define PROTEUS_IGN_6 GPIOG_8
|
||||
#define PROTEUS_IGN_7 GPIOG_7
|
||||
#define PROTEUS_IGN_8 GPIOG_6
|
||||
#define PROTEUS_IGN_9 GPIOG_5
|
||||
#define PROTEUS_IGN_10 GPIOG_4
|
||||
#define PROTEUS_IGN_11 GPIOG_3
|
||||
#define PROTEUS_IGN_12 GPIOG_2
|
||||
#define PROTEUS_IGN_3 Gpio::C9
|
||||
#define PROTEUS_IGN_4 Gpio::C8
|
||||
#define PROTEUS_IGN_5 Gpio::C7
|
||||
#define PROTEUS_IGN_6 Gpio::G8
|
||||
#define PROTEUS_IGN_7 Gpio::G7
|
||||
#define PROTEUS_IGN_8 Gpio::G6
|
||||
#define PROTEUS_IGN_9 Gpio::G5
|
||||
#define PROTEUS_IGN_10 Gpio::G4
|
||||
#define PROTEUS_IGN_11 Gpio::G3
|
||||
#define PROTEUS_IGN_12 Gpio::G2
|
||||
|
||||
// Analog Temp 1 = PC4
|
||||
#define PROTEUS_IN_ANALOG_TEMP_1 EFI_ADC_14
|
||||
|
@ -119,12 +119,12 @@
|
|||
// PA6
|
||||
#define PROTEUS_IN_ANALOG_VOLT_11 EFI_ADC_6
|
||||
|
||||
#define PROTEUS_VR_1 GPIOE_7
|
||||
#define PROTEUS_VR_2 GPIOE_8
|
||||
#define PROTEUS_VR_1 Gpio::E7
|
||||
#define PROTEUS_VR_2 Gpio::E8
|
||||
|
||||
#define PROTEUS_DIGITAL_1 GPIOC_6
|
||||
#define PROTEUS_DIGITAL_2 GPIOE_11
|
||||
#define PROTEUS_DIGITAL_3 GPIOE_12
|
||||
#define PROTEUS_DIGITAL_4 GPIOE_14
|
||||
#define PROTEUS_DIGITAL_5 GPIOE_13
|
||||
#define PROTEUS_DIGITAL_6 GPIOE_15
|
||||
#define PROTEUS_DIGITAL_1 Gpio::C6
|
||||
#define PROTEUS_DIGITAL_2 Gpio::E11
|
||||
#define PROTEUS_DIGITAL_3 Gpio::E12
|
||||
#define PROTEUS_DIGITAL_4 Gpio::E14
|
||||
#define PROTEUS_DIGITAL_5 Gpio::E13
|
||||
#define PROTEUS_DIGITAL_6 Gpio::E15
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
#define BOARD_NAME "Subaru EG33/STM32F765 for RusEFI"
|
||||
|
||||
#define EFI_USB_AF 10U
|
||||
//#define EFI_USB_SERIAL_ID GPIOA_10
|
||||
#define EFI_USB_SERIAL_DM GPIOA_11
|
||||
#define EFI_USB_SERIAL_DP GPIOA_12
|
||||
//#define EFI_USB_SERIAL_ID Gpio::A10
|
||||
#define EFI_USB_SERIAL_DM Gpio::A11
|
||||
#define EFI_USB_SERIAL_DP Gpio::A12
|
||||
|
||||
/*
|
||||
* Board oscillators-related settings.
|
||||
|
|
|
@ -14,7 +14,7 @@ ifeq ($(USE_BOOTLOADER),yes)
|
|||
endif
|
||||
|
||||
#LED
|
||||
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOG_7
|
||||
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::G7
|
||||
|
||||
# We are running on Subaru EG33 hardware!
|
||||
DDEFS += -DHW_SUBARU_EG33=1
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
|
||||
void setSerialConfigurationOverrides() {
|
||||
engineConfiguration->useSerialPort = false;
|
||||
engineConfiguration->binarySerialTxPin = GPIOE_1;
|
||||
engineConfiguration->binarySerialRxPin = GPIOE_0;
|
||||
engineConfiguration->binarySerialTxPin = Gpio::E1;
|
||||
engineConfiguration->binarySerialRxPin = Gpio::E0;
|
||||
/* actually Bluetooth/WiFi interface */
|
||||
//engineConfiguration->consoleSerialTxPin = GPIOC_10;
|
||||
//engineConfiguration->consoleSerialRxPin = GPIOC_11;
|
||||
//engineConfiguration->consoleSerialTxPin = Gpio::C10;
|
||||
//engineConfiguration->consoleSerialRxPin = Gpio::C11;
|
||||
engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED;
|
||||
engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ void setSerialConfigurationOverrides() {
|
|||
void setSdCardConfigurationOverrides() {
|
||||
engineConfiguration->is_enabled_spi_1 = false;
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_1;
|
||||
engineConfiguration->sdCardCsPin = GPIOA_2;
|
||||
engineConfiguration->sdCardCsPin = Gpio::A2;
|
||||
engineConfiguration->isSdCardEnabled = false;
|
||||
}
|
||||
|
||||
|
@ -72,62 +72,62 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_NONE;
|
||||
|
||||
/* Injectors */
|
||||
engineConfiguration->injectionPins[1 - 1] = MC33810_0_OUT_0;
|
||||
engineConfiguration->injectionPins[2 - 1] = MC33810_1_OUT_0;
|
||||
engineConfiguration->injectionPins[3 - 1] = MC33810_0_OUT_1;
|
||||
engineConfiguration->injectionPins[4 - 1] = MC33810_1_OUT_1;
|
||||
engineConfiguration->injectionPins[5 - 1] = MC33810_0_OUT_2;
|
||||
engineConfiguration->injectionPins[6 - 1] = MC33810_1_OUT_2;
|
||||
engineConfiguration->injectionPins[1 - 1] = Gpio::MC33810_0_OUT_0;
|
||||
engineConfiguration->injectionPins[2 - 1] = Gpio::MC33810_1_OUT_0;
|
||||
engineConfiguration->injectionPins[3 - 1] = Gpio::MC33810_0_OUT_1;
|
||||
engineConfiguration->injectionPins[4 - 1] = Gpio::MC33810_1_OUT_1;
|
||||
engineConfiguration->injectionPins[5 - 1] = Gpio::MC33810_0_OUT_2;
|
||||
engineConfiguration->injectionPins[6 - 1] = Gpio::MC33810_1_OUT_2;
|
||||
/* Additional, not used for EG33 */
|
||||
engineConfiguration->injectionPins[7 - 1] = MC33810_0_OUT_3;
|
||||
engineConfiguration->injectionPins[8 - 1] = MC33810_1_OUT_3;
|
||||
engineConfiguration->injectionPins[7 - 1] = Gpio::MC33810_0_OUT_3;
|
||||
engineConfiguration->injectionPins[8 - 1] = Gpio::MC33810_1_OUT_3;
|
||||
|
||||
/* Ignition */
|
||||
engineConfiguration->ignitionPins[1 - 1] = MC33810_1_GD_3;
|
||||
engineConfiguration->ignitionPins[2 - 1] = MC33810_1_GD_2;
|
||||
engineConfiguration->ignitionPins[3 - 1] = MC33810_0_GD_1;
|
||||
engineConfiguration->ignitionPins[4 - 1] = MC33810_0_GD_0;
|
||||
engineConfiguration->ignitionPins[5 - 1] = MC33810_0_GD_3;
|
||||
engineConfiguration->ignitionPins[6 - 1] = MC33810_1_GD_1;
|
||||
engineConfiguration->ignitionPins[1 - 1] = Gpio::MC33810_1_GD_3;
|
||||
engineConfiguration->ignitionPins[2 - 1] = Gpio::MC33810_1_GD_2;
|
||||
engineConfiguration->ignitionPins[3 - 1] = Gpio::MC33810_0_GD_1;
|
||||
engineConfiguration->ignitionPins[4 - 1] = Gpio::MC33810_0_GD_0;
|
||||
engineConfiguration->ignitionPins[5 - 1] = Gpio::MC33810_0_GD_3;
|
||||
engineConfiguration->ignitionPins[6 - 1] = Gpio::MC33810_1_GD_1;
|
||||
/* Additional, not used for EG33 */
|
||||
engineConfiguration->ignitionPins[7 - 1] = MC33810_0_GD_2;
|
||||
engineConfiguration->ignitionPins[8 - 1] = MC33810_1_GD_0;
|
||||
engineConfiguration->ignitionPins[7 - 1] = Gpio::MC33810_0_GD_2;
|
||||
engineConfiguration->ignitionPins[8 - 1] = Gpio::MC33810_1_GD_0;
|
||||
//engineConfiguration->ignitionPinMode = OM_INVERTED;
|
||||
|
||||
// Idle configuration
|
||||
engineConfiguration->useStepperIdle = false;
|
||||
engineConfiguration->isDoubleSolenoidIdle = true;
|
||||
engineConfiguration->idle.solenoidPin = TLE6240_PIN_11;
|
||||
engineConfiguration->secondSolenoidPin = TLE6240_PIN_12;
|
||||
engineConfiguration->idle.solenoidPin = Gpio::TLE6240_PIN_11;
|
||||
engineConfiguration->secondSolenoidPin = Gpio::TLE6240_PIN_12;
|
||||
|
||||
engineConfiguration->communicationLedPin = GPIOG_6; /* LD1 - green */
|
||||
engineConfiguration->runningLedPin = GPIOG_8; /* LD3 - yellow */
|
||||
engineConfiguration->warningLedPin = GPIO_UNASSIGNED; /* LD3 - yellow*/
|
||||
engineConfiguration->communicationLedPin = Gpio::G6; /* LD1 - green */
|
||||
engineConfiguration->runningLedPin = Gpio::G8; /* LD3 - yellow */
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned; /* LD3 - yellow*/
|
||||
//engineConfiguration->unusedErrorPin = LED_ERROR_BRAIN_PIN; /* LD2 - red */
|
||||
|
||||
/* IF you have BOTH camshaft position sensor and crankshaft position sensor
|
||||
* camshaft is always trigger#1 input and then crankshaft is trigger#2. */
|
||||
engineConfiguration->triggerInputPins[0] = GPIOH_12; /* cam */
|
||||
engineConfiguration->triggerInputPins[1] = GPIOH_10; /* crank pos #1 */
|
||||
engineConfiguration->triggerInputPins[2] = GPIOE_9; /* crank pos #2 */
|
||||
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::H12; /* cam */
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::H10; /* crank pos #1 */
|
||||
engineConfiguration->triggerInputPins[2] = Gpio::E9; /* crank pos #2 */
|
||||
engineConfiguration->camInputs[0] = Gpio::Unassigned;
|
||||
|
||||
/* SPI devices: mess of board and engine configurations */
|
||||
/* TLE6240 */
|
||||
engineConfiguration->tle6240spiDevice = SPI_DEVICE_4;
|
||||
engineConfiguration->tle6240_cs = GPIOE_15; /* SPI4_NSS0 */
|
||||
engineConfiguration->tle6240_cs = Gpio::E15; /* SPI4_NSS0 */
|
||||
engineConfiguration->tle6240_csPinMode = OM_OPENDRAIN;
|
||||
/* MC33972 */
|
||||
engineConfiguration->mc33972spiDevice = SPI_DEVICE_4;
|
||||
engineConfiguration->mc33972_cs = GPIOE_10; /* SPI4_NSS2 */
|
||||
engineConfiguration->mc33972_cs = Gpio::E10; /* SPI4_NSS2 */
|
||||
engineConfiguration->mc33972_csPinMode = OM_DEFAULT;
|
||||
|
||||
/* TLE6240 - OUT3, also PG2 through 3.3V-> 5.0V level translator - not installed */
|
||||
engineConfiguration->tachOutputPin = TLE6240_PIN_2;
|
||||
engineConfiguration->tachOutputPin = Gpio::TLE6240_PIN_2;
|
||||
engineConfiguration->tachOutputPinMode = OM_DEFAULT;
|
||||
|
||||
/* spi driven - TLE6240 - OUT5 */
|
||||
engineConfiguration->fuelPumpPin = TLE6240_PIN_5;
|
||||
engineConfiguration->fuelPumpPin = Gpio::TLE6240_PIN_5;
|
||||
engineConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||
|
||||
/* Self shutdown ouput:
|
||||
|
@ -137,32 +137,32 @@ void setBoardDefaultConfiguration() {
|
|||
* So ECU does not need to drive this signal.
|
||||
* The only puprose of this output is to keep ECU powered to finish some stuff before power off itself
|
||||
* To support this we need to sense ING input from key switch */
|
||||
//engineConfiguration->mainRelayPin = GPIOH_7;
|
||||
//engineConfiguration->mainRelayPin = Gpio::H7;
|
||||
//engineConfiguration->mainRelayPinMode = OM_DEFAULT;
|
||||
|
||||
/* spi driven - TLE6240 - OUT1, OUT2 */
|
||||
engineConfiguration->fanPin = TLE6240_PIN_1;
|
||||
engineConfiguration->fanPin = Gpio::TLE6240_PIN_1;
|
||||
engineConfiguration->fanPinMode = OM_DEFAULT;
|
||||
/* TODO: second fan */
|
||||
//engineConfiguration->fanPin[1] = TLE6240_PIN_2;
|
||||
//engineConfiguration->fanPin[1] = Gpio::TLE6240_2;
|
||||
//engineConfiguration->fanPinMode[1] = OM_DEFAULT;
|
||||
/* spi driven - TLE6240 - OUT8 */
|
||||
engineConfiguration->malfunctionIndicatorPin = TLE6240_PIN_7;
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::TLE6240_PIN_7;
|
||||
engineConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
|
||||
|
||||
/* not used */
|
||||
engineConfiguration->displayMode = DM_NONE;
|
||||
engineConfiguration->HD44780_rs = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_e = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_db4 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_db5 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_db6 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_db7 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->digitalPotentiometerChipSelect[0] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->digitalPotentiometerChipSelect[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->digitalPotentiometerChipSelect[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->digitalPotentiometerChipSelect[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->vehicleSpeedSensorInputPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_rs = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_e = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_db4 = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_db5 = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_db6 = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_db7 = Gpio::Unassigned;
|
||||
engineConfiguration->digitalPotentiometerChipSelect[0] = Gpio::Unassigned;
|
||||
engineConfiguration->digitalPotentiometerChipSelect[1] = Gpio::Unassigned;
|
||||
engineConfiguration->digitalPotentiometerChipSelect[2] = Gpio::Unassigned;
|
||||
engineConfiguration->digitalPotentiometerChipSelect[3] = Gpio::Unassigned;
|
||||
engineConfiguration->vehicleSpeedSensorInputPin = Gpio::Unassigned;
|
||||
|
||||
/* SPIs */
|
||||
engineConfiguration->is_enabled_spi_1 = true;
|
||||
|
@ -170,18 +170,18 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
engineConfiguration->is_enabled_spi_4 = true;
|
||||
|
||||
engineConfiguration->spi1mosiPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->spi1mosiPin = Gpio::Unassigned;
|
||||
engineConfiguration->spi1MosiMode = PO_DEFAULT;
|
||||
engineConfiguration->spi1misoPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->spi1misoPin = Gpio::Unassigned;
|
||||
engineConfiguration->spi1MisoMode = PO_DEFAULT;
|
||||
engineConfiguration->spi1sckPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->spi1sckPin = Gpio::Unassigned;
|
||||
engineConfiguration->spi1SckMode = PO_DEFAULT;
|
||||
|
||||
engineConfiguration->spi3mosiPin = GPIOC_12;
|
||||
engineConfiguration->spi3mosiPin = Gpio::C12;
|
||||
engineConfiguration->spi3MosiMode = PO_DEFAULT;
|
||||
engineConfiguration->spi3misoPin = GPIOC_11;
|
||||
engineConfiguration->spi3misoPin = Gpio::C11;
|
||||
engineConfiguration->spi3MisoMode = PO_DEFAULT;
|
||||
engineConfiguration->spi3sckPin = GPIOC_10;
|
||||
engineConfiguration->spi3sckPin = Gpio::C10;
|
||||
engineConfiguration->spi3SckMode = PO_DEFAULT;
|
||||
|
||||
/* TODO: add settings for SPI4 */
|
||||
|
@ -189,9 +189,9 @@ void setBoardDefaultConfiguration() {
|
|||
/* Knock sensor */
|
||||
/* Interface settings */
|
||||
engineConfiguration->hip9011SpiDevice = SPI_DEVICE_4;
|
||||
engineConfiguration->hip9011CsPin = GPIOE_11; /* SPI4_NSS1 */
|
||||
engineConfiguration->hip9011CsPin = Gpio::E11; /* SPI4_NSS1 */
|
||||
engineConfiguration->hip9011CsPinMode = OM_OPENDRAIN;
|
||||
engineConfiguration->hip9011IntHoldPin = GPIOH_8;
|
||||
engineConfiguration->hip9011IntHoldPin = Gpio::H8;
|
||||
engineConfiguration->hip9011IntHoldPinMode = OM_OPENDRAIN;
|
||||
engineConfiguration->hipOutputChannel = EFI_ADC_7; /* PA7 */
|
||||
engineConfiguration->isHip9011Enabled = true;
|
||||
|
@ -220,24 +220,24 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->cylinderBankSelect[6 - 1] = 1;
|
||||
|
||||
/* Misc settings */
|
||||
engineConfiguration->acSwitch = MC33972_PIN_22;
|
||||
engineConfiguration->acSwitch = Gpio::MC33972_PIN_22;
|
||||
engineConfiguration->acSwitchMode = PI_DEFAULT;
|
||||
|
||||
/* This board also has AC clutch output: */
|
||||
engineConfiguration->acRelayPin = TLE6240_PIN_15;
|
||||
engineConfiguration->acRelayPin = Gpio::TLE6240_PIN_15;
|
||||
engineConfiguration->maxAcRpm = 3000;
|
||||
engineConfiguration->acIdleRpmBump = 200;
|
||||
|
||||
engineConfiguration->isCJ125Enabled = false;
|
||||
|
||||
/* CAN */
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
|
||||
/* not used pins with testpads */
|
||||
engineConfiguration->triggerSimulatorPins[0] = GPIOH_2;
|
||||
engineConfiguration->triggerSimulatorPins[1] = GPIOH_3;
|
||||
engineConfiguration->triggerSimulatorPins[2] = GPIOH_4;
|
||||
engineConfiguration->triggerSimulatorPins[0] = Gpio::H2;
|
||||
engineConfiguration->triggerSimulatorPins[1] = Gpio::H3;
|
||||
engineConfiguration->triggerSimulatorPins[2] = Gpio::H4;
|
||||
engineConfiguration->triggerSimulatorPinModes[0] = OM_DEFAULT;
|
||||
engineConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT;
|
||||
engineConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT;
|
||||
|
@ -330,11 +330,11 @@ static void board_init_ext_gpios()
|
|||
{
|
||||
int ret;
|
||||
|
||||
ret = mc33810_add(MC33810_0_OUT_0, 0, &mc33810_odd);
|
||||
ret = mc33810_add(Gpio::MC33810_0_OUT_0, 0, &mc33810_odd);
|
||||
if (ret < 0) {
|
||||
/* error */
|
||||
}
|
||||
ret = mc33810_add(MC33810_1_OUT_0, 1, &mc33810_even);
|
||||
ret = mc33810_add(Gpio::MC33810_1_OUT_0, 1, &mc33810_even);
|
||||
if (ret < 0) {
|
||||
/* error */
|
||||
}
|
||||
|
|
|
@ -44,14 +44,14 @@ pins:
|
|||
type: av
|
||||
|
||||
- pin: 7
|
||||
id: GPIOH_12
|
||||
id: H12
|
||||
class: event_inputs
|
||||
function: Cam VR+
|
||||
ts_name: A07 - Cam VR+
|
||||
type: vr
|
||||
|
||||
- pin: 8
|
||||
id: GPIOE_9
|
||||
id: E9
|
||||
class: event_inputs
|
||||
function: Crank 2 VR+
|
||||
ts_name: A08 - Crank 2 VR+
|
||||
|
|
|
@ -34,7 +34,7 @@ pins:
|
|||
type: sgnd
|
||||
|
||||
- pin: 7
|
||||
id: GPIO_UNASSIGNED
|
||||
id: Unassigned
|
||||
class: switch_inputs
|
||||
function: Power Steering Switch
|
||||
ts_name: B07 - Power Steering Switch
|
||||
|
@ -62,7 +62,7 @@ pins:
|
|||
type: av
|
||||
|
||||
- pin: 11
|
||||
id: GPIOD_14
|
||||
id: D14
|
||||
class: event_inputs
|
||||
function: Speed Din
|
||||
ts_name: B11 - Speed Din
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
pins:
|
||||
- pin: 1
|
||||
id: GPIOH_10
|
||||
id: H10
|
||||
class: event_inputs
|
||||
function: Crank 1 VR+
|
||||
ts_name: A08 - Crank 1 VR+
|
||||
|
|
|
@ -31,7 +31,7 @@ pins:
|
|||
type: av
|
||||
|
||||
- pin: 5
|
||||
id: GPIOH_7
|
||||
id: H7
|
||||
class: outputs
|
||||
function: Self Shutdown
|
||||
ts_name: D05 - Self Shutdown
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
enum class TestCppStyleEnum : uint8_t { };
|
||||
|
||||
// todo: migrate/unify with pin_output_mode_e? rename? something is messy here
|
||||
// this enum is currently only used for SPI pins
|
||||
typedef enum __attribute__ ((__packed__)) {
|
||||
|
@ -22,162 +20,162 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
/**
|
||||
* Hardware pin. This enum is platform-specific.
|
||||
*/
|
||||
typedef enum __attribute__ ((__packed__)) {
|
||||
GPIO_UNASSIGNED = 0,
|
||||
GPIO_INVALID = 1,
|
||||
enum class Gpio : uint8_t {
|
||||
Unassigned = 0,
|
||||
Invalid = 1,
|
||||
|
||||
GPIOA_0 = 2,
|
||||
GPIOA_1 = 3,
|
||||
GPIOA_2 = 4,
|
||||
GPIOA_3 = 5,
|
||||
GPIOA_4 = 6,
|
||||
GPIOA_5 = 7,
|
||||
GPIOA_6 = 8,
|
||||
GPIOA_7 = 9,
|
||||
GPIOA_8 = 10,
|
||||
GPIOA_9 = 11,
|
||||
GPIOA_10 = 12,
|
||||
GPIOA_11 = 13,
|
||||
GPIOA_12 = 14,
|
||||
GPIOA_13 = 15,
|
||||
GPIOA_14 = 16,
|
||||
GPIOA_15 = 17,
|
||||
A0 = 2,
|
||||
A1 = 3,
|
||||
A2 = 4,
|
||||
A3 = 5,
|
||||
A4 = 6,
|
||||
A5 = 7,
|
||||
A6 = 8,
|
||||
A7 = 9,
|
||||
A8 = 10,
|
||||
A9 = 11,
|
||||
A10 = 12,
|
||||
A11 = 13,
|
||||
A12 = 14,
|
||||
A13 = 15,
|
||||
A14 = 16,
|
||||
A15 = 17,
|
||||
|
||||
GPIOB_0 = 18,
|
||||
GPIOB_1 = 19,
|
||||
GPIOB_2 = 20,
|
||||
GPIOB_3 = 21,
|
||||
GPIOB_4 = 22,
|
||||
GPIOB_5 = 23,
|
||||
GPIOB_6 = 24,
|
||||
GPIOB_7 = 25,
|
||||
GPIOB_8 = 26,
|
||||
GPIOB_9 = 27,
|
||||
GPIOB_10 = 28,
|
||||
GPIOB_11 = 29,
|
||||
GPIOB_12 = 30,
|
||||
GPIOB_13 = 31,
|
||||
GPIOB_14 = 32,
|
||||
GPIOB_15 = 33,
|
||||
B0 = 18,
|
||||
B1 = 19,
|
||||
B2 = 20,
|
||||
B3 = 21,
|
||||
B4 = 22,
|
||||
B5 = 23,
|
||||
B6 = 24,
|
||||
B7 = 25,
|
||||
B8 = 26,
|
||||
B9 = 27,
|
||||
B10 = 28,
|
||||
B11 = 29,
|
||||
B12 = 30,
|
||||
B13 = 31,
|
||||
B14 = 32,
|
||||
B15 = 33,
|
||||
|
||||
GPIOC_0 = 34,
|
||||
GPIOC_1 = 35,
|
||||
GPIOC_2 = 36,
|
||||
GPIOC_3 = 37,
|
||||
GPIOC_4 = 38,
|
||||
GPIOC_5 = 39,
|
||||
GPIOC_6 = 40,
|
||||
GPIOC_7 = 41,
|
||||
GPIOC_8 = 42,
|
||||
GPIOC_9 = 43,
|
||||
GPIOC_10 = 44,
|
||||
GPIOC_11 = 45,
|
||||
GPIOC_12 = 46,
|
||||
GPIOC_13 = 47,
|
||||
GPIOC_14 = 48,
|
||||
GPIOC_15 = 49,
|
||||
C0 = 34,
|
||||
C1 = 35,
|
||||
C2 = 36,
|
||||
C3 = 37,
|
||||
C4 = 38,
|
||||
C5 = 39,
|
||||
C6 = 40,
|
||||
C7 = 41,
|
||||
C8 = 42,
|
||||
C9 = 43,
|
||||
C10 = 44,
|
||||
C11 = 45,
|
||||
C12 = 46,
|
||||
C13 = 47,
|
||||
C14 = 48,
|
||||
C15 = 49,
|
||||
|
||||
GPIOD_0 = 50,
|
||||
GPIOD_1 = 51,
|
||||
GPIOD_2 = 52,
|
||||
GPIOD_3 = 53,
|
||||
GPIOD_4 = 54,
|
||||
GPIOD_5 = 55,
|
||||
GPIOD_6 = 56,
|
||||
GPIOD_7 = 57,
|
||||
GPIOD_8 = 58,
|
||||
GPIOD_9 = 59,
|
||||
GPIOD_10 = 60,
|
||||
GPIOD_11 = 61,
|
||||
GPIOD_12 = 62,
|
||||
GPIOD_13 = 63,
|
||||
GPIOD_14 = 64,
|
||||
GPIOD_15 = 65,
|
||||
D0 = 50,
|
||||
D1 = 51,
|
||||
D2 = 52,
|
||||
D3 = 53,
|
||||
D4 = 54,
|
||||
D5 = 55,
|
||||
D6 = 56,
|
||||
D7 = 57,
|
||||
D8 = 58,
|
||||
D9 = 59,
|
||||
D10 = 60,
|
||||
D11 = 61,
|
||||
D12 = 62,
|
||||
D13 = 63,
|
||||
D14 = 64,
|
||||
D15 = 65,
|
||||
|
||||
GPIOE_0 = 66,
|
||||
GPIOE_1 = 67,
|
||||
GPIOE_2 = 68,
|
||||
GPIOE_3 = 69,
|
||||
GPIOE_4 = 70,
|
||||
GPIOE_5 = 71,
|
||||
GPIOE_6 = 72,
|
||||
GPIOE_7 = 73,
|
||||
GPIOE_8 = 74,
|
||||
GPIOE_9 = 75,
|
||||
GPIOE_10 = 76,
|
||||
GPIOE_11 = 77,
|
||||
GPIOE_12 = 78,
|
||||
GPIOE_13 = 79,
|
||||
GPIOE_14 = 80,
|
||||
GPIOE_15 = 81,
|
||||
E0 = 66,
|
||||
E1 = 67,
|
||||
E2 = 68,
|
||||
E3 = 69,
|
||||
E4 = 70,
|
||||
E5 = 71,
|
||||
E6 = 72,
|
||||
E7 = 73,
|
||||
E8 = 74,
|
||||
E9 = 75,
|
||||
E10 = 76,
|
||||
E11 = 77,
|
||||
E12 = 78,
|
||||
E13 = 79,
|
||||
E14 = 80,
|
||||
E15 = 81,
|
||||
|
||||
GPIOF_0 = 82,
|
||||
GPIOF_1 = 83,
|
||||
GPIOF_2 = 84,
|
||||
GPIOF_3 = 85,
|
||||
GPIOF_4 = 86,
|
||||
GPIOF_5 = 87,
|
||||
GPIOF_6 = 88,
|
||||
GPIOF_7 = 89,
|
||||
GPIOF_8 = 90,
|
||||
GPIOF_9 = 91,
|
||||
GPIOF_10 = 92,
|
||||
GPIOF_11 = 93,
|
||||
GPIOF_12 = 94,
|
||||
GPIOF_13 = 95,
|
||||
GPIOF_14 = 96,
|
||||
GPIOF_15 = 97,
|
||||
F0 = 82,
|
||||
F1 = 83,
|
||||
F2 = 84,
|
||||
F3 = 85,
|
||||
F4 = 86,
|
||||
F5 = 87,
|
||||
F6 = 88,
|
||||
F7 = 89,
|
||||
F8 = 90,
|
||||
F9 = 91,
|
||||
F10 = 92,
|
||||
F11 = 93,
|
||||
F12 = 94,
|
||||
F13 = 95,
|
||||
F14 = 96,
|
||||
F15 = 97,
|
||||
|
||||
GPIOG_0 = 98,
|
||||
GPIOG_1 = 99,
|
||||
GPIOG_2 = 100,
|
||||
GPIOG_3 = 101,
|
||||
GPIOG_4 = 102,
|
||||
GPIOG_5 = 103,
|
||||
GPIOG_6 = 104,
|
||||
GPIOG_7 = 105,
|
||||
GPIOG_8 = 106,
|
||||
GPIOG_9 = 107,
|
||||
GPIOG_10 = 108,
|
||||
GPIOG_11 = 109,
|
||||
GPIOG_12 = 110,
|
||||
GPIOG_13 = 111,
|
||||
GPIOG_14 = 112,
|
||||
GPIOG_15 = 113,
|
||||
G0 = 98,
|
||||
G1 = 99,
|
||||
G2 = 100,
|
||||
G3 = 101,
|
||||
G4 = 102,
|
||||
G5 = 103,
|
||||
G6 = 104,
|
||||
G7 = 105,
|
||||
G8 = 106,
|
||||
G9 = 107,
|
||||
G10 = 108,
|
||||
G11 = 109,
|
||||
G12 = 110,
|
||||
G13 = 111,
|
||||
G14 = 112,
|
||||
G15 = 113,
|
||||
|
||||
GPIOH_0 = 114,
|
||||
GPIOH_1 = 115,
|
||||
GPIOH_2 = 116,
|
||||
GPIOH_3 = 117,
|
||||
GPIOH_4 = 118,
|
||||
GPIOH_5 = 119,
|
||||
GPIOH_6 = 120,
|
||||
GPIOH_7 = 121,
|
||||
GPIOH_8 = 122,
|
||||
GPIOH_9 = 123,
|
||||
GPIOH_10 = 124,
|
||||
GPIOH_11 = 125,
|
||||
GPIOH_12 = 126,
|
||||
GPIOH_13 = 127,
|
||||
GPIOH_14 = 128,
|
||||
GPIOH_15 = 129,
|
||||
H0 = 114,
|
||||
H1 = 115,
|
||||
H2 = 116,
|
||||
H3 = 117,
|
||||
H4 = 118,
|
||||
H5 = 119,
|
||||
H6 = 120,
|
||||
H7 = 121,
|
||||
H8 = 122,
|
||||
H9 = 123,
|
||||
H10 = 124,
|
||||
H11 = 125,
|
||||
H12 = 126,
|
||||
H13 = 127,
|
||||
H14 = 128,
|
||||
H15 = 129,
|
||||
|
||||
GPIOI_0 = 130,
|
||||
GPIOI_1 = 131,
|
||||
GPIOI_2 = 132,
|
||||
GPIOI_3 = 133,
|
||||
GPIOI_4 = 134,
|
||||
GPIOI_5 = 135,
|
||||
GPIOI_6 = 136,
|
||||
GPIOI_7 = 137,
|
||||
GPIOI_8 = 138,
|
||||
GPIOI_9 = 139,
|
||||
GPIOI_10 = 140,
|
||||
GPIOI_11 = 141,
|
||||
GPIOI_12 = 142,
|
||||
GPIOI_13 = 143,
|
||||
GPIOI_14 = 144,
|
||||
GPIOI_15 = 145,
|
||||
I0 = 130,
|
||||
I1 = 131,
|
||||
I2 = 132,
|
||||
I3 = 133,
|
||||
I4 = 134,
|
||||
I5 = 135,
|
||||
I6 = 136,
|
||||
I7 = 137,
|
||||
I8 = 138,
|
||||
I9 = 139,
|
||||
I10 = 140,
|
||||
I11 = 141,
|
||||
I12 = 142,
|
||||
I13 = 143,
|
||||
I14 = 144,
|
||||
I15 = 145,
|
||||
|
||||
TLE6240_PIN_1 = 146,
|
||||
TLE6240_PIN_2 = 147,
|
||||
|
@ -236,13 +234,13 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
MC33810_1_GD_1 = 197,
|
||||
MC33810_1_GD_2 = 198,
|
||||
MC33810_1_GD_3 = 199,
|
||||
} brain_pin_e;
|
||||
};
|
||||
|
||||
/* Plase keep updating these defines */
|
||||
#define BRAIN_PIN_ONCHIP_LAST GPIOI_15
|
||||
#define BRAIN_PIN_ONCHIP_PINS (BRAIN_PIN_ONCHIP_LAST - GPIOA_0 + 1)
|
||||
#define BRAIN_PIN_LAST MC33810_1_GD_3
|
||||
#define BRAIN_PIN_TOTAL_PINS (BRAIN_PIN_LAST - GPIOA_0 + 1)
|
||||
#define BRAIN_PIN_ONCHIP_LAST Gpio::I15
|
||||
#define BRAIN_PIN_ONCHIP_PINS (BRAIN_PIN_ONCHIP_LAST - Gpio::A0 + 1)
|
||||
#define BRAIN_PIN_LAST Gpio::MC33810_1_GD_3
|
||||
#define BRAIN_PIN_TOTAL_PINS (BRAIN_PIN_LAST - Gpio::A0 + 1)
|
||||
/* Plase keep updating these defines */
|
||||
|
||||
typedef enum __attribute__ ((__packed__)) {
|
||||
|
|
|
@ -3,7 +3,7 @@ BOARDCPPSRC = $(PROJECT_DIR)/config/boards/tdg-pdm8/board_configuration.cpp
|
|||
|
||||
PROJECT_CPU = ARCH_STM32F4
|
||||
|
||||
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOC_11
|
||||
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::C11
|
||||
|
||||
# We're running on TDG PDM hardware!
|
||||
DDEFS += -DHW_TDG_PDM8=1
|
||||
|
|
|
@ -11,6 +11,6 @@ void setBoardConfigOverrides() {
|
|||
engineConfiguration->vbattDividerCoeff = 11;
|
||||
engineConfiguration->vbattAdcChannel = EFI_ADC_4;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOA_12;
|
||||
engineConfiguration->canRxPin = GPIOA_11;
|
||||
engineConfiguration->canTxPin = Gpio::A12;
|
||||
engineConfiguration->canRxPin = Gpio::A11;
|
||||
}
|
||||
|
|
|
@ -7,56 +7,56 @@ pins:
|
|||
ts_name: Battery Sense
|
||||
|
||||
- pin: 3/13
|
||||
id: GPIOA_10
|
||||
id: A10
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: hs
|
||||
ts_name: Out 8
|
||||
|
||||
- pin: 4/14
|
||||
id: GPIOA_9
|
||||
id: A9
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: hs
|
||||
ts_name: Out 7
|
||||
|
||||
- pin: 5/15
|
||||
id: GPIOA_8
|
||||
id: A8
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: hs
|
||||
ts_name: Out 6
|
||||
|
||||
- pin: 6/16
|
||||
id: GPIOC_9
|
||||
id: C9
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: hs
|
||||
ts_name: Out 5
|
||||
|
||||
- pin: 7/17
|
||||
id: GPIOA_3
|
||||
id: A3
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: hs
|
||||
ts_name: Out 4
|
||||
|
||||
- pin: 8/18
|
||||
id: GPIOA_2
|
||||
id: A2
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: hs
|
||||
ts_name: Out 3
|
||||
|
||||
- pin: 9/19
|
||||
id: GPIOA_1
|
||||
id: A1
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: hs
|
||||
ts_name: Out 2
|
||||
|
||||
- pin: 10/20
|
||||
id: GPIOA_0
|
||||
id: A0
|
||||
class: outputs
|
||||
function: High Side Output
|
||||
type: hs
|
||||
|
|
|
@ -40,8 +40,8 @@ void setGy6139qmbDefaultEngineConfiguration() {
|
|||
engineConfiguration->trigger.customTotalToothCount = 8;
|
||||
engineConfiguration->trigger.customSkippedToothCount = 1;
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOC_9;
|
||||
engineConfiguration->ignitionPins[0] = GPIOC_8;
|
||||
engineConfiguration->injectionPins[0] = Gpio::C9;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::C8;
|
||||
|
||||
// set injection_mode 1
|
||||
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||
|
|
|
@ -135,26 +135,26 @@ void setEngineBMW_M73_Manhattan() {
|
|||
Nucleo boards - first step is to confirm that I can blink via each pin
|
||||
going clockwise from top-right corner
|
||||
|
||||
GPIOA_10 USD ID
|
||||
GPIOA_11 USD DM
|
||||
GPIOA_12 USD DP
|
||||
Gpio::A10 USD ID
|
||||
Gpio::A11 USD DM
|
||||
Gpio::A12 USD DP
|
||||
|
||||
E_4: running
|
||||
|
||||
Good GPIO:
|
||||
GPIOC_9 ETB#1
|
||||
GPIOC_8 ETB#1
|
||||
GPIOB_8 ETB#2
|
||||
GPIOB_9 ETB#2
|
||||
GPIOC_5
|
||||
GPIOA_7
|
||||
GPIOA_6
|
||||
Gpio::C9 ETB#1
|
||||
Gpio::C8 ETB#1
|
||||
Gpio::B8 ETB#2
|
||||
Gpio::B9 ETB#2
|
||||
Gpio::C5
|
||||
Gpio::A7
|
||||
Gpio::A6
|
||||
*/
|
||||
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fuelPumpPin = Gpio::Unassigned;
|
||||
engineConfiguration->idle.solenoidPin = Gpio::Unassigned;
|
||||
engineConfiguration->fanPin = Gpio::Unassigned;
|
||||
|
||||
/**
|
||||
* Yellow op-amp board
|
||||
|
@ -177,35 +177,35 @@ GPIOA_6
|
|||
engineConfiguration->tps2_1AdcChannel = EFI_ADC_4; // PA4
|
||||
|
||||
// PWM pin
|
||||
engineConfiguration->etbIo[0].controlPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::Unassigned;
|
||||
// DIR pin
|
||||
engineConfiguration->etbIo[0].directionPin1 = GPIOC_8;
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIOC_9;
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::C8;
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::C9;
|
||||
engineConfiguration->etb_use_two_wires = true;
|
||||
|
||||
// PWM pin
|
||||
engineConfiguration->etbIo[1].controlPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[1].controlPin = Gpio::Unassigned;
|
||||
// DIR pin
|
||||
engineConfiguration->etbIo[1].directionPin1 = GPIOB_9;
|
||||
engineConfiguration->etbIo[1].directionPin2 = GPIOB_8;
|
||||
engineConfiguration->etbIo[1].directionPin1 = Gpio::B9;
|
||||
engineConfiguration->etbIo[1].directionPin2 = Gpio::B8;
|
||||
|
||||
engineConfiguration->tps2Min = engineConfiguration->tpsMin;
|
||||
engineConfiguration->tps2Max = engineConfiguration->tpsMax;
|
||||
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[0] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[3] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[4] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[5] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->injectionPins[6] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[7] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[8] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[9] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[10] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[11] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[6] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[7] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[8] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[9] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[10] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[11] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -259,7 +259,7 @@ void setEngineBMW_M73_Proteus() {
|
|||
// set_trigger_input_pin 0 PE7
|
||||
engineConfiguration->triggerInputPins[0] = PROTEUS_VR_1;
|
||||
|
||||
// GPIOE_11: "Digital 2"
|
||||
// Gpio::E11: "Digital 2"
|
||||
engineConfiguration->camInputs[0] = PROTEUS_DIGITAL_2;
|
||||
|
||||
// set vbatt_divider 8.16
|
||||
|
@ -272,10 +272,10 @@ void setEngineBMW_M73_Proteus() {
|
|||
engineConfiguration->clt.adcChannel = PROTEUS_IN_ANALOG_TEMP_4;
|
||||
|
||||
|
||||
// GPIOE_0: "Lowside 14"
|
||||
engineConfiguration->starterControlPin = GPIOE_0;
|
||||
// GPIOE_12: "Digital 3"
|
||||
engineConfiguration->startStopButtonPin = GPIOE_12;
|
||||
// Gpio::E0: "Lowside 14"
|
||||
engineConfiguration->starterControlPin = Gpio::E0;
|
||||
// Gpio::E12: "Digital 3"
|
||||
engineConfiguration->startStopButtonPin = Gpio::E12;
|
||||
engineConfiguration->startStopButtonMode = PI_PULLUP;
|
||||
|
||||
setProteusHitachiEtbDefaults();
|
||||
|
|
|
@ -84,11 +84,11 @@ void setEngineBMW_M73_microRusEfi() {
|
|||
engineConfiguration->etb.iFactor = 0.35;
|
||||
|
||||
// 22 - AN Temp 4, orange wire
|
||||
engineConfiguration->startStopButtonPin = GPIOA_3;
|
||||
engineConfiguration->startStopButtonPin = Gpio::A3;
|
||||
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
// "43 - GP Out 4"
|
||||
engineConfiguration->starterControlPin = TLE8888_PIN_24;
|
||||
engineConfiguration->starterControlPin = Gpio::TLE8888_PIN_24;
|
||||
#endif /* BOARD_TLE8888_COUNT */
|
||||
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ void setCamaro4() {
|
|||
strcpy(engineConfiguration->engineMake, ENGINE_MAKE_GM);
|
||||
|
||||
engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3;
|
||||
engineConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||
engineConfiguration->triggerInputPins[1] = GPIOC_6;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::A5;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::C6;
|
||||
|
||||
engineConfiguration->injectionMode = IM_BATCH;
|
||||
engineConfiguration->twoWireBatchInjection = true;
|
||||
|
@ -56,31 +56,31 @@ void setCamaro4() {
|
|||
engineConfiguration->afr.hwChannel = EFI_ADC_13;
|
||||
|
||||
|
||||
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fuelPumpPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->idle.solenoidPin = Gpio::Unassigned;
|
||||
engineConfiguration->fuelPumpPin = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOE_6;
|
||||
engineConfiguration->injectionPins[1] = GPIOE_5;
|
||||
engineConfiguration->injectionPins[2] = GPIOD_7;
|
||||
engineConfiguration->injectionPins[3] = GPIOC_13;
|
||||
engineConfiguration->injectionPins[4] = GPIOE_3;
|
||||
engineConfiguration->injectionPins[5] = GPIOE_4;
|
||||
engineConfiguration->injectionPins[6] = GPIOD_3;
|
||||
engineConfiguration->injectionPins[7] = GPIOE_2;
|
||||
engineConfiguration->injectionPins[0] = Gpio::E6;
|
||||
engineConfiguration->injectionPins[1] = Gpio::E5;
|
||||
engineConfiguration->injectionPins[2] = Gpio::D7;
|
||||
engineConfiguration->injectionPins[3] = Gpio::C13;
|
||||
engineConfiguration->injectionPins[4] = Gpio::E3;
|
||||
engineConfiguration->injectionPins[5] = Gpio::E4;
|
||||
engineConfiguration->injectionPins[6] = Gpio::D3;
|
||||
engineConfiguration->injectionPins[7] = Gpio::E2;
|
||||
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOC_9;
|
||||
engineConfiguration->ignitionPins[1] = GPIOC_7;
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_14;
|
||||
engineConfiguration->ignitionPins[3] = GPIOE_12;
|
||||
engineConfiguration->ignitionPins[4] = GPIOE_10;
|
||||
engineConfiguration->ignitionPins[5] = GPIOE_8;
|
||||
engineConfiguration->ignitionPins[6] = GPIOD_9;
|
||||
engineConfiguration->ignitionPins[7] = GPIOD_8;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::C9;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::C7;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E14;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::E12;
|
||||
engineConfiguration->ignitionPins[4] = Gpio::E10;
|
||||
engineConfiguration->ignitionPins[5] = Gpio::E8;
|
||||
engineConfiguration->ignitionPins[6] = Gpio::D9;
|
||||
engineConfiguration->ignitionPins[7] = Gpio::D8;
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIOB_8;
|
||||
engineConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->mainRelayPin = GPIOD_5;
|
||||
engineConfiguration->fuelPumpPin = Gpio::B8;
|
||||
engineConfiguration->fanPin = Gpio::Unassigned;
|
||||
engineConfiguration->mainRelayPin = Gpio::D5;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -56,35 +56,35 @@ void setCitroenBerlingoTU3JPConfiguration() {
|
|||
// Frankenstein lo-side output #11: PB8 Main relay
|
||||
// Frankenstein lo-side output #12: PB9 Fuel pump
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOC_14;
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[2] = GPIOC_15;
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::C14;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::C15;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->injector.flow = 137; //SIEMENS DEKA VAZ20734
|
||||
engineConfiguration->injectionPins[0] = GPIOE_6;
|
||||
engineConfiguration->injectionPins[1] = GPIOC_13;
|
||||
engineConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[0] = Gpio::E6;
|
||||
engineConfiguration->injectionPins[1] = Gpio::C13;
|
||||
engineConfiguration->injectionPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[3] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->fanPin = GPIOE_0;
|
||||
engineConfiguration->fanPin = Gpio::E0;
|
||||
engineConfiguration->fanPinMode = OM_DEFAULT;
|
||||
engineConfiguration->fanOffTemperature = 95;
|
||||
engineConfiguration->fanOnTemperature = 99;
|
||||
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIOE_1;
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::E1;
|
||||
engineConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->mainRelayPin = GPIOB_8;
|
||||
engineConfiguration->mainRelayPin = Gpio::B8;
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIOB_9;
|
||||
engineConfiguration->fuelPumpPin = Gpio::B9;
|
||||
engineConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||
|
||||
setFrankenso_01_LCD(engineConfiguration);
|
||||
|
||||
|
||||
// engineConfiguration->o2heaterPin = GPIOC_13;
|
||||
// engineConfiguration->logicAnalyzerPins[1] = GPIO_UNASSIGNED;
|
||||
// engineConfiguration->o2heaterPin = Gpio::C13;
|
||||
// engineConfiguration->logicAnalyzerPins[1] = Gpio::Unassigned;
|
||||
|
||||
/**
|
||||
* Inputs
|
||||
|
|
|
@ -66,21 +66,21 @@ void runSchedulingPrecisionTestIfNeeded(void) {
|
|||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
void setFrankenso_01_LCD(engine_configuration_s *engineConfiguration) {
|
||||
engineConfiguration->HD44780_rs = GPIOE_7;
|
||||
engineConfiguration->HD44780_e = GPIOE_9;
|
||||
engineConfiguration->HD44780_db4 = GPIOE_11;
|
||||
engineConfiguration->HD44780_db5 = GPIOE_13;
|
||||
engineConfiguration->HD44780_db6 = GPIOE_15;
|
||||
engineConfiguration->HD44780_db7 = GPIOB_10;
|
||||
engineConfiguration->HD44780_rs = Gpio::E7;
|
||||
engineConfiguration->HD44780_e = Gpio::E9;
|
||||
engineConfiguration->HD44780_db4 = Gpio::E11;
|
||||
engineConfiguration->HD44780_db5 = Gpio::E13;
|
||||
engineConfiguration->HD44780_db6 = Gpio::E15;
|
||||
engineConfiguration->HD44780_db7 = Gpio::B10;
|
||||
}
|
||||
|
||||
void disableLCD(engine_configuration_s *engineConfiguration) {
|
||||
engineConfiguration->HD44780_rs = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_e = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_db4 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_db5 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_db6 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_db7 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->HD44780_rs = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_e = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_db4 = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_db5 = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_db6 = Gpio::Unassigned;
|
||||
engineConfiguration->HD44780_db7 = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
// todo: should this be part of more default configurations?
|
||||
|
@ -135,17 +135,17 @@ void setFrankensoConfiguration() {
|
|||
// Frankenso low out #11: PB8 injector #3
|
||||
// Frankenso low out #12: PB7 injector #4
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIOE_4;
|
||||
engineConfiguration->mainRelayPin = GPIOD_7;
|
||||
engineConfiguration->idle.solenoidPin = GPIOC_13;
|
||||
engineConfiguration->fuelPumpPin = Gpio::E4;
|
||||
engineConfiguration->mainRelayPin = Gpio::D7;
|
||||
engineConfiguration->idle.solenoidPin = Gpio::C13;
|
||||
|
||||
engineConfiguration->fanPin = GPIOE_5;
|
||||
engineConfiguration->fanPin = Gpio::E5;
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOB_9; // #1
|
||||
engineConfiguration->injectionPins[1] = GPIOE_2; // #2
|
||||
engineConfiguration->injectionPins[2] = GPIOB_8; // #3
|
||||
engineConfiguration->injectionPins[0] = Gpio::B9; // #1
|
||||
engineConfiguration->injectionPins[1] = Gpio::E2; // #2
|
||||
engineConfiguration->injectionPins[2] = Gpio::B8; // #3
|
||||
#ifndef EFI_INJECTOR_PIN3
|
||||
engineConfiguration->injectionPins[3] = GPIOB_7; // #4
|
||||
engineConfiguration->injectionPins[3] = Gpio::B7; // #4
|
||||
#else /* EFI_INJECTOR_PIN3 */
|
||||
engineConfiguration->injectionPins[3] = EFI_INJECTOR_PIN3; // #4
|
||||
#endif /* EFI_INJECTOR_PIN3 */
|
||||
|
@ -153,14 +153,14 @@ void setFrankensoConfiguration() {
|
|||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
#if EFI_PWM_TESTER
|
||||
engineConfiguration->injectionPins[4] = GPIOC_8; // #5
|
||||
engineConfiguration->injectionPins[5] = GPIOD_10; // #6
|
||||
engineConfiguration->injectionPins[6] = GPIOD_9;
|
||||
engineConfiguration->injectionPins[7] = GPIOD_11;
|
||||
engineConfiguration->injectionPins[8] = GPIOD_0;
|
||||
engineConfiguration->injectionPins[9] = GPIOB_11;
|
||||
engineConfiguration->injectionPins[10] = GPIOC_7;
|
||||
engineConfiguration->injectionPins[11] = GPIOE_4;
|
||||
engineConfiguration->injectionPins[4] = Gpio::C8; // #5
|
||||
engineConfiguration->injectionPins[5] = Gpio::D10; // #6
|
||||
engineConfiguration->injectionPins[6] = Gpio::D9;
|
||||
engineConfiguration->injectionPins[7] = Gpio::D11;
|
||||
engineConfiguration->injectionPins[8] = Gpio::D0;
|
||||
engineConfiguration->injectionPins[9] = Gpio::B11;
|
||||
engineConfiguration->injectionPins[10] = Gpio::C7;
|
||||
engineConfiguration->injectionPins[11] = Gpio::E4;
|
||||
|
||||
/**
|
||||
* We want to initialize all outputs for test
|
||||
|
@ -169,20 +169,20 @@ void setFrankensoConfiguration() {
|
|||
|
||||
engineConfiguration->displayMode = DM_NONE;
|
||||
#else /* EFI_PWM_TESTER */
|
||||
engineConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[6] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[7] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[8] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[9] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[10] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[11] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[4] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[5] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[6] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[7] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[8] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[9] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[10] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[11] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOE_14;
|
||||
engineConfiguration->ignitionPins[1] = GPIOC_7;
|
||||
engineConfiguration->ignitionPins[2] = GPIOC_9;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::E14;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::C7;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::C9;
|
||||
// set_ignition_pin 4 PE10
|
||||
engineConfiguration->ignitionPins[3] = GPIOE_10;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::E10;
|
||||
#endif /* EFI_PWM_TESTER */
|
||||
|
||||
// todo: 8.2 or 10k?
|
||||
|
@ -208,38 +208,38 @@ void setFrankensoBoardTestConfiguration() {
|
|||
// set ignition_mode 1
|
||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOB_7; // injector in default pinout
|
||||
engineConfiguration->injectionPins[1] = GPIOB_8; // injector in default pinout
|
||||
engineConfiguration->injectionPins[2] = GPIOB_9; // injector in default pinout
|
||||
engineConfiguration->injectionPins[3] = GPIOC_13;
|
||||
engineConfiguration->injectionPins[0] = Gpio::B7; // injector in default pinout
|
||||
engineConfiguration->injectionPins[1] = Gpio::B8; // injector in default pinout
|
||||
engineConfiguration->injectionPins[2] = Gpio::B9; // injector in default pinout
|
||||
engineConfiguration->injectionPins[3] = Gpio::C13;
|
||||
|
||||
engineConfiguration->injectionPins[4] = GPIOD_3;
|
||||
engineConfiguration->injectionPins[5] = GPIOD_5;
|
||||
engineConfiguration->injectionPins[6] = GPIOD_7;
|
||||
engineConfiguration->injectionPins[7] = GPIOE_2; // injector in default pinout
|
||||
engineConfiguration->injectionPins[8] = GPIOE_3;
|
||||
engineConfiguration->injectionPins[9] = GPIOE_4;
|
||||
engineConfiguration->injectionPins[10] = GPIOE_5;
|
||||
engineConfiguration->injectionPins[11] = GPIOE_6;
|
||||
engineConfiguration->injectionPins[4] = Gpio::D3;
|
||||
engineConfiguration->injectionPins[5] = Gpio::D5;
|
||||
engineConfiguration->injectionPins[6] = Gpio::D7;
|
||||
engineConfiguration->injectionPins[7] = Gpio::E2; // injector in default pinout
|
||||
engineConfiguration->injectionPins[8] = Gpio::E3;
|
||||
engineConfiguration->injectionPins[9] = Gpio::E4;
|
||||
engineConfiguration->injectionPins[10] = Gpio::E5;
|
||||
engineConfiguration->injectionPins[11] = Gpio::E6;
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->mainRelayPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fuelPumpPin = Gpio::Unassigned;
|
||||
engineConfiguration->mainRelayPin = Gpio::Unassigned;
|
||||
engineConfiguration->idle.solenoidPin = Gpio::Unassigned;
|
||||
engineConfiguration->fanPin = Gpio::Unassigned;
|
||||
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOC_9; // coil in default pinout
|
||||
engineConfiguration->ignitionPins[1] = GPIOC_7; // coil in default pinout
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_10; // coil in default pinout
|
||||
engineConfiguration->ignitionPins[3] = GPIOE_8; // Miata VVT tach
|
||||
engineConfiguration->ignitionPins[0] = Gpio::C9; // coil in default pinout
|
||||
engineConfiguration->ignitionPins[1] = Gpio::C7; // coil in default pinout
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E10; // coil in default pinout
|
||||
engineConfiguration->ignitionPins[3] = Gpio::E8; // Miata VVT tach
|
||||
|
||||
engineConfiguration->ignitionPins[4] = GPIOE_14; // coil in default pinout
|
||||
engineConfiguration->ignitionPins[5] = GPIOE_12;
|
||||
engineConfiguration->ignitionPins[6] = GPIOD_8;
|
||||
engineConfiguration->ignitionPins[7] = GPIOD_9;
|
||||
engineConfiguration->ignitionPins[4] = Gpio::E14; // coil in default pinout
|
||||
engineConfiguration->ignitionPins[5] = Gpio::E12;
|
||||
engineConfiguration->ignitionPins[6] = Gpio::D8;
|
||||
engineConfiguration->ignitionPins[7] = Gpio::D9;
|
||||
|
||||
engineConfiguration->ignitionPins[8] = GPIOE_0; // brain board, not discovery
|
||||
engineConfiguration->ignitionPins[9] = GPIOE_1; // brain board, not discovery
|
||||
engineConfiguration->ignitionPins[8] = Gpio::E0; // brain board, not discovery
|
||||
engineConfiguration->ignitionPins[9] = Gpio::E1; // brain board, not discovery
|
||||
}
|
||||
|
||||
|
||||
|
@ -261,16 +261,16 @@ void setEtbTestConfiguration() {
|
|||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||
/**
|
||||
* remember that some H-bridges require 5v control lines, not just 3v logic outputs we have on stm32
|
||||
*/
|
||||
engineConfiguration->etbIo[0].directionPin1 = GPIOC_7; // Frankenso high-side in order to get 5v control
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIOC_9;
|
||||
engineConfiguration->etbIo[0].controlPin = GPIOE_14;
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::C7; // Frankenso high-side in order to get 5v control
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::C9;
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::E14;
|
||||
|
||||
#if EFI_ELECTRONIC_THROTTLE_BODY
|
||||
setBoschVNH2SP30Curve();
|
||||
|
@ -282,9 +282,9 @@ void setEtbTestConfiguration() {
|
|||
|
||||
// turning off other PWMs to simplify debugging
|
||||
engineConfiguration->triggerSimulatorFrequency = 0;
|
||||
engineConfiguration->stepperEnablePin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->idle.stepperStepPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->idle.stepperDirectionPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->stepperEnablePin = Gpio::Unassigned;
|
||||
engineConfiguration->idle.stepperStepPin = Gpio::Unassigned;
|
||||
engineConfiguration->idle.stepperDirectionPin = Gpio::Unassigned;
|
||||
engineConfiguration->useStepperIdle = true;
|
||||
|
||||
// no analog dividers - all sensors with 3v supply, naked discovery bench setup
|
||||
|
@ -336,11 +336,11 @@ static I2CEepromFileStream ifile;
|
|||
*/
|
||||
void setEepromTestConfiguration() {
|
||||
engineConfiguration->useEeprom = true;
|
||||
engineConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::Unassigned;
|
||||
// dirty hack
|
||||
brain_pin_markUnused(GPIOC_9);
|
||||
efiSetPadMode("I2C", GPIOA_8, PAL_MODE_ALTERNATE(4));
|
||||
efiSetPadMode("I2C", GPIOC_9, PAL_MODE_ALTERNATE(4));
|
||||
brain_pin_markUnused(Gpio::C9);
|
||||
efiSetPadMode("I2C", Gpio::A8, PAL_MODE_ALTERNATE(4));
|
||||
efiSetPadMode("I2C", Gpio::C9, PAL_MODE_ALTERNATE(4));
|
||||
|
||||
|
||||
addConsoleActionI("ee_read",
|
||||
|
@ -372,15 +372,15 @@ void setL9779TestConfiguration() {
|
|||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
// Wire up spi3
|
||||
// green
|
||||
engineConfiguration->spi3mosiPin = GPIOB_5;
|
||||
engineConfiguration->spi3mosiPin = Gpio::B5;
|
||||
// blue
|
||||
engineConfiguration->spi3misoPin = GPIOB_4;
|
||||
engineConfiguration->spi3misoPin = Gpio::B4;
|
||||
// white
|
||||
engineConfiguration->spi3sckPin = GPIOB_3;
|
||||
engineConfiguration->spi3sckPin = Gpio::B3;
|
||||
|
||||
engineConfiguration->l9779spiDevice = SPI_DEVICE_3;
|
||||
// orange
|
||||
engineConfiguration->l9779_cs = GPIOD_5;
|
||||
engineConfiguration->l9779_cs = Gpio::D5;
|
||||
}
|
||||
|
||||
// TLE8888_BENCH_ENGINE
|
||||
|
@ -393,28 +393,28 @@ void setTle8888TestConfiguration() {
|
|||
engineConfiguration->crankingInjectionMode = IM_SEQUENTIAL;
|
||||
|
||||
#if defined(STM32_HAS_GPIOG) && STM32_HAS_GPIOG
|
||||
engineConfiguration->ignitionPins[0] = GPIOG_3;
|
||||
engineConfiguration->ignitionPins[1] = GPIOG_4;
|
||||
engineConfiguration->ignitionPins[2] = GPIOG_5;
|
||||
engineConfiguration->ignitionPins[3] = GPIOG_6;
|
||||
engineConfiguration->ignitionPins[4] = GPIOG_7;
|
||||
engineConfiguration->ignitionPins[5] = GPIOG_8;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::G3;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::G4;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::G5;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::G6;
|
||||
engineConfiguration->ignitionPins[4] = Gpio::G7;
|
||||
engineConfiguration->ignitionPins[5] = Gpio::G8;
|
||||
#endif /* STM32_HAS_GPIOG */
|
||||
engineConfiguration->ignitionPins[6] = GPIOC_6;
|
||||
engineConfiguration->ignitionPins[7] = GPIOC_7;
|
||||
engineConfiguration->ignitionPins[6] = Gpio::C6;
|
||||
engineConfiguration->ignitionPins[7] = Gpio::C7;
|
||||
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
engineConfiguration->tle8888spiDevice = SPI_DEVICE_1;
|
||||
engineConfiguration->tle8888_cs = GPIOD_5;
|
||||
engineConfiguration->tle8888_cs = Gpio::D5;
|
||||
|
||||
// PB3 is nicely both SWO and SPI1 SCK so logic analyzer could be used on SWO header
|
||||
engineConfiguration->spi1mosiPin = GPIOB_5;
|
||||
engineConfiguration->spi1misoPin = GPIOB_4;
|
||||
engineConfiguration->spi1sckPin = GPIOB_3; // please note that this pin is also SWO/SWD - Single Wire debug Output
|
||||
engineConfiguration->spi1mosiPin = Gpio::B5;
|
||||
engineConfiguration->spi1misoPin = Gpio::B4;
|
||||
engineConfiguration->spi1sckPin = Gpio::B3; // please note that this pin is also SWO/SWD - Single Wire debug Output
|
||||
engineConfiguration->is_enabled_spi_1 = true;
|
||||
engineConfiguration->debugMode = DBG_TLE8888;
|
||||
|
||||
engineConfiguration->fuelPumpPin = TLE8888_PIN_20;
|
||||
engineConfiguration->fuelPumpPin = Gpio::TLE8888_PIN_20;
|
||||
#endif /* BOARD_TLE8888_COUNT */
|
||||
|
||||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_9; // PB1 // just any non-empty value for now
|
||||
|
@ -425,9 +425,9 @@ void setTle8888TestConfiguration() {
|
|||
// IN2 PF14
|
||||
// SF PF11
|
||||
#if defined(STM32_HAS_GPIOF) && STM32_HAS_GPIOF
|
||||
engineConfiguration->etbIo[0].directionPin1 = GPIOF_15;
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIOF_14;
|
||||
engineConfiguration->etbIo[0].disablePin = GPIOF_12;
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::F15;
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::F14;
|
||||
engineConfiguration->etbIo[0].disablePin = Gpio::F12;
|
||||
#endif /* STM32_HAS_GPIOF */
|
||||
engineConfiguration->etb_use_two_wires = true;
|
||||
engineConfiguration->isHip9011Enabled = false;
|
||||
|
@ -439,9 +439,9 @@ void setTle8888TestConfiguration() {
|
|||
// IN2 PE4
|
||||
// SF PE3
|
||||
|
||||
engineConfiguration->etbIo[0].directionPin1 = GPIOE_2;
|
||||
engineConfiguration->etbIo[0].directionPin2 = GPIOE_4;
|
||||
engineConfiguration->etbIo[0].disablePin = GPIOE_5;
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::E2;
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::E4;
|
||||
engineConfiguration->etbIo[0].disablePin = Gpio::E5;
|
||||
|
||||
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_3; // PA3
|
||||
|
@ -523,64 +523,64 @@ static void mreBoardOldTest() {
|
|||
engineConfiguration->specs.firingOrder = FO_1_10_9_4_3_6_5_8_7_2;
|
||||
|
||||
// red LED #1
|
||||
engineConfiguration->ignitionPins[1 - 1] = GPIOD_4;
|
||||
engineConfiguration->ignitionPins[10 - 1] = GPIOD_3;
|
||||
engineConfiguration->ignitionPins[9 - 1] = GPIOD_6;
|
||||
engineConfiguration->ignitionPins[4 - 1] = GPIOD_7;
|
||||
engineConfiguration->ignitionPins[3 - 1] = GPIOD_1;
|
||||
engineConfiguration->ignitionPins[6 - 1] = GPIOD_2;
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[4] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[6] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[7] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[1 - 1] = Gpio::D4;
|
||||
engineConfiguration->ignitionPins[10 - 1] = Gpio::D3;
|
||||
engineConfiguration->ignitionPins[9 - 1] = Gpio::D6;
|
||||
engineConfiguration->ignitionPins[4 - 1] = Gpio::D7;
|
||||
engineConfiguration->ignitionPins[3 - 1] = Gpio::D1;
|
||||
engineConfiguration->ignitionPins[6 - 1] = Gpio::D2;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[4] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[6] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[7] = Gpio::Unassigned;
|
||||
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fuelPumpPin = Gpio::Unassigned;
|
||||
engineConfiguration->idle.solenoidPin = Gpio::Unassigned;
|
||||
engineConfiguration->fanPin = Gpio::Unassigned;
|
||||
|
||||
// fuel pump is useful to test power on/off scenario
|
||||
// engineConfiguration->fuelPumpPin = TLE8888_PIN_22;
|
||||
// engineConfiguration->fuelPumpPin = Gpio::TLE8888_PIN_22;
|
||||
|
||||
|
||||
// LED #1
|
||||
// TLE8888_PIN_22: "34 - GP Out 2"
|
||||
engineConfiguration->injectionPins[1 - 1] = TLE8888_PIN_22;
|
||||
// Gpio::TLE8888_PIN_22: "34 - GP Out 2"
|
||||
engineConfiguration->injectionPins[1 - 1] = Gpio::TLE8888_PIN_22;
|
||||
|
||||
// LED #2
|
||||
// TLE8888_PIN_23: "33 - GP Out 3"
|
||||
engineConfiguration->injectionPins[10 - 1] = TLE8888_PIN_23;
|
||||
// Gpio::TLE8888_PIN_23: "33 - GP Out 3"
|
||||
engineConfiguration->injectionPins[10 - 1] = Gpio::TLE8888_PIN_23;
|
||||
|
||||
// TLE8888_PIN_1: LED #3 - INJ#2
|
||||
engineConfiguration->injectionPins[9 - 1] = TLE8888_PIN_1;
|
||||
// Gpio::TLE8888_PIN_1: LED #3 - INJ#2
|
||||
engineConfiguration->injectionPins[9 - 1] = Gpio::TLE8888_PIN_1;
|
||||
|
||||
// TLE8888_PIN_2: LED #4 - INJ#1
|
||||
engineConfiguration->injectionPins[4 - 1] = TLE8888_PIN_2;
|
||||
// Gpio::TLE8888_PIN_2: LED #4 - INJ#1
|
||||
engineConfiguration->injectionPins[4 - 1] = Gpio::TLE8888_PIN_2;
|
||||
|
||||
// TLE8888_PIN_3: LED #5 - INJ#3
|
||||
engineConfiguration->injectionPins[3 - 1] = TLE8888_PIN_3;
|
||||
// Gpio::TLE8888_PIN_3: LED #5 - INJ#3
|
||||
engineConfiguration->injectionPins[3 - 1] = Gpio::TLE8888_PIN_3;
|
||||
|
||||
// TLE8888_PIN_4: LED #6 - INJ#4
|
||||
engineConfiguration->injectionPins[6 - 1] = TLE8888_PIN_4;
|
||||
// Gpio::TLE8888_PIN_4: LED #6 - INJ#4
|
||||
engineConfiguration->injectionPins[6 - 1] = Gpio::TLE8888_PIN_4;
|
||||
|
||||
// LED #7
|
||||
// TLE8888_PIN_24: "43 - GP Out 4"
|
||||
engineConfiguration->injectionPins[5 - 1] = TLE8888_PIN_24;
|
||||
// Gpio::TLE8888_PIN_24: "43 - GP Out 4"
|
||||
engineConfiguration->injectionPins[5 - 1] = Gpio::TLE8888_PIN_24;
|
||||
|
||||
// LED #8
|
||||
// TLE8888 half bridges (pushpull, lowside, or high-low) IN12
|
||||
// TLE8888_PIN_21: "35 - GP Out 1"
|
||||
engineConfiguration->injectionPins[8 - 1] = TLE8888_PIN_21;
|
||||
// Gpio::TLE8888_PIN_21: "35 - GP Out 1"
|
||||
engineConfiguration->injectionPins[8 - 1] = Gpio::TLE8888_PIN_21;
|
||||
|
||||
// LED #9
|
||||
// TLE8888 high current low side: IN10
|
||||
// TLE8888_PIN_6: "7 - Lowside 1"
|
||||
engineConfiguration->injectionPins[7 - 1] = TLE8888_PIN_6;
|
||||
// Gpio::TLE8888_PIN_6: "7 - Lowside 1"
|
||||
engineConfiguration->injectionPins[7 - 1] = Gpio::TLE8888_PIN_6;
|
||||
|
||||
// LED #10
|
||||
// TLE8888 high current low side: VVT2 IN9 / OUT5
|
||||
// TLE8888_PIN_5: "3 - Lowside 2"
|
||||
engineConfiguration->injectionPins[2 - 1] = TLE8888_PIN_5;
|
||||
// Gpio::TLE8888_PIN_5: "3 - Lowside 2"
|
||||
engineConfiguration->injectionPins[2 - 1] = Gpio::TLE8888_PIN_5;
|
||||
#endif /* BOARD_TLE8888_COUNT */
|
||||
}
|
||||
|
||||
|
@ -598,23 +598,23 @@ void proteusBoardTest() {
|
|||
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||
engineConfiguration->crankingInjectionMode = IM_SEQUENTIAL;
|
||||
|
||||
engineConfiguration->mainRelayPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fuelPumpPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->mainRelayPin = Gpio::Unassigned;
|
||||
engineConfiguration->fanPin = Gpio::Unassigned;
|
||||
engineConfiguration->fuelPumpPin = Gpio::Unassigned;
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
engineConfiguration->injectionPins[0] = PROTEUS_LS_1;
|
||||
engineConfiguration->injectionPins[1] = PROTEUS_LS_2;
|
||||
engineConfiguration->injectionPins[2] = PROTEUS_LS_3;
|
||||
engineConfiguration->injectionPins[3] = PROTEUS_LS_4;
|
||||
engineConfiguration->injectionPins[4] = GPIOG_12;// "Lowside 5"
|
||||
engineConfiguration->injectionPins[5] = GPIOG_13;// "Lowside 6"
|
||||
engineConfiguration->injectionPins[6] = GPIOB_5;// "Lowside 9"
|
||||
engineConfiguration->injectionPins[7] = GPIOB_4;// "Lowside 8"
|
||||
engineConfiguration->injectionPins[8] = GPIOB_7;// "Lowside 11"
|
||||
engineConfiguration->injectionPins[4] = Gpio::G12;// "Lowside 5"
|
||||
engineConfiguration->injectionPins[5] = Gpio::G13;// "Lowside 6"
|
||||
engineConfiguration->injectionPins[6] = Gpio::B5;// "Lowside 9"
|
||||
engineConfiguration->injectionPins[7] = Gpio::B4;// "Lowside 8"
|
||||
engineConfiguration->injectionPins[8] = Gpio::B7;// "Lowside 11"
|
||||
engineConfiguration->injectionPins[9] = PROTEUS_LS_10;
|
||||
engineConfiguration->injectionPins[10] = GPIOB_8;// "Lowside 12"
|
||||
engineConfiguration->injectionPins[11] = GPIOB_9;// "Lowside 13" # pin 10/black35
|
||||
engineConfiguration->injectionPins[10] = Gpio::B8;// "Lowside 12"
|
||||
engineConfiguration->injectionPins[11] = Gpio::B9;// "Lowside 13" # pin 10/black35
|
||||
|
||||
|
||||
|
||||
|
@ -626,7 +626,7 @@ void proteusBoardTest() {
|
|||
engineConfiguration->ignitionPins[4] = PROTEUS_IGN_6;
|
||||
engineConfiguration->ignitionPins[5] = PROTEUS_IGN_7;
|
||||
|
||||
engineConfiguration->ignitionPins[6] = GPIOD_15;// "Highside 3" # pin 13/black35
|
||||
engineConfiguration->ignitionPins[6] = Gpio::D15;// "Highside 3" # pin 13/black35
|
||||
engineConfiguration->ignitionPins[7] = PROTEUS_IGN_3;
|
||||
engineConfiguration->ignitionPins[8] = PROTEUS_IGN_9;
|
||||
engineConfiguration->ignitionPins[9] = PROTEUS_IGN_8;
|
||||
|
@ -642,10 +642,10 @@ void proteusBoardTest() {
|
|||
|
||||
void mreBCM() {
|
||||
for (int i = 0; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
engineConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fanPin = Gpio::Unassigned;
|
||||
engineConfiguration->consumeObdSensors = true;
|
||||
|
||||
}
|
||||
|
@ -703,62 +703,62 @@ void mreBoardNewTest() {
|
|||
engineConfiguration->specs.firingOrder = FO_1_2_3_4_5_6_7_8_9_10_11_12;
|
||||
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
engineConfiguration->ignitionPins[1 - 1] = GPIOD_6;
|
||||
engineConfiguration->ignitionPins[2 - 1] = GPIOD_7;
|
||||
engineConfiguration->ignitionPins[3 - 1] = GPIOD_1;
|
||||
engineConfiguration->ignitionPins[4 - 1] = GPIOD_2;
|
||||
engineConfiguration->ignitionPins[5 - 1] = GPIOD_3;
|
||||
engineConfiguration->ignitionPins[6 - 1] = GPIOD_4;
|
||||
engineConfiguration->ignitionPins[1 - 1] = Gpio::D6;
|
||||
engineConfiguration->ignitionPins[2 - 1] = Gpio::D7;
|
||||
engineConfiguration->ignitionPins[3 - 1] = Gpio::D1;
|
||||
engineConfiguration->ignitionPins[4 - 1] = Gpio::D2;
|
||||
engineConfiguration->ignitionPins[5 - 1] = Gpio::D3;
|
||||
engineConfiguration->ignitionPins[6 - 1] = Gpio::D4;
|
||||
|
||||
engineConfiguration->ignitionPins[7 - 1] = TLE8888_PIN_11;
|
||||
engineConfiguration->ignitionPins[8 - 1] = TLE8888_PIN_12;
|
||||
engineConfiguration->ignitionPins[7 - 1] = Gpio::TLE8888_PIN_11;
|
||||
engineConfiguration->ignitionPins[8 - 1] = Gpio::TLE8888_PIN_12;
|
||||
|
||||
// LED #8
|
||||
// TLE8888 half bridges (pushpull, lowside, or high-low) IN12
|
||||
// TLE8888_PIN_21: "35 - GP Out 1"
|
||||
engineConfiguration->ignitionPins[9 - 1] = TLE8888_PIN_21;
|
||||
// Gpio::TLE8888_PIN_21: "35 - GP Out 1"
|
||||
engineConfiguration->ignitionPins[9 - 1] = Gpio::TLE8888_PIN_21;
|
||||
|
||||
// LED #1
|
||||
// TLE8888_PIN_22: "34 - GP Out 2"
|
||||
engineConfiguration->ignitionPins[10- 1] = TLE8888_PIN_22;
|
||||
// Gpio::TLE8888_PIN_22: "34 - GP Out 2"
|
||||
engineConfiguration->ignitionPins[10- 1] = Gpio::TLE8888_PIN_22;
|
||||
|
||||
// LED #2
|
||||
// TLE8888_PIN_23: "33 - GP Out 3"
|
||||
engineConfiguration->ignitionPins[11 - 1] = TLE8888_PIN_23;
|
||||
// Gpio::TLE8888_PIN_23: "33 - GP Out 3"
|
||||
engineConfiguration->ignitionPins[11 - 1] = Gpio::TLE8888_PIN_23;
|
||||
|
||||
// LED #7
|
||||
// TLE8888_PIN_24: "43 - GP Out 4"
|
||||
engineConfiguration->ignitionPins[12 - 1] = TLE8888_PIN_24;
|
||||
// Gpio::TLE8888_PIN_24: "43 - GP Out 4"
|
||||
engineConfiguration->ignitionPins[12 - 1] = Gpio::TLE8888_PIN_24;
|
||||
|
||||
engineConfiguration->afr.hwChannel = EFI_ADC_6;
|
||||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_NONE;
|
||||
|
||||
// TLE8888 high current low side: IN10
|
||||
// TLE8888_PIN_6: "7 - Lowside 1"
|
||||
engineConfiguration->injectionPins[1 - 1] = TLE8888_PIN_6;
|
||||
// Gpio::TLE8888_PIN_6: "7 - Lowside 1"
|
||||
engineConfiguration->injectionPins[1 - 1] = Gpio::TLE8888_PIN_6;
|
||||
|
||||
// TLE8888 high current low side: VVT2 IN9 / OUT5
|
||||
// TLE8888_PIN_5: "3 - Lowside 2"
|
||||
engineConfiguration->injectionPins[2 - 1] = TLE8888_PIN_5;
|
||||
// Gpio::TLE8888_PIN_5: "3 - Lowside 2"
|
||||
engineConfiguration->injectionPins[2 - 1] = Gpio::TLE8888_PIN_5;
|
||||
|
||||
// TLE8888_PIN_4: INJ#4
|
||||
engineConfiguration->injectionPins[3 - 1] = TLE8888_PIN_4;
|
||||
// TLE8888_PIN_3: INJ#3
|
||||
engineConfiguration->injectionPins[4 - 1] = TLE8888_PIN_3;
|
||||
// TLE8888_PIN_2: INJ#2
|
||||
engineConfiguration->injectionPins[5 - 1] = TLE8888_PIN_2;
|
||||
// TLE8888_PIN_1: LED #3 - INJ#1
|
||||
engineConfiguration->injectionPins[6 - 1] = TLE8888_PIN_1;
|
||||
// Gpio::TLE8888_PIN_4: INJ#4
|
||||
engineConfiguration->injectionPins[3 - 1] = Gpio::TLE8888_PIN_4;
|
||||
// Gpio::TLE8888_PIN_3: INJ#3
|
||||
engineConfiguration->injectionPins[4 - 1] = Gpio::TLE8888_PIN_3;
|
||||
// Gpio::TLE8888_PIN_2: INJ#2
|
||||
engineConfiguration->injectionPins[5 - 1] = Gpio::TLE8888_PIN_2;
|
||||
// Gpio::TLE8888_PIN_1: LED #3 - INJ#1
|
||||
engineConfiguration->injectionPins[6 - 1] = Gpio::TLE8888_PIN_1;
|
||||
|
||||
|
||||
engineConfiguration->injectionPins[7 - 1] = GPIOA_4; // AV10
|
||||
engineConfiguration->injectionPins[8 - 1] = GPIOB_1; // AV9
|
||||
engineConfiguration->injectionPins[9 - 1] = GPIOB_0; // AV8
|
||||
engineConfiguration->injectionPins[10 - 1] = GPIOC_4; // AV6
|
||||
engineConfiguration->injectionPins[7 - 1] = Gpio::A4; // AV10
|
||||
engineConfiguration->injectionPins[8 - 1] = Gpio::B1; // AV9
|
||||
engineConfiguration->injectionPins[9 - 1] = Gpio::B0; // AV8
|
||||
engineConfiguration->injectionPins[10 - 1] = Gpio::C4; // AV6
|
||||
|
||||
engineConfiguration->injectionPins[11- 1] = TLE8888_PIN_13;
|
||||
engineConfiguration->injectionPins[11- 1] = Gpio::TLE8888_PIN_13;
|
||||
|
||||
engineConfiguration->injectionPins[12- 1] = TLE8888_PIN_10;
|
||||
engineConfiguration->injectionPins[12- 1] = Gpio::TLE8888_PIN_10;
|
||||
#endif /* BOARD_TLE8888_COUNT */
|
||||
|
||||
}
|
||||
|
@ -821,12 +821,12 @@ void setRotary() {
|
|||
strcpy(engineConfiguration->vehicleName, "test");
|
||||
|
||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||
engineConfiguration->injectionPins[2] = GPIO_UNASSIGNED; // injector in default pinout
|
||||
engineConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[2] = Gpio::Unassigned; // injector in default pinout
|
||||
engineConfiguration->injectionPins[3] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->enableTrailingSparks = true;
|
||||
engineConfiguration->trailingCoilPins[0] = GPIOC_9;
|
||||
engineConfiguration->trailingCoilPins[1] = GPIOE_10;
|
||||
engineConfiguration->trailingCoilPins[0] = Gpio::C9;
|
||||
engineConfiguration->trailingCoilPins[1] = Gpio::E10;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -842,32 +842,32 @@ void setTest33816EngineConfiguration() {
|
|||
// default spi3sckPin PB3
|
||||
|
||||
|
||||
engineConfiguration->triggerSimulatorPins[0] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerSimulatorPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerSimulatorPins[0] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerSimulatorPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->triggerSimulatorPins[2] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOB_9; // #1
|
||||
engineConfiguration->injectionPins[1] = GPIOE_2; // #2
|
||||
engineConfiguration->injectionPins[2] = GPIOB_8; // #3
|
||||
engineConfiguration->injectionPins[3] = GPIOB_7; // #4
|
||||
engineConfiguration->injectionPins[0] = Gpio::B9; // #1
|
||||
engineConfiguration->injectionPins[1] = Gpio::E2; // #2
|
||||
engineConfiguration->injectionPins[2] = Gpio::B8; // #3
|
||||
engineConfiguration->injectionPins[3] = Gpio::B7; // #4
|
||||
|
||||
|
||||
// blue
|
||||
engineConfiguration->mc33816_cs = GPIOD_7;
|
||||
engineConfiguration->mc33816_cs = Gpio::D7;
|
||||
// green
|
||||
engineConfiguration->mc33816_rstb = GPIOD_4;
|
||||
engineConfiguration->sdCardCsPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->mc33816_rstb = Gpio::D4;
|
||||
engineConfiguration->sdCardCsPin = Gpio::Unassigned;
|
||||
// yellow
|
||||
engineConfiguration->mc33816_driven = GPIOD_6;
|
||||
engineConfiguration->mc33816_driven = Gpio::D6;
|
||||
|
||||
engineConfiguration->mc33816_flag0 = GPIOD_3;
|
||||
engineConfiguration->mc33816_flag0 = Gpio::D3;
|
||||
|
||||
// enable_spi 3
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
// Wire up spi3
|
||||
engineConfiguration->spi3mosiPin = GPIOB_5;
|
||||
engineConfiguration->spi3misoPin = GPIOB_4;
|
||||
engineConfiguration->spi3sckPin = GPIOB_3;
|
||||
engineConfiguration->spi3mosiPin = Gpio::B5;
|
||||
engineConfiguration->spi3misoPin = Gpio::B4;
|
||||
engineConfiguration->spi3sckPin = Gpio::B3;
|
||||
|
||||
engineConfiguration->isSdCardEnabled = false;
|
||||
|
||||
|
@ -898,9 +898,9 @@ void proteusLuaDemo() {
|
|||
-20, -18, -17, 0, 20, 21, 22, 25
|
||||
};
|
||||
|
||||
engineConfiguration->luaOutputPins[0] = GPIOD_12;
|
||||
engineConfiguration->luaOutputPins[1] = GPIOD_10;
|
||||
engineConfiguration->luaOutputPins[2] = GPIOD_11;
|
||||
engineConfiguration->luaOutputPins[0] = Gpio::D12;
|
||||
engineConfiguration->luaOutputPins[1] = Gpio::D10;
|
||||
engineConfiguration->luaOutputPins[2] = Gpio::D11;
|
||||
|
||||
setLinearCurve(engineConfiguration->scriptCurve2Bins, 0, 8000, 1);
|
||||
setLinearCurve(engineConfiguration->scriptCurve2, 0, 100, 1);
|
||||
|
@ -913,11 +913,11 @@ void proteusLuaDemo() {
|
|||
|
||||
|
||||
// ETB direction #1 PD10
|
||||
engineConfiguration->etbIo[0].directionPin1 = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::Unassigned;
|
||||
// ETB control PD12
|
||||
engineConfiguration->etbIo[0].controlPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::Unassigned;
|
||||
// ETB disable PD11
|
||||
engineConfiguration->etbIo[0].disablePin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->etbIo[0].disablePin = Gpio::Unassigned;
|
||||
|
||||
/**
|
||||
controlIndex = 0
|
||||
|
|
|
@ -29,10 +29,10 @@ void setDodgeNeon1995EngineConfiguration() {
|
|||
// engineConfiguration->spi2MosiMode = PAL_STM32_OTYPE_OPENDRAIN; // 4
|
||||
// engineConfiguration->spi2MisoMode = PAL_STM32_PUDR_PULLUP; // 32
|
||||
|
||||
// engineConfiguration->spi2mosiPin = GPIOB_15;
|
||||
// engineConfiguration->spi2misoPin = GPIOB_14;
|
||||
// engineConfiguration->spi2sckPin = GPIOB_13;
|
||||
engineConfiguration->cj125CsPin = GPIOB_0; // rev 0.4
|
||||
// engineConfiguration->spi2mosiPin = Gpio::B15;
|
||||
// engineConfiguration->spi2misoPin = Gpio::B14;
|
||||
// engineConfiguration->spi2sckPin = Gpio::B13;
|
||||
engineConfiguration->cj125CsPin = Gpio::B0; // rev 0.4
|
||||
engineConfiguration->isCJ125Enabled = true;
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
|
||||
|
@ -86,12 +86,12 @@ void setDodgeNeon1995EngineConfiguration() {
|
|||
// Frankenstein: low side - out #11: PB8
|
||||
// Frankenstein: low side - out #12: PB9
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - out #12
|
||||
engineConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - out #11
|
||||
engineConfiguration->injectionPins[2] = GPIOE_3; // Frankenstein: low side - out #8
|
||||
engineConfiguration->injectionPins[3] = GPIOE_5; // Frankenstein: low side - out #6
|
||||
engineConfiguration->injectionPins[0] = Gpio::B9; // Frankenstein: low side - out #12
|
||||
engineConfiguration->injectionPins[1] = Gpio::B8; // Frankenstein: low side - out #11
|
||||
engineConfiguration->injectionPins[2] = Gpio::E3; // Frankenstein: low side - out #8
|
||||
engineConfiguration->injectionPins[3] = Gpio::E5; // Frankenstein: low side - out #6
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIOC_13; // Frankenstein: low side - out #4
|
||||
engineConfiguration->fuelPumpPin = Gpio::C13; // Frankenstein: low side - out #4
|
||||
engineConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->mapErrorDetectionTooHigh = 120;
|
||||
|
@ -102,9 +102,9 @@ void setDodgeNeon1995EngineConfiguration() {
|
|||
// Frankenstein: high side #1: PE8
|
||||
// Frankenstein: high side #2: PE10
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOE_8; // Frankenstein: high side #1
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_10; // // Frankenstein: high side #2
|
||||
engineConfiguration->ignitionPins[0] = Gpio::E8; // Frankenstein: high side #1
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E10; // // Frankenstein: high side #2
|
||||
|
||||
// set ignition_pin_mode 0
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
@ -156,7 +156,7 @@ void setDodgeNeonNGCEngineConfiguration() {
|
|||
|
||||
setFuelTablesLoadBin(20, 120);
|
||||
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::Unassigned;
|
||||
|
||||
/**
|
||||
* PA4 Wideband O2 Sensor
|
||||
|
@ -182,29 +182,29 @@ void setDodgeNeonNGCEngineConfiguration() {
|
|||
// Frankenso low out #11: PB8 injector #1
|
||||
// Frankenso low out #12: PB7 injector #4
|
||||
|
||||
engineConfiguration->fanPin = GPIOD_7;
|
||||
engineConfiguration->fanPin = Gpio::D7;
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOB_8;
|
||||
engineConfiguration->injectionPins[1] = GPIOB_9;
|
||||
engineConfiguration->injectionPins[2] = GPIOE_2;
|
||||
engineConfiguration->injectionPins[3] = GPIOB_7;
|
||||
engineConfiguration->injectionPins[0] = Gpio::B8;
|
||||
engineConfiguration->injectionPins[1] = Gpio::B9;
|
||||
engineConfiguration->injectionPins[2] = Gpio::E2;
|
||||
engineConfiguration->injectionPins[3] = Gpio::B7;
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOC_9;
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_8;
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::C9;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E8;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->mainRelayPin = GPIOE_6;
|
||||
engineConfiguration->mainRelayPin = Gpio::E6;
|
||||
|
||||
engineConfiguration->idle.solenoidPin = GPIOC_13;
|
||||
engineConfiguration->idle.solenoidPin = Gpio::C13;
|
||||
engineConfiguration->idle.solenoidFrequency = 300;
|
||||
engineConfiguration->manIdlePosition = 36;
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIOE_3;
|
||||
engineConfiguration->fuelPumpPin = Gpio::E3;
|
||||
engineConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||
engineConfiguration->triggerInputPins[1] = GPIOC_6;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::A5;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::C6;
|
||||
|
||||
/**
|
||||
* Frankenso analog #1 PC2 ADC12 CLT
|
||||
|
@ -258,12 +258,12 @@ void setDodgeNeonNGCEngineConfiguration() {
|
|||
|
||||
engineConfiguration->cylinderBore = 87.5;
|
||||
|
||||
engineConfiguration->clutchDownPin = GPIOC_12;
|
||||
engineConfiguration->clutchDownPin = Gpio::C12;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLUP;
|
||||
// engineConfiguration->clutchUpPin = GPIOA_14; // note SWCLK - conflict with SWD
|
||||
// engineConfiguration->clutchUpPin = Gpio::A14; // note SWCLK - conflict with SWD
|
||||
engineConfiguration->clutchUpPinMode = PI_PULLUP;
|
||||
|
||||
// engineConfiguration->vehicleSpeedSensorInputPin = GPIOA_8;
|
||||
// engineConfiguration->vehicleSpeedSensorInputPin = Gpio::A8;
|
||||
|
||||
engineConfiguration->fanOnTemperature = 92;
|
||||
engineConfiguration->fanOffTemperature = 89;
|
||||
|
@ -274,7 +274,7 @@ void setDodgeNeonNGCEngineConfiguration() {
|
|||
engineConfiguration->tunerStudioSerialSpeed = 19200;
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
//temp engineConfiguration->alternatorControlPin = GPIOD_5;
|
||||
//temp engineConfiguration->alternatorControlPin = Gpio::D5;
|
||||
engineConfiguration->targetVBatt = 14.0;
|
||||
engineConfiguration->alternatorControl.offset = 20;
|
||||
engineConfiguration->alternatorControl.pFactor = 20;
|
||||
|
|
|
@ -79,13 +79,13 @@ void setFordInline6() {
|
|||
// output 5 is PC13
|
||||
// output 6 is PC15
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIOC_13;
|
||||
engineConfiguration->injectionPins[0] = GPIOB_9;
|
||||
engineConfiguration->injectionPins[1] = GPIOE_3;
|
||||
engineConfiguration->ignitionPins[0] = GPIOC_15;
|
||||
engineConfiguration->fuelPumpPin = Gpio::C13;
|
||||
engineConfiguration->injectionPins[0] = Gpio::B9;
|
||||
engineConfiguration->injectionPins[1] = Gpio::E3;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::C15;
|
||||
|
||||
engineConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->fanPin = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->tpsMin = convertVoltageTo10bitADC(1.250);
|
||||
engineConfiguration->tpsMax = convertVoltageTo10bitADC(4.538);
|
||||
|
@ -93,6 +93,6 @@ void setFordInline6() {
|
|||
// engineConfiguration->vbattAdcChannel = 0; //
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_1;
|
||||
|
||||
engineConfiguration->triggerInputPins[0] = GPIOA_8;
|
||||
engineConfiguration->triggerInputPins[1] = GPIOA_5;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::A8;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::A5;
|
||||
}
|
||||
|
|
|
@ -78,10 +78,10 @@ void setFordAspireEngineConfiguration() {
|
|||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
engineConfiguration->trigger.type = TT_FORD_ASPIRE;
|
||||
|
||||
engineConfiguration->triggerInputDebugPins[0] = GPIOC_15;
|
||||
engineConfiguration->triggerInputDebugPins[0] = Gpio::C15;
|
||||
|
||||
engineConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[4] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[5] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->HD44780width = 20;
|
||||
engineConfiguration->HD44780height = 4;
|
||||
|
|
|
@ -102,16 +102,16 @@ void setFordEscortGt() {
|
|||
|
||||
copyTable(config->veTable, racingFestivaVeTable);
|
||||
|
||||
// engineConfiguration->triggerInputPins[0] = GPIOC_6; // 2G YEL/BLU
|
||||
// engineConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
|
||||
// engineConfiguration->triggerInputPins[0] = Gpio::C6; // 2G YEL/BLU
|
||||
// engineConfiguration->triggerInputPins[1] = Gpio::A5; // 2E White CKP
|
||||
|
||||
// in case of SOHC distributor we only have one signal
|
||||
// engineConfiguration->triggerInputPins[0] = GPIOA_5; // 2E White CKP
|
||||
// engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
// engineConfiguration->triggerInputPins[0] = Gpio::A5; // 2E White CKP
|
||||
// engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
|
||||
// in case of DOHC distributor we have two signals
|
||||
engineConfiguration->triggerInputPins[0] = GPIOC_6;
|
||||
engineConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::C6;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::A5; // 2E White CKP
|
||||
|
||||
// Denso 195500-2180
|
||||
engineConfiguration->injector.flow = 265;
|
||||
|
@ -155,10 +155,10 @@ void setFordEscortGt() {
|
|||
// W12 PE8
|
||||
// W13 PE12
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOC_9;
|
||||
engineConfiguration->ignitionPins[1] = GPIOC_7;
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_8;
|
||||
engineConfiguration->ignitionPins[3] = GPIOE_12;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::C9;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::C7;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E8;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::E12;
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||
|
@ -179,15 +179,15 @@ void setFordEscortGt() {
|
|||
// Frankenso low out #11: PB8
|
||||
// Frankenso low out #12: PB7
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOD_3;
|
||||
engineConfiguration->injectionPins[1] = GPIOE_2;
|
||||
engineConfiguration->injectionPins[0] = Gpio::D3;
|
||||
engineConfiguration->injectionPins[1] = Gpio::E2;
|
||||
|
||||
|
||||
// 40% idle is good default
|
||||
engineConfiguration->idle.solenoidFrequency = 300;
|
||||
engineConfiguration->idle.solenoidPin = GPIOB_9;
|
||||
engineConfiguration->idle.solenoidPin = Gpio::B9;
|
||||
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIOE_5;
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::E5;
|
||||
engineConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->tunerStudioSerialSpeed = 19200;
|
||||
|
|
|
@ -28,8 +28,8 @@ void setHonda600() {
|
|||
engineConfiguration->fuelAlgorithm = LM_ALPHA_N;
|
||||
|
||||
// upside down wiring
|
||||
engineConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||
engineConfiguration->triggerInputPins[1] = GPIOC_6;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::A5;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::C6;
|
||||
|
||||
|
||||
// set global_trigger_offset_angle 180
|
||||
|
@ -95,33 +95,33 @@ void setHonda600() {
|
|||
// Frankenso low out #11: PB8 injector #3
|
||||
// Frankenso low out #12: PB7 injector #4
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIOE_4;
|
||||
engineConfiguration->mainRelayPin = GPIOD_7;
|
||||
engineConfiguration->idle.solenoidPin = GPIOC_13;
|
||||
engineConfiguration->fuelPumpPin = Gpio::E4;
|
||||
engineConfiguration->mainRelayPin = Gpio::D7;
|
||||
engineConfiguration->idle.solenoidPin = Gpio::C13;
|
||||
|
||||
engineConfiguration->fanPin = GPIOE_5;
|
||||
engineConfiguration->fanPin = Gpio::E5;
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOB_9; // #1
|
||||
engineConfiguration->injectionPins[1] = GPIOD_5; // #2
|
||||
engineConfiguration->injectionPins[2] = GPIOB_7; // #3
|
||||
engineConfiguration->injectionPins[3] = GPIOB_8; // #4
|
||||
engineConfiguration->injectionPins[0] = Gpio::B9; // #1
|
||||
engineConfiguration->injectionPins[1] = Gpio::D5; // #2
|
||||
engineConfiguration->injectionPins[2] = Gpio::B7; // #3
|
||||
engineConfiguration->injectionPins[3] = Gpio::B8; // #4
|
||||
|
||||
setDefaultCustomMaps();
|
||||
setAlgorithm(LM_ALPHA_N);
|
||||
|
||||
engineConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[6] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[7] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[8] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[9] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[10] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[11] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[4] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[5] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[6] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[7] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[8] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[9] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[10] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[11] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOE_14;
|
||||
engineConfiguration->ignitionPins[1] = GPIOC_7;
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_10;
|
||||
engineConfiguration->ignitionPins[3] = GPIOC_9; // #4
|
||||
engineConfiguration->ignitionPins[0] = Gpio::E14;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::C7;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E10;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::C9; // #4
|
||||
|
||||
// todo: 8.2 or 10k?
|
||||
engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
|
||||
|
|
|
@ -132,23 +132,23 @@ static void setHondaAccordConfigurationCommon() {
|
|||
// Frankenso low out #10: PD5 Injector #3
|
||||
// Frankenso low out #11: PB8 injector #1
|
||||
// Frankenso low out #12: PB7 injector #4
|
||||
engineConfiguration->fuelPumpPin = GPIOE_3;
|
||||
engineConfiguration->fuelPumpPin = Gpio::E3;
|
||||
engineConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIOE_2;
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::E2;
|
||||
engineConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
|
||||
engineConfiguration->fanPin = GPIOE_4; // blue wire
|
||||
engineConfiguration->fanPin = Gpio::E4; // blue wire
|
||||
|
||||
engineConfiguration->idle.solenoidPin = GPIOD_3; // green wire
|
||||
engineConfiguration->idle.solenoidPin = Gpio::D3; // green wire
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOB_8;
|
||||
engineConfiguration->injectionPins[1] = GPIOB_9;
|
||||
engineConfiguration->injectionPins[2] = GPIOD_5;
|
||||
engineConfiguration->injectionPins[3] = GPIOB_7;
|
||||
engineConfiguration->injectionPins[0] = Gpio::B8;
|
||||
engineConfiguration->injectionPins[1] = Gpio::B9;
|
||||
engineConfiguration->injectionPins[2] = Gpio::D5;
|
||||
engineConfiguration->injectionPins[3] = Gpio::B7;
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOE_12; // white wire
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::E12; // white wire
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||
|
||||
|
||||
setFrankenso_01_LCD(engineConfiguration);
|
||||
|
|
|
@ -80,7 +80,7 @@ void setProteusHondaElement2003() {
|
|||
engineConfiguration->clt.adcChannel = PROTEUS_IN_ANALOG_TEMP_2;
|
||||
engineConfiguration->tps1_1AdcChannel = PROTEUS_IN_ANALOG_VOLT_3;
|
||||
engineConfiguration->map.sensor.hwChannel = PROTEUS_IN_ANALOG_VOLT_6;
|
||||
engineConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fanPin = Gpio::Unassigned;
|
||||
|
||||
|
||||
engineConfiguration->mainRelayPin = PROTEUS_LS_9;
|
||||
|
|
|
@ -76,8 +76,8 @@ static void commonMiataNa() {
|
|||
engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA;
|
||||
engineConfiguration->engineChartSize = 100;
|
||||
|
||||
engineConfiguration->triggerInputPins[0] = GPIOC_6; // 2G YEL/BLU
|
||||
engineConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::C6; // 2G YEL/BLU
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::A5; // 2E White CKP
|
||||
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
|
||||
|
@ -90,10 +90,10 @@ static void commonMiataNa() {
|
|||
// Frankenstein: high side #5 is PC9
|
||||
// Frankenstein: high side #6 is PC7
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOE_12; // Frankenstein: high side #3
|
||||
engineConfiguration->ignitionPins[1] = GPIOE_14; // Frankenstein: high side #4
|
||||
engineConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::E12; // Frankenstein: high side #3
|
||||
engineConfiguration->ignitionPins[1] = Gpio::E14; // Frankenstein: high side #4
|
||||
engineConfiguration->ignitionPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->cranking.baseFuel = 24;
|
||||
|
@ -113,7 +113,7 @@ void common079721_2351() {
|
|||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIO_UNASSIGNED; // fuel pump is not controlled by ECU on this engine
|
||||
engineConfiguration->fuelPumpPin = Gpio::Unassigned; // fuel pump is not controlled by ECU on this engine
|
||||
|
||||
// set cranking_injection_mode 0
|
||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
|
@ -151,31 +151,31 @@ void setFrankensteinMiata1996() {
|
|||
#endif
|
||||
|
||||
// upside down
|
||||
engineConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||
engineConfiguration->triggerInputPins[1] = GPIOC_6;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::A5;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::C6;
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIOE_4;
|
||||
engineConfiguration->idle.solenoidPin = GPIOE_5;
|
||||
engineConfiguration->fuelPumpPin = Gpio::E4;
|
||||
engineConfiguration->idle.solenoidPin = Gpio::E5;
|
||||
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_1;
|
||||
engineConfiguration->clt.adcChannel = EFI_ADC_11;
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_13;
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOE_12; // Frankenstein: high side #3
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[2] = GPIOE_14; // Frankenstein: high side #4
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::E12; // Frankenstein: high side #3
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::E14; // Frankenstein: high side #4
|
||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
|
||||
// harness is sequential but we have a limited board
|
||||
engineConfiguration->crankingInjectionMode = IM_BATCH;
|
||||
engineConfiguration->injectionMode = IM_BATCH;
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - out #12
|
||||
engineConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - out #11
|
||||
engineConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[0] = Gpio::B9; // Frankenstein: low side - out #12
|
||||
engineConfiguration->injectionPins[1] = Gpio::B8; // Frankenstein: low side - out #11
|
||||
engineConfiguration->injectionPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[3] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[4] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[5] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
}
|
||||
|
|
|
@ -245,12 +245,12 @@ static void miataNAcommonEngineSettings() {
|
|||
|
||||
static void miataNAcommon() {
|
||||
|
||||
engineConfiguration->idle.solenoidPin = GPIOB_9; // this W61 <> W61 jumper, pin 3W
|
||||
engineConfiguration->idle.solenoidPin = Gpio::B9; // this W61 <> W61 jumper, pin 3W
|
||||
|
||||
engineConfiguration->ignitionPins[0] = GPIOE_14; // Frankenso high side - pin 1G
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[2] = GPIOC_7; // Frankenso high side - pin 1H
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::E14; // Frankenso high side - pin 1G
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::C7; // Frankenso high side - pin 1H
|
||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -276,28 +276,28 @@ void setMiataNA6_MAP_Frankenso() {
|
|||
|
||||
engineConfiguration->isSdCardEnabled = true;
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOD_3; // #1&3 pin 3U
|
||||
engineConfiguration->injectionPins[1] = GPIOE_2; // #2&4 pin 3V
|
||||
engineConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->injectionPins[0] = Gpio::D3; // #1&3 pin 3U
|
||||
engineConfiguration->injectionPins[1] = Gpio::E2; // #2&4 pin 3V
|
||||
engineConfiguration->injectionPins[2] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[3] = Gpio::Unassigned;
|
||||
|
||||
// white wire from 1E - TOP of W4 to BOTTOM W62
|
||||
engineConfiguration->malfunctionIndicatorPin = GPIOD_5;
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::D5;
|
||||
|
||||
// yellow wire from 1V/W22 to bottom of W48
|
||||
engineConfiguration->clutchDownPin = GPIOA_3;
|
||||
engineConfiguration->clutchDownPin = Gpio::A3;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLUP;
|
||||
|
||||
|
||||
// 110mm red wire from 1N/W14 to bottom of W45
|
||||
engineConfiguration->throttlePedalUpPin = GPIOA_7;
|
||||
engineConfiguration->throttlePedalUpPin = Gpio::A7;
|
||||
|
||||
// green wire from 1Q/W17 to bottom of W46
|
||||
engineConfiguration->acSwitch = GPIOA_6;
|
||||
engineConfiguration->acSwitch = Gpio::A6;
|
||||
|
||||
#if ! EFI_UNIT_TEST
|
||||
// W57 PE3 A/C compressor relay out
|
||||
engineConfiguration->acRelayPin = GPIOE_3;
|
||||
engineConfiguration->acRelayPin = Gpio::E3;
|
||||
// W58 PE4 A/C fan relay out
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
||||
|
@ -339,11 +339,11 @@ void setMiataNA6_VAF_MRE() {
|
|||
void setMiataNA6_MAP_MRE() {
|
||||
miataNAcommonEngineSettings();
|
||||
|
||||
engineConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||
engineConfiguration->triggerInputPins[1] = GPIOC_6;
|
||||
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::A5;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::C6;
|
||||
engineConfiguration->camInputs[0] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->fuelPumpPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fuelPumpPin = Gpio::Unassigned;
|
||||
|
||||
|
||||
engineConfiguration->twoWireBatchInjection = true;
|
||||
|
@ -378,7 +378,7 @@ void setMiataNA6_MAP_MRE() {
|
|||
engineConfiguration->idleTimingPidDeadZone = 10;
|
||||
|
||||
// EFI_ADC_3: "22 - AN temp 4"
|
||||
engineConfiguration->acSwitch = GPIOA_3;
|
||||
engineConfiguration->acSwitch = Gpio::A3;
|
||||
|
||||
#if HW_MICRO_RUSEFI
|
||||
// todo: ask Stefan to clarify this
|
||||
|
@ -393,14 +393,14 @@ void setMiataNA6_MAP_MRE() {
|
|||
|
||||
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
// GPIOG_1: "Clutch Switch"
|
||||
engineConfiguration->clutchDownPin = GPIOG_1;
|
||||
// Gpio::G1: "Clutch Switch"
|
||||
engineConfiguration->clutchDownPin = Gpio::G1;
|
||||
|
||||
engineConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fanPin = Gpio::Unassigned;
|
||||
|
||||
|
||||
// TLE8888_PIN_23: "33 - GP Out 3"
|
||||
engineConfiguration->malfunctionIndicatorPin = TLE8888_PIN_23;
|
||||
// Gpio::TLE8888_PIN_23: "33 - GP Out 3"
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::TLE8888_PIN_23;
|
||||
|
||||
#endif /* BOARD_TLE8888_COUNT */
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ void setMiata94_MAP_MRE() {
|
|||
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
// "35 - GP Out 1"
|
||||
engineConfiguration->fuelPumpPin = TLE8888_PIN_21;
|
||||
engineConfiguration->fuelPumpPin = Gpio::TLE8888_PIN_21;
|
||||
#endif /* BOARD_TLE8888_COUNT */
|
||||
|
||||
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||
|
@ -440,7 +440,7 @@ void setHellenNA94() {
|
|||
engineConfiguration->fan2OnTemperature = 95;
|
||||
engineConfiguration->fan2OffTemperature = 91;
|
||||
|
||||
engineConfiguration->fan2Pin = GPIOD_9; // 3S - A/C Fan 94-95
|
||||
engineConfiguration->fan2Pin = Gpio::D9; // 3S - A/C Fan 94-95
|
||||
}
|
||||
|
||||
void setHellenNA6() {
|
||||
|
|
|
@ -94,7 +94,7 @@ void setMazdaMiata2003EngineConfigurationNaFuelRail() {
|
|||
copyArray(config->lambdaRpmBins, mazda_miata_nb2_targetLambdaRpmBins);
|
||||
copyArray(config->lambdaLoadBins, mazda_miata_nb2_targetLambdaLoadBins);
|
||||
|
||||
engineConfiguration->ignitionPins[2] = GPIOC_7;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::C7;
|
||||
|
||||
// Frankenso analog #7 pin 3J, W48 top <>W48 bottom jumper, not OEM
|
||||
engineConfiguration->afr.hwChannel = EFI_ADC_3; // PA3
|
||||
|
|
|
@ -41,10 +41,10 @@ void setMazdaMiataNA8Configuration() {
|
|||
engineConfiguration->vbattDividerCoeff = 9.75;// ((float) (8.2 + 33)) / 8.2 * 2;
|
||||
|
||||
|
||||
engineConfiguration->injectionPins[0] = GPIOD_3; // #1 pin 3U
|
||||
engineConfiguration->injectionPins[1] = GPIOE_2; // #2 pin 3V
|
||||
engineConfiguration->injectionPins[2] = GPIOB_8; // #3 pin 3Y
|
||||
engineConfiguration->injectionPins[3] = GPIOB_7; // #4 pin 3Z
|
||||
engineConfiguration->injectionPins[0] = Gpio::D3; // #1 pin 3U
|
||||
engineConfiguration->injectionPins[1] = Gpio::E2; // #2 pin 3V
|
||||
engineConfiguration->injectionPins[2] = Gpio::B8; // #3 pin 3Y
|
||||
engineConfiguration->injectionPins[3] = Gpio::B7; // #4 pin 3Z
|
||||
|
||||
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue