hellen81
This commit is contained in:
parent
0ce025b1f5
commit
6f825e733d
|
@ -25,19 +25,27 @@ DDEFS += -DLED_WARNING_BRAIN_PIN_MODE=INVERTED_OUTPUT
|
||||||
DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT
|
DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT
|
||||||
|
|
||||||
# Disable serial ports on this board as UART3 causes a DMA conflict with the SD card
|
# Disable serial ports on this board as UART3 causes a DMA conflict with the SD card
|
||||||
DDEFS += -DTS_NO_PRIMARY=1 -DTS_NO_SECONDARY=1
|
DDEFS += -DTS_NO_PRIMARY -DTS_NO_SECONDARY
|
||||||
|
DDEFS += -DEFI_CAN_SERIAL=TRUE -DTS_CAN_DEVICE_SHORT_PACKETS_IN_ONE_FRAME=TRUE
|
||||||
|
# todo debug:
|
||||||
|
DDEFS += -DDISABLE_CAN_UPDATE_DASH=TRUE
|
||||||
|
|
||||||
# Add them all together
|
# Add them all together
|
||||||
DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen81\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN)
|
DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen81\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN)
|
||||||
#DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
#DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||||
#DDEFS += -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE
|
#DDEFS += -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE -DHAL_VSS_USE_PAL=TRUE
|
||||||
DDEFS += -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_ADC=TRUE
|
DDEFS += -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_ADC=TRUE -DHAL_VSS_USE_PAL=TRUE
|
||||||
# todo: is it broken?
|
# todo: is it broken?
|
||||||
DDEFS += -DEFI_LOGIC_ANALYZER=FALSE
|
DDEFS += -DEFI_LOGIC_ANALYZER=FALSE
|
||||||
|
|
||||||
TRIGGER_USE_ADC = yes
|
TRIGGER_USE_ADC = yes
|
||||||
|
|
||||||
DDEFS += -DFAST_ADC_SKIP=3 -DH7_ADC_SPEED=20000 -DH7_ADC_OVERSAMPLE=2
|
# we need fast ADC for software trigger detector
|
||||||
|
#DDEFS += -DEFI_OVERRIDE_FAST_ADC_FOR_STM32H7=TRUE -DADC_FAST_DEVICE=ADCD1 -DADC_SLOW_DEVICE=ADCD3 -DSTM32_ADC_USE_ADC3=TRUE
|
||||||
|
#DDEFS += -DADC_SLOW_DEVICE=ADCD3 -DSTM32_ADC_USE_ADC3=TRUE
|
||||||
|
|
||||||
|
DDEFS += -DEFI_OVERRIDE_FAST_ADC_FOR_STM32H7=TRUE -DADC_FAST_DEVICE=ADCD1 -DEFI_USE_ONLY_FAST_ADC=TRUE -DEFI_FASTER_UNIFORM_ADC=TRUE -DADC_MAX_CHANNELS_COUNT=16 -DADC_BUF_DEPTH_FAST=1 -DADC_BUF_NUM_AVG=1
|
||||||
|
#DDEFS += -DADC_SLOW_DEVICE=ADCD1
|
||||||
|
|
||||||
# We are running on Hellen-One hardware!
|
# We are running on Hellen-One hardware!
|
||||||
DDEFS += -DHW_HELLEN=1
|
DDEFS += -DHW_HELLEN=1
|
||||||
|
|
|
@ -10,9 +10,13 @@
|
||||||
* @author Andrey Belomutskiy, (c) 2012-2021
|
* @author Andrey Belomutskiy, (c) 2012-2021
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pch.h"
|
#include "global.h"
|
||||||
|
#include "engine.h"
|
||||||
|
#include "engine_math.h"
|
||||||
|
#include "allsensors.h"
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
#include "../hellen_meta.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = GPIOG_7;
|
engineConfiguration->injectionPins[0] = GPIOG_7;
|
||||||
|
@ -158,7 +162,7 @@ void setBoardDefaultConfiguration(void) {
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||||
setAlgorithm(LM_SPEED_DENSITY);
|
setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
engineConfiguration->specs.cylindersCount = 4;
|
engineConfiguration->specs.cylindersCount = 4;
|
||||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||||
|
@ -173,6 +177,17 @@ void setBoardDefaultConfiguration(void) {
|
||||||
* @todo Add your board-specific code, if any.
|
* @todo Add your board-specific code, if any.
|
||||||
*/
|
*/
|
||||||
void setSdCardConfigurationOverrides(void) {
|
void setSdCardConfigurationOverrides(void) {
|
||||||
|
// Hellen81a uses SPI2 for SD-card
|
||||||
|
#if 1
|
||||||
|
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
|
||||||
|
|
||||||
|
engineConfiguration->spi2mosiPin = GPIOB_15;
|
||||||
|
engineConfiguration->spi2misoPin = GPIOB_14;
|
||||||
|
engineConfiguration->spi2sckPin = GPIOB_13;
|
||||||
|
engineConfiguration->sdCardCsPin = GPIOB_12;
|
||||||
|
|
||||||
|
CONFIG(is_enabled_spi_2) = true;
|
||||||
|
#else
|
||||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||||
|
|
||||||
engineConfiguration->spi3mosiPin = GPIOC_12;
|
engineConfiguration->spi3mosiPin = GPIOC_12;
|
||||||
|
@ -180,9 +195,6 @@ void setSdCardConfigurationOverrides(void) {
|
||||||
engineConfiguration->spi3sckPin = GPIOC_10;
|
engineConfiguration->spi3sckPin = GPIOC_10;
|
||||||
engineConfiguration->sdCardCsPin = GPIOA_15;
|
engineConfiguration->sdCardCsPin = GPIOA_15;
|
||||||
|
|
||||||
// engineConfiguration->spi2mosiPin = GPIOB_15;
|
CONFIG(is_enabled_spi_3) = true;
|
||||||
// engineConfiguration->spi2misoPin = GPIOB_14;
|
#endif
|
||||||
// engineConfiguration->spi2sckPin = GPIOB_13;
|
|
||||||
// engineConfiguration->sdCardCsPin = GPIOB_12;
|
|
||||||
engineConfiguration->is_enabled_spi_3 = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ pins:
|
||||||
|
|
||||||
- pin: 14
|
- pin: 14
|
||||||
function: Main Relay Output
|
function: Main Relay Output
|
||||||
id: GPIOH_13
|
id: GPIOI_2
|
||||||
class: outputs
|
class: outputs
|
||||||
ts_name: 14 - OUT_MAIN
|
ts_name: 14 - OUT_MAIN
|
||||||
type: ls
|
type: ls
|
||||||
|
@ -511,7 +511,6 @@ pins:
|
||||||
function: CAN-L (ME7.8.8-compatible)
|
function: CAN-L (ME7.8.8-compatible)
|
||||||
|
|
||||||
info:
|
info:
|
||||||
title: Hellen 81
|
|
||||||
image:
|
image:
|
||||||
file: main.jpg
|
file: main.jpg
|
||||||
pins:
|
pins:
|
||||||
|
|
Loading…
Reference in New Issue