HellenNA8_96 config folder #3724
This commit is contained in:
parent
b90638be44
commit
d83b7f19af
|
@ -0,0 +1,41 @@
|
|||
# Combine the related files for a specific platform and MCU.
|
||||
|
||||
# Target ECU board design
|
||||
BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen-nb1/board_configuration.cpp
|
||||
BOARDINC = $(BOARDS_DIR)/hellen/hellen-nb1
|
||||
|
||||
# Set this if you want a default engine type other than normal hellen-nb1
|
||||
ifeq ($(DEFAULT_ENGINE_TYPE),)
|
||||
DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_NA8_96
|
||||
endif
|
||||
|
||||
# 144 package MCU
|
||||
ifeq ($(LED_CRITICAL_ERROR_BRAIN_PIN),)
|
||||
LED_CRITICAL_ERROR_BRAIN_PIN = -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOG_0
|
||||
endif
|
||||
|
||||
DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
||||
|
||||
DDEFS += -DLED_ERROR_BRAIN_PIN_MODE=INVERTED_OUTPUT
|
||||
DDEFS += -DLED_RUNING_BRAIN_PIN_MODE=INVERTED_OUTPUT
|
||||
DDEFS += -DLED_WARNING_BRAIN_PIN_MODE=INVERTED_OUTPUT
|
||||
DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT
|
||||
|
||||
DDEFS += -DTS_NO_SECONDARY
|
||||
|
||||
# Add them all together
|
||||
DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellenNB1\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN)
|
||||
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||
DDEFS += -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE
|
||||
# todo: is it broken?
|
||||
DDEFS += -DEFI_LOGIC_ANALYZER=FALSE
|
||||
|
||||
# Enable serial pins on expansion header
|
||||
DDEFS += -DEFI_CONSOLE_TX_BRAIN_PIN=GPIOD_6 -DEFI_CONSOLE_RX_BRAIN_PIN=GPIOD_5 -DTS_PRIMARY_PORT=UARTD2 -DSTM32_UART_USE_USART2=1
|
||||
|
||||
# We are running on Hellen-One hardware!
|
||||
DDEFS += -DHW_HELLEN=1
|
||||
|
||||
# Shared variables
|
||||
ALLCPPSRC += $(BOARDCPPSRC)
|
||||
ALLINC += $(BOARDINC)
|
|
@ -0,0 +1,172 @@
|
|||
/**
|
||||
* @file boards/hellen/hellen-nb1/board_configuration.cpp
|
||||
*
|
||||
*
|
||||
* @brief Configuration defaults for the hellen-nb1 board
|
||||
*
|
||||
* See http://rusefi.com/s/hellenNB1
|
||||
*
|
||||
* @author andreika <prometheus.pcb@gmail.com>
|
||||
* @author Andrey Belomutskiy, (c) 2012-2020
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "custom_engine.h"
|
||||
#include "../hellen_meta.h"
|
||||
|
||||
static void setInjectorPins() {
|
||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
||||
engineConfiguration->injectionPins[2] = H144_LS_3;
|
||||
engineConfiguration->injectionPins[3] = H144_LS_4;
|
||||
|
||||
// Disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->clutchDownPin = GPIOC_4; // Clutch switch input
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
|
||||
engineConfiguration->malfunctionIndicatorPin = H144_OUT_IO8;
|
||||
}
|
||||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->ignitionPins[2] = H144_IGN_2;
|
||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
|
||||
// disable remainder
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
|
||||
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
}
|
||||
|
||||
static void setupVbatt() {
|
||||
// 4.7k high side/4.7k low side = 2.0 ratio divider
|
||||
engineConfiguration->analogInputDividerCoefficient = 2.0f;
|
||||
|
||||
// set vbatt_divider 5.835
|
||||
// 33k / 6.8k
|
||||
engineConfiguration->vbattDividerCoeff = (33 + 6.8) / 6.8; // 5.835
|
||||
|
||||
// pin input +12 from Main Relay
|
||||
engineConfiguration->vbattAdcChannel = EFI_ADC_5; // 4T
|
||||
|
||||
engineConfiguration->adcVcc = 3.29f;
|
||||
}
|
||||
|
||||
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->tps1_1AdcChannel = EFI_ADC_4;
|
||||
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
|
||||
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_10;
|
||||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_11;
|
||||
|
||||
engineConfiguration->afr.hwChannel = EFI_ADC_1;
|
||||
|
||||
engineConfiguration->clt.adcChannel = EFI_ADC_12;
|
||||
|
||||
engineConfiguration->iat.adcChannel = EFI_ADC_13;
|
||||
|
||||
engineConfiguration->auxTempSensor1.adcChannel = EFI_ADC_NONE;
|
||||
engineConfiguration->auxTempSensor2.adcChannel = EFI_ADC_NONE;
|
||||
}
|
||||
|
||||
void setBoardConfigOverrides(void) {
|
||||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
setSdCardConfigurationOverrides();
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 4700;
|
||||
engineConfiguration->iat.config.bias_resistor = 4700;
|
||||
|
||||
engineConfiguration->canTxPin = GPIOD_1;
|
||||
engineConfiguration->canRxPin = GPIOD_0;
|
||||
}
|
||||
|
||||
void setPinConfigurationOverrides(void) {
|
||||
}
|
||||
|
||||
void setSerialConfigurationOverrides(void) {
|
||||
engineConfiguration->useSerialPort = false;
|
||||
engineConfiguration->binarySerialTxPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->binarySerialRxPin = GPIO_UNASSIGNED;
|
||||
// engineConfiguration->consoleSerialTxPin = GPIO_UNASSIGNED;
|
||||
// engineConfiguration->consoleSerialRxPin = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Board-specific configuration defaults.
|
||||
*
|
||||
* See also setDefaultEngineConfiguration
|
||||
*
|
||||
* @todo Add your board-specific code, if any.
|
||||
*/
|
||||
void setBoardDefaultConfiguration(void) {
|
||||
setInjectorPins();
|
||||
setIgnitionPins();
|
||||
|
||||
engineConfiguration->isSdCardEnabled = true;
|
||||
|
||||
engineConfiguration->enableSoftwareKnock = true;
|
||||
|
||||
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->tachOutputPin = H144_OUT_PWM1;
|
||||
engineConfiguration->alternatorControlPin = H144_OUT_PWM7;
|
||||
engineConfiguration->fan2Pin = H144_OUT_IO2;
|
||||
|
||||
// "required" hardware is done - set some reasonable defaults
|
||||
setupDefaultSensorInputs();
|
||||
|
||||
// Some sensible defaults for other options
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||
setAlgorithm(LM_SPEED_DENSITY);
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; // IM_WASTED_SPARK
|
||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
engineConfiguration->injectionMode = IM_SIMULTANEOUS;//IM_BATCH;// IM_SEQUENTIAL;
|
||||
|
||||
engineConfiguration->clutchDownPin = H144_IN_D_2;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
|
||||
// ? engineConfiguration->malfunctionIndicatorPin = GPIOG_4; //1E - Check Engine Light
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Board-specific SD card configuration code overrides. Needed by bootloader code.
|
||||
* @todo Add your board-specific code, if any.
|
||||
*/
|
||||
void setSdCardConfigurationOverrides(void) {
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
|
||||
|
||||
engineConfiguration->spi2mosiPin = H_SPI2_MOSI;
|
||||
engineConfiguration->spi2misoPin = H_SPI2_MISO;
|
||||
engineConfiguration->spi2sckPin = H_SPI2_SCK;
|
||||
engineConfiguration->sdCardCsPin = H_SPI2_CS;
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
export PROJECT_BOARD=hellen/hellen-nb1
|
||||
export PROJECT_CPU=ARCH_STM32F4
|
||||
export EXTRA_PARAMS="-DSHORT_BOARD_NAME=hellen-na8-96"
|
||||
|
||||
cd ..
|
||||
bash ../common_make.sh
|
|
@ -0,0 +1 @@
|
|||
#include "../hellen_knock_config.h"
|
|
@ -0,0 +1,28 @@
|
|||
#define MAIN_HELP_URL "https://rusefi.com/s/hellenNB1"
|
||||
|
||||
#define ts_show_hip9011 false
|
||||
#define ts_show_cj125 false
|
||||
|
||||
! Jokeri says it's better with full pinout just in case
|
||||
! #define ts_show_full_pinout false
|
||||
|
||||
#define ts_show_lcd false
|
||||
#define ts_show_joystick false
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
#define ts_show_sd_card true
|
||||
#define ts_show_can_pins false
|
||||
#define ts_show_tunerstudio_port true
|
||||
#define ts_show_can2 false
|
||||
#define ts_show_software_knock true
|
||||
#define ts_show_hardware_simulator false
|
||||
|
||||
#define show_test_presets false
|
||||
#define show_Frankenso_presets false
|
||||
#define show_microRusEFI_presets false
|
||||
#define show_Proteus_presets false
|
||||
#define show_Hellen_presets true
|
||||
#define show_HellenNB1_presets true
|
|
@ -347,7 +347,7 @@ case TOYOTA_2JZ_GTE_VVTi:
|
|||
return "TOYOTA_2JZ_GTE_VVTi";
|
||||
case TOYOTA_JZS147:
|
||||
return "TOYOTA_JZS147";
|
||||
case UNUSED10:
|
||||
case HELLEN_NA8_96:
|
||||
return "UNUSED10";
|
||||
case UNUSED100:
|
||||
return "UNUSED100";
|
||||
|
|
|
@ -958,6 +958,7 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e
|
|||
setMiataNB2_Hellen72_36();
|
||||
break;
|
||||
case HELLEN_NB1:
|
||||
case HELLEN_NA8_96:
|
||||
setHellenNB1();
|
||||
break;
|
||||
case HELLEN72_ETB:
|
||||
|
|
|
@ -44,7 +44,7 @@ typedef enum {
|
|||
GY6_139QMB = 8,
|
||||
|
||||
PROTEUS_E65_6H_MAN_IN_THE_MIDDLE = 9,
|
||||
UNUSED10 = 10,
|
||||
HELLEN_NA8_96 = 10,
|
||||
MRE_MIATA_NB2_MAP = 11,
|
||||
MRE_MIATA_NA6_VAF = 12,
|
||||
MRE_MIATA_NB2_ETB = 13,
|
||||
|
|
Loading…
Reference in New Issue