Add core48 and remove 48way (#270)

* Add core48 and remove 48way

* small changes as Matthew noted

* update to build Firmware workflow

* updates and rename from core 8 to core48

* added missing compile_core48 files

* engine_type_e:: removed from board.mk
This commit is contained in:
Benas Brazdziunas 2023-10-25 20:57:13 +01:00 committed by GitHub
parent fe15f6c123
commit 7cd8e696c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 2384 additions and 240 deletions

View File

@ -196,6 +196,10 @@ jobs:
folder: config/boards/core8
ini-file: fome_core8.ini
- build-target: core48
folder: config/boards/core48
ini-file: fome_core48.ini
# - build-target: 48way
# folder: config/boards/48way
# ini-file: fome_48way.ini

View File

@ -1,83 +0,0 @@
/**
* @file boards/48way/board_configuration.cpp
*
* @brief Configuration defaults for the 48way STM32 board
*
* @author Ben Brazdziunas, 2022
*/
#include "pch.h"
static void setInjectorPins() {
engineConfiguration->injectionPins[0] = Gpio::E15;
engineConfiguration->injectionPins[1] = Gpio::E14;
engineConfiguration->injectionPins[2] = Gpio::E13;
engineConfiguration->injectionPins[3] = Gpio::E12;
engineConfiguration->injectionPins[4] = Gpio::E11;
engineConfiguration->injectionPins[5] = Gpio::E10;
engineConfiguration->injectionPins[6] = Gpio::E9;
engineConfiguration->injectionPins[7] = Gpio::E8;
}
static void setIgnitionPins() {
engineConfiguration->ignitionPins[0] = Gpio::D12;
engineConfiguration->ignitionPins[1] = Gpio::D13;
engineConfiguration->ignitionPins[2] = Gpio::B15;
engineConfiguration->ignitionPins[3] = Gpio::B14;
engineConfiguration->ignitionPins[4] = Gpio::D8;
engineConfiguration->ignitionPins[5] = Gpio::D9;
engineConfiguration->ignitionPins[6] = Gpio::D11;
engineConfiguration->ignitionPins[7] = Gpio::D10;
}
static void setEtbConfig() {
}
static void setupVbatt() {
// 5.6k high side/10k low side = 1.56 ratio divider
engineConfiguration->analogInputDividerCoefficient = 1.56f;
// 6.34k high side/ 1k low side
engineConfiguration->vbattDividerCoeff = (6.34 + 1) / 1;
// Battery sense on PA7
engineConfiguration->vbattAdcChannel = EFI_ADC_0;
engineConfiguration->adcVcc = 3.3f;
}
static void setStepperConfig() {
engineConfiguration->idle.stepperDirectionPin = Gpio::C9;
engineConfiguration->idle.stepperStepPin = Gpio::C8;
engineConfiguration->stepperEnablePin = Gpio::A8;
}
Gpio getRunningLedPin() {
return Gpio::C10;
}
void setBoardConfigOverrides() {
setupVbatt();
//setEtbConfig();
setStepperConfig();
engineConfiguration->clt.config.bias_resistor = 2490;
engineConfiguration->iat.config.bias_resistor = 2490;
//CAN 1 bus overwrites
engineConfiguration->canRxPin = Gpio::D0;
engineConfiguration->canTxPin = Gpio::D1;
//CAN 2 bus overwrites
engineConfiguration->can2RxPin = Gpio::B12;
engineConfiguration->can2TxPin = Gpio::B13;
}
void setBoardDefaultConfiguration(void) {
setInjectorPins();
setIgnitionPins();
engineConfiguration->isSdCardEnabled = false;
engineConfiguration->canBaudRate = B500KBPS;
engineConfiguration->can2BaudRate = B500KBPS;
}

View File

@ -1,3 +0,0 @@
#!/bin/bash
bash ../common_make.sh 48way ARCH_STM32F4

View File

@ -1,40 +0,0 @@
//DO NOT EDIT MANUALLY, let automation work hard.
// auto-generated by PinoutLogic.java based on config/boards/48way/connectors/main.yaml
#include "pch.h"
// see comments at declaration in pin_repository.h
const char * getBoardSpecificPinName(brain_pin_e brainPin) {
switch(brainPin) {
case Gpio::A1: return "TPS Reference Input (A1)";
case Gpio::B14: return "Ignition 4 Output (B14)";
case Gpio::B15: return "Ignition 3 Output (B15)";
case Gpio::C13: return "CrankShaft Input (C13)";
case Gpio::C6: return "Idle1 Output (C6)";
case Gpio::C7: return "Boost Controller Output (C7)";
case Gpio::D10: return "Ignition 8 Output (D10)";
case Gpio::D11: return "Ignition 7 Output (D11)";
case Gpio::D12: return "Ignition 1 Output (D12)";
case Gpio::D13: return "Ignition 2 Output (D13)";
case Gpio::D14: return "HC2 Output (D14)";
case Gpio::D15: return "HC1 Output (D15)";
case Gpio::D8: return "Ignition 5 Output (D8)";
case Gpio::D9: return "Ignition 6 Output (D9)";
case Gpio::E1: return "Clutch Input (E1)";
case Gpio::E10: return "Injector 6 Output (E10)";
case Gpio::E11: return "Injector 5 Output (E11)";
case Gpio::E12: return "Injector 4 Output (E12)";
case Gpio::E13: return "Injector 3 Output (E13)";
case Gpio::E14: return "Injector 2 Output (E14)";
case Gpio::E15: return "Injector 1 Output (E15)";
case Gpio::E2: return "Fan Relay (E2)";
case Gpio::E3: return "Fuel Relay (E3)";
case Gpio::E4: return "Launch Control (E4)";
case Gpio::E5: return "Tachometer (E5)";
case Gpio::E6: return "Camshaft Input (E6)";
case Gpio::E8: return "Injector 8 Output (E8)";
case Gpio::E9: return "Injector 7 Output (E9)";
default: return nullptr;
}
return nullptr;
}

View File

@ -1,112 +0,0 @@
pins:
- id: E2
class: outputs
ts_name: Fan Relay (E2)
- id: E3
class: outputs
ts_name: Fuel Relay (E3)
- id: E4
class: switch_inputs
ts_name: Launch Control (E4)
- id: E5
class: outputs
ts_name: Tachometer (E5)
- id: [E6, E6]
class: [switch_inputs, event_inputs]
ts_name: Camshaft Input (E6)
- id: [C13, C13]
class: [switch_inputs, event_inputs]
ts_name: CrankShaft Input (C13)
- id: EFI_ADC_0
class: analog_inputs
ts_name: Battery Reference Input (A0)
- id: [A1, EFI_ADC_1]
class: [switch_inputs, analog_inputs]
ts_name: TPS Reference Input (A1)
- id: EFI_ADC_2
class: analog_inputs
ts_name: CLT Reference Input (A2)
- id: EFI_ADC_3
class: analog_inputs
ts_name: IAT Reference Input (A3)
- id: EFI_ADC_4
class: analog_inputs
ts_name: O2 Reference Input (A4)
- id: EFI_ADC_14
class: analog_inputs
ts_name: Fuel Pressure Reference Input (C4)
- id: EFI_ADC_15
class: analog_inputs
ts_name: Oil Pressure Reference Input (C5)
- id: EFI_ADC_8
class: analog_inputs
ts_name: MAP Pressure Reference Input (B0)
- id: EFI_ADC_9
class: analog_inputs
ts_name: BARO Pressure Reference Input (B1)
- id: E8
class: outputs
ts_name: Injector 8 Output (E8)
- id: E9
class: outputs
ts_name: Injector 7 Output (E9)
- id: E10
class: outputs
ts_name: Injector 6 Output (E10)
- id: E11
class: outputs
ts_name: Injector 5 Output (E11)
- id: E12
class: outputs
ts_name: Injector 4 Output (E12)
- id: E13
class: outputs
ts_name: Injector 3 Output (E13)
- id: E14
class: outputs
ts_name: Injector 2 Output (E14)
- id: E15
class: outputs
ts_name: Injector 1 Output (E15)
- id: E1
class: switch_inputs
ts_name: Clutch Input (E1)
- id: C7
class: outputs
ts_name: Boost Controller Output (C7)
- id: C6
class: outputs
ts_name: Idle1 Output (C6)
- id: D15
class: outputs
ts_name: HC1 Output (D15)
- id: D14
class: outputs
ts_name: HC2 Output (D14)
- id: D13
class: outputs
ts_name: Ignition 2 Output (D13)
- id: D12
class: outputs
ts_name: Ignition 1 Output (D12)
- id: D11
class: outputs
ts_name: Ignition 7 Output (D11)
- id: D10
class: outputs
ts_name: Ignition 8 Output (D10)
- id: D9
class: outputs
ts_name: Ignition 6 Output (D9)
- id: D8
class: outputs
ts_name: Ignition 5 Output (D8)
- id: B15
class: outputs
ts_name: Ignition 3 Output (B15)
- id: B14
class: outputs
ts_name: Ignition 4 Output (B14)
info:
directory: 48way

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,7 @@
BOARDCPPSRC = $(BOARD_DIR)/board_configuration.cpp
# Override DEFAULT_ENGINE_TYPE
DDEFS += -DSHORT_BOARD_NAME=48way
DDEFS += -DFIRMWARE_ID=\"48way\"
DDEFS += -DSHORT_BOARD_NAME=core48
DDEFS += -DFIRMWARE_ID=\"core48\"
DDEFS += -DDEFAULT_ENGINE_TYPE=MINIMAL_PINS
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE

View File

@ -0,0 +1,196 @@
/**
* @file boards/core48/board_configuration.cpp
*
* @brief Configuration defaults for the core48 board
*
* @author Ben Brazdziunas, 2022
*/
#include "pch.h"
static void setInjectorPins() {
engineConfiguration->injectionPinMode = OM_DEFAULT;
engineConfiguration->injectionPins[0] = Gpio::D6;
engineConfiguration->injectionPins[1] = Gpio::D7;
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] = 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::E10;
engineConfiguration->ignitionPins[6] = Gpio::G8;
engineConfiguration->ignitionPins[7] = Gpio::G15;
}
// PE3 is error LED, configured in board.mk
Gpio getCommsLedPin() {
return Gpio::G13;
}
Gpio getRunningLedPin() {
return Gpio::G10;
}
Gpio getWarningLedPin() {
return Gpio::G11;
}
static void setEtbConfig() {
// TLE9201 driver
// This chip has three control pins:
// DIR - sets direction of the motor
// PWM - pwm control (enable high, coast low)
// DIS - disables motor (enable low)
// Throttle #1
// PWM pin
engineConfiguration->etbIo[0].controlPin = Gpio::B8;
// DIR pin
engineConfiguration->etbIo[0].directionPin1 = Gpio::B9;
// Disable pin
engineConfiguration->etbIo[0].disablePin = Gpio::B7;
// Unused
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
// Throttle #2
// PWM pin
engineConfiguration->etbIo[1].controlPin = Gpio::Unassigned;
// DIR pin
engineConfiguration->etbIo[1].directionPin1 = Gpio::Unassigned;
// Disable pin
engineConfiguration->etbIo[1].disablePin = Gpio::Unassigned;
// Unused
engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
// we only have pwm/dir, no dira/dirb
engineConfiguration->etb_use_two_wires = false;
}
static void
setupVbatt() {
// 5.6k high side/10k low side = 1.56 ratio divider
engineConfiguration->analogInputDividerCoefficient = 1.56f;
// 6.34k high side/ 1k low side
engineConfiguration->vbattDividerCoeff = (6.34 + 1) / 1;
// Battery sense on PA7
engineConfiguration->vbattAdcChannel = EFI_ADC_9;
engineConfiguration->adcVcc = 3.3f;
}
static void setStepperConfig() {
engineConfiguration->idle.stepperDirectionPin = Gpio::A8;
engineConfiguration->idle.stepperStepPin = Gpio::C6;
engineConfiguration->stepperEnablePin = Gpio::C7;
}
static void setupSdCard() {
//SD CARD overwrites
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
engineConfiguration->is_enabled_spi_3 = true;
engineConfiguration->spi3sckPin = Gpio::C10;
engineConfiguration->spi3misoPin = Gpio::C11;
engineConfiguration->spi3mosiPin = Gpio::C12;
}
static void setupEGT() {
//EGT overwrites
engineConfiguration->spi2sckPin = Gpio::B13;
engineConfiguration->spi2misoPin = Gpio::B14;
engineConfiguration->spi2mosiPin = Gpio::B15;
engineConfiguration->is_enabled_spi_2 = true;
engineConfiguration->max31855spiDevice = SPI_DEVICE_2;
engineConfiguration->max31855_cs[0] = Gpio::C8;
engineConfiguration->max31855_cs[1] = Gpio::C9;
}
void setBoardConfigOverrides() {
setupVbatt();
setupSdCard();
setEtbConfig();
setStepperConfig();
setupEGT();
engineConfiguration->clt.config.bias_resistor = 2490;
engineConfiguration->iat.config.bias_resistor = 2490;
//SERIAL
engineConfiguration->binarySerialTxPin = Gpio::A9;
engineConfiguration->binarySerialRxPin = Gpio::A10;
engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED;
engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED;
//CAN 1 bus overwrites
engineConfiguration->canRxPin = Gpio::D0;
engineConfiguration->canTxPin = Gpio::D1;
//CAN 2 bus overwrites
engineConfiguration->can2RxPin = Gpio::B5;
engineConfiguration->can2TxPin = Gpio::B6;
//onboard lps22 barometer
engineConfiguration->lps25BaroSensorScl = Gpio::B10;
engineConfiguration->lps25BaroSensorSda = Gpio::B11;
}
static void setupDefaultSensorInputs() {
engineConfiguration->afr.hwChannel = EFI_ADC_13; //PC3
engineConfiguration->afr.hwChannel2 = EFI_ADC_0; //PA0
setEgoSensor(ES_14Point7_Free);
engineConfiguration->map.sensor.hwChannel = EFI_ADC_2; //PB0
engineConfiguration->map.sensor.type = MT_MPXH6400;
engineConfiguration->baroSensor.hwChannel = EFI_ADC_NONE;
}
void setBoardDefaultConfiguration(void) {
setInjectorPins();
setIgnitionPins();
setupDefaultSensorInputs();
engineConfiguration->canWriteEnabled = true;
engineConfiguration->canReadEnabled = true;
engineConfiguration->canSleepPeriodMs = 50;
engineConfiguration->canBaudRate = B500KBPS;
engineConfiguration->can2BaudRate = B500KBPS;
//ECU has two SD cards one fixed ine removable
engineConfiguration->sdCardCsPin = Gpio::B3;
strncpy(config->luaScript, R"(
function onTick()
end
)", efi::size(config->luaScript));
}

View File

@ -0,0 +1,3 @@
@echo off
bash.exe compile_core48.sh

View File

@ -0,0 +1,5 @@
#!/bin/bash
export USE_OPENBLT=yes
bash ../common_make.sh core48 ARCH_STM32F4

View File

@ -0,0 +1,251 @@
pins:
- pin: A1
function: FUEL PUMP
type: out_low
ts_name: Low Side 12 (G3)
pin_name: PG3
- pin: A2
function: FAN RELAY
type: out_low
ts_name: Low Side 13 (G4)
pin_name: PG4
- pin: A3
function: BOOST
type: out_low
ts_name: Low Side 14 (G5)
pin_name: PG5
- pin: A4
function: IDLE
type: out_low
ts_name: Low Side 15 (G6)
pin_name: PG6
- pin: A5
function: LSU HEATER-
alternative1: LSU 4.9 CONNECTOR PIN 3
alternative2: WHITE WIRE
type: lsu_heater-
- pin: A6
function: LSU IA
alternative1: LSU 4.9 CONNECTOR PIN 5
alternative2: GREEN WIRE
type: lsu_ia
- pin: A7
function: LSU VGND
alternative1: LSU 4.9 CONNECTOR PIN 2
alternative2: YELLOW WIRE
type: lsu_vgnd
- pin: A8
function: LSU HEATER+
alternative1: LSU 4.9 CONNECTOR PIN 4
alternative2: GREY WIRE
type: lsu_heater+
- pin: B1
function: DBW+
alternative1: Low Side 11 (G2)
type: switch
ts_name: Switch SW5
- pin: B2
function: CAN LOW
alternative1: Digital Input 1 (D5)
alternative2: USB D+
type: switch
ts_name: Switch SW4
- pin: B3
function: CAN HIGH
alternative1: Digital Input 2 (D4)
alternative2: USB D-
type: switch
ts_name: Switch SW3
- pin: B4
function: Digital Input 4 (D2)
alternative1: Analogue Input 8 (A4)
alternative2: Knock 1 (C0)
type: switch
ts_name: Switch SW2
- pin: B5
function: Digital Input 3 (D3)
alternative1: Analogue Input 9 (A1)
alternative2: Knock 2 (C1)
type: switch
ts_name: Switch SW1
- pin: B6
function: LSU NERMEST
alternative1: LSU 4.9 CONNECTOR PIN 6
alternative2: BLACK WIRE
type: lsu_nermest
- pin: B7
function: LSU IP
alternative1: LSU 4.9 CONNECTOR PIN 1
alternative2: RED WIRE
type: lsu_ip
- pin: B8
function: +12V Battery
type: 12v
ts_name: +12V from Battery
- pin: C1
function: DBW-
alternative1: Low Side 10 (D15)
type: switch
ts_name: Switch SW6
- pin: C2
function: VR1+
alternative1: HALL 1 (PG1)
type: in_trigger
ts_name: VR1+
pin_name: PE2
- pin: C3
function: VR1-
alternative1: HALL 2 (PE7)
type: in_trigger
ts_name: VR1-
- pin: C4
function: VR2-
alternative1: HALL 4 (PE8)
type: in_trigger
ts_name: VR2-
- pin: C5
function: VR2+
alternative1: HALL 3 (PE9)
type: in_trigger
ts_name: VR2+
pin_name: PE3
- pin: C6
function: VVTI
type: out_low
ts_name: Low Side 16 (G7)
pin_name: PG7
- pin: C7
function: Sensor +5v
type: 5v
ts_name: Sensor +5v Supply
- pin: C8
function: Ground
type: gnd
ts_name: Ground
info:
title: pinout
name: BLACK CONNECTOR
image:
file: main.jpg
pins:
- pin: A1
x: 560
y: 182
- pin: A2
x: 584
y: 182
- pin: A3
x: 608
y: 182
- pin: A4
x: 632
y: 182
- pin: A5
x: 656
y: 182
- pin: A6
x: 680
y: 182
- pin: A7
x: 704
y: 182
- pin: A8
x: 728
y: 182
- pin: B1
x: 560
y: 146
- pin: B2
x: 584
y: 146
- pin: B3
x: 608
y: 146
- pin: B4
x: 632
y: 146
- pin: B5
x: 656
y: 146
- pin: B6
x: 680
y: 146
- pin: B7
x: 704
y: 146
- pin: B8
x: 728
y: 146
- pin: C1
x: 560
y: 110
- pin: C2
x: 584
y: 110
- pin: C3
x: 608
y: 110
- pin: C4
x: 632
y: 110
- pin: C5
x: 656
y: 110
- pin: C6
x: 680
y: 110
- pin: C7
x: 704
y: 110
- pin: C8
x: 728
y: 110

View File

@ -0,0 +1,257 @@
pins:
- pin: A1
function: INJECTOR 1
type: out_low
ts_name: Low Side 1 (D6)
pin_name: PD6
- pin: A2
function: INJECTOR 2
type: out_low
ts_name: Low Side 2 (D7)
pin_name: PD7
- pin: A3
function: INJECTOR 3
type: out_low
ts_name: Low Side 3 (D8)
pin_name: PD8
- pin: A4
function: INJECTOR 4
type: out_low
ts_name: Low Side 4 (D9)
pin_name: PD9
- pin: A5
function: INJECTOR 5
type: out_low
ts_name: Low Side 5 (D10)
pin_name: PD10
- pin: A6
function: INJECTOR 6
type: out_low
ts_name: Low Side 6 (D11)
pin_name: PD11
- pin: A7
function: INJECTOR 7
type: out_low
ts_name: Low Side 7 (D12)
pin_name: PD12
- pin: A8
function: INJECTOR 8
type: out_low
ts_name: Low Side 8 (D13)
pin_name: PD13
- pin: B1
function: COIL 1
alternative1: +5v or +12v signal depends on selection
type: out_high
ts_name: High Side 1 (G15)
pin_name: PG15
- pin: B2
function: COIL 2
alternative1: +5v or +12v signal depends on selection
type: out_high
ts_name: High Side 2 (G8)
pin_name: PG8
- pin: B3
function: COIL 3
alternative1: +5v or +12v signal depends on selection
type: out_high
ts_name: High Side 3 (E10)
pin_name: PE10
- pin: B4
function: COIL 4
alternative1: +5v or +12v signal depends on selection
type: out_high
ts_name: High Side 4 (E11)
pin_name: PE11
- pin: B5
function: COIL 5
alternative1: +5v or +12v signal depends on selection
type: out_high
ts_name: High Side 5 (E12)
pin_name: PE12
- pin: B6
function: COIL 6
alternative1: +5v or +12v signal depends on selection
type: out_high
ts_name: High Side 6 (E13)
pin_name: PE13
- pin: B7
function: COIL 7
alternative1: +5v or +12v signal depends on selection
type: out_high
ts_name: High Side 7 (E14)
pin_name: PE14
- pin: B8
function: COIL 8
alternative1: +5v or +12v signal depends on selection
type: out_high
ts_name: High Side 8 (E15)
pin_name: PE15
- pin: C1
function: TPS
type: in_adc
ts_name: Analog Inputs 1 (C5)
pin_name: PC5
- pin: C2
function: CLT
alternative1: turn SW10 B0 ON to enable 2.49k PULL UP
type: in_adc
ts_name: Analog Inputs 2 (B0)
pin_name: PB0
- pin: C3
function: IAT
alternative1: turn SW10 A7 ON to enable 2.49k PULL UP
type: in_adc
ts_name: Analog Inputs 3 (A7)
pin_name: PA7
- pin: C4
function: OIL PRESSURE
type: in_adc
ts_name: Analog Inputs 4 (C4)
pin_name: PC4
- pin: C5
function: FUEL PRESSURE
type: in_adc
ts_name: Analog Inputs 5 (A5)
pin_name: PA5
- pin: C6
function: SPARE ANALOG INPUT
type: in_adc
ts_name: Analog Inputs 6 (A6)
pin_name: PA6
- pin: C7
function: SPARE ANALOG INPUT
type: in_adc
ts_name: Analog Inputs 7 (A3)
pin_name: PA3
- pin: C8
function: TACHO
alternative1: PULL UP to +5v or +12v depends on selection
type: out_low
ts_name: High Side 9 (D14)
pin_name: PD14
info:
title: pinout
name: GREY CONNECTOR
image:
file: main.jpg
pins:
- pin: A1
x: 192
y: 182
- pin: A2
x: 216
y: 182
- pin: A3
x: 240
y: 182
- pin: A4
x: 264
y: 182
- pin: A5
x: 288
y: 182
- pin: A6
x: 312
y: 182
- pin: A7
x: 336
y: 182
- pin: A8
x: 360
y: 182
- pin: B1
x: 192
y: 146
- pin: B2
x: 216
y: 146
- pin: B3
x: 240
y: 146
- pin: B4
x: 264
y: 146
- pin: B5
x: 288
y: 146
- pin: B6
x: 312
y: 146
- pin: B7
x: 336
y: 146
- pin: B8
x: 360
y: 146
- pin: C1
x: 192
y: 110
- pin: C2
x: 216
y: 110
- pin: C3
x: 240
y: 110
- pin: C4
x: 264
y: 110
- pin: C5
x: 288
y: 110
- pin: C6
x: 312
y: 110
- pin: C7
x: 336
y: 110
- pin: C8
x: 360
y: 110

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -0,0 +1,360 @@
pins:
- function: Power Ground
type: gnd
color: black
- function: +12V
type: 12v
color: red
- id: D6
class: outputs
ts_name: Low Side 1 (D6)
- id: D7
class: outputs
ts_name: Low Side 2 (D7)
- id: D8
class: outputs
ts_name: Low Side 3 (D8)
- id: D9
class: outputs
ts_name: Low Side 4 (D9)
- id: D10
class: outputs
ts_name: Low Side 5 (D10)
- id: D11
class: outputs
ts_name: Low Side 6 (D11)
- id: D12
class: outputs
ts_name: Low Side 7 (D12)
- id: D13
class: outputs
ts_name: Low Side 8 (D13)
- id: D14
class: outputs
function: Tachometer Output
ts_name: Low Side 9 (D14)
- id: D15
class: outputs
ts_name: Low Side 10 (D15)
- id: G2
class: outputs
ts_name: Low Side 11 (G2)
- id: G3
class: outputs
ts_name: Low Side 12 (G3)
- id: G4
class: outputs
ts_name: Low Side 13 (G4)
- id: G5
class: outputs
ts_name: Low Side 14 (G5)
- id: G6
class: outputs
ts_name: Low Side 15 (G6)
- id: G7
class: outputs
ts_name: Low Side 16 (G7)
- id: E15
class: outputs
type: ign
ts_name: High Side 1 (E15)
- id: E14
class: outputs
type: ign
ts_name: High Side 2 (E14)
- id: E13
class: outputs
type: ign
ts_name: High Side 3 (E13)
- id: E12
class: outputs
type: ign
ts_name: High Side 4 (E12)
- id: E11
class: outputs
type: ign
ts_name: High Side 5 (E11)
- id: E10
class: outputs
type: ign
ts_name: High Side 6 (E10)
- id: G8
class: outputs
type: ign
ts_name: High Side 7 (G8)
- id: G15
class: outputs
type: ign
ts_name: High Side 8 (G15)
- id: A8
class: outputs
ts_name: Stepper Direction (A8)
- id: C6
class: outputs
ts_name: Stepper Control (C6)
- id: C7
class: outputs
ts_name: Stepper Disable (C7)
- id: B7
class: outputs
ts_name: DBW Disable (B7)
- id: B8
class: outputs
ts_name: DBW Control (B8)
- id: B9
class: outputs
ts_name: DBW Direction (B9)
- id: EFI_ADC_9
class: analog_inputs
ts_name: On-board Battery Sense (B1)
- id: EFI_ADC_15
class: analog_inputs
ts_name: Analog Inputs 1 (C5)
- id: EFI_ADC_8
class: analog_inputs
ts_name: Analog Inputs 2 (B0)
- id: EFI_ADC_7
class: analog_inputs
ts_name: Analog Inputs 3 (A7)
- id: EFI_ADC_14
class: analog_inputs
ts_name: Analog Inputs 4 (C4)
- id: EFI_ADC_5
class: analog_inputs
ts_name: Analog Inputs 5 (A5)
- id: EFI_ADC_6
class: analog_inputs
ts_name: Analog Inputs 6 (A6)
- id: EFI_ADC_3
class: analog_inputs
ts_name: Analog Inputs 7 (A3)
- id: EFI_ADC_2
class: analog_inputs
function: MAP Sensor Input
ts_name: On-board MAP (A2)
- id: EFI_ADC_13
class: analog_inputs
function: O2 Sensor Input
ts_name: Primary On-board O2 (C3)
- id: EFI_ADC_0
class: analog_inputs
function: O2 Sensor Input
ts_name: Secondary On-board O2 (A0)
- id: EFI_ADC_4
class: analog_inputs
ts_name: Analog Inputs 8 (A4)
- id: EFI_ADC_1
class: analog_inputs
ts_name: Analog Inputs 9 (A1)
- id: EFI_ADC_10
class: analog_inputs
ts_name: Analog Inputs Knock 1 (C0)
- id: EFI_ADC_11
class: analog_inputs
ts_name: Analog Inputs Knock 2 (C1)
- id: [E2, E2]
class: [switch_inputs, event_inputs]
ts_name: VR1 (E2)
- id: [E3, E3]
class: [switch_inputs, event_inputs]
ts_name: VR2 (E3)
- id: [E4, E4]
class: [switch_inputs, event_inputs]
ts_name: VR3 (E4)
- id: [E5, E5]
class: [switch_inputs, event_inputs]
ts_name: VR4 (E5)
- id: [G1, G1]
class: [switch_inputs, event_inputs]
ts_name: Hall1 (G1)
- id: [E7, E7]
class: [switch_inputs, event_inputs]
ts_name: Hall2 (E7)
- id: [E9, E9]
class: [switch_inputs, event_inputs]
ts_name: Hall3 (E9)
- id: [E8, E8]
class: [switch_inputs, event_inputs]
ts_name: Hall4 (E8)
- id: [F13, F13]
class: [switch_inputs, event_inputs]
ts_name: Hall5 (F13)
- id: [F14, F14]
class: [switch_inputs, event_inputs]
ts_name: Hall6 (F14)
- id: [G0, G0]
class: [switch_inputs, event_inputs]
ts_name: Hall7 (G0)
- id: [F15, F15]
class: [switch_inputs, event_inputs]
ts_name: Hall8 (F15)
- id: [D4, D4]
class: [switch_inputs, event_inputs]
ts_name: Digital Input 1 (D4)
- id: [D5, D5]
class: [switch_inputs, event_inputs]
ts_name: Digital Input 2 (D5)
- id: [D2, D2]
class: [switch_inputs, event_inputs]
ts_name: Digital Input 3 (D2)
- id: [D3, D3]
class: [switch_inputs, event_inputs]
ts_name: Digital Input 4 (D3)
- id: G10
class: outputs
ts_name: Running LED (G10)
- id: G11
class: outputs
ts_name: Warning LED (G11)
- id: G12
class: outputs
ts_name: Error LED (G12)
- id: G13
class: outputs
ts_name: Communication LED (G13)
- id: C8
class: outputs
ts_name: EGT1 CS (C8)
- id: C9
class: outputs
ts_name: EGT2 CS (C9)
- id: C10
class: outputs
ts_name: SPI3 SCK (C10)
- id: C11
class: outputs
ts_name: SPI3 MISO (C11)
- id: C12
class: outputs
ts_name: SPI3 MOSI (C12)
- id: B13
class: outputs
ts_name: SPI2 SCK (B13)
- id: B14
class: outputs
ts_name: SPI2 MISO (B14)
- id: B15
class: outputs
ts_name: SPI2 MOSI (B15)
- id: B10
class: outputs
ts_name: BARO SCL (B10)
- id: B11
class: outputs
ts_name: BARO SDA (B11)
- id: B3
class: outputs
ts_name: SD CS1 (B3)
- id: B4
class: outputs
ts_name: SD CS2 (B4)
- id: A9
class: outputs
ts_name: USART1 TX (A9)
- id: A10
class: outputs
ts_name: USART1 RX (A10)
- id: G9
class: outputs
ts_name: USART6 RX (G9)
- id: G14
class: outputs
ts_name: USART6 TX (G14)
- id: D0
class: outputs
ts_name: CAN 1 RX (D0)
- id: D1
class: outputs
ts_name: CAN 1 TX (D1)
- id: B5
class: outputs
ts_name: CAN 2 RX (B5)
- id: B6
class: outputs
ts_name: CAN 2 TX (B6)

View File

@ -0,0 +1,256 @@
# CORE 48 v2.1
![image](https://github.com/opelpanfan/CORE48/assets/12942077/5bdb0bb8-2ab7-4919-9121-8c81560b6320)
## Features
- 8 Injectors
- 8 Coils
- 8 Low Side Switch
- 4 VR / 8 Hall Triggers
- 4 Digital Inputs
- 8 Analogue 0-5v inputs (all can be used as temperature inputs via 2.49k pull up resistor SW10 and SW11)
- DBW
- 2 Wideband (14point7)
- 2 Canbus
- 2 EGT
- 4bar map
- Onboard Barometer
- Onboard SD card/Removable SD Card
- Bluetooth
## Firmware
<div align="center">
<a href="https://github.com/rusefi/rusefi" target="_blank">
<img src="https://raw.githubusercontent.com/wiki/rusefi/rusefi/Images/logo_new.png" alt="rusEFI" width="600" />
</a>
<br/>
<b>GPL open-source ECU</b>
<br/>
</div>
## Interactive Pinout Manual
https://opelpanfan.github.io/CORE48/core48_21.html
### Black Connector
<div align="center">
<a href="https://opelpanfan.github.io/CORE48/core48_21.html" target="_blank">
<img src="https://github.com/opelpanfan/CORE48/assets/12942077/cb34225e-63c1-4ae5-84aa-97a96f62b942" alt="black" width="100%" />
</a>
</div>
| Pin Number | STM32 Pin Number | TS Name | Typical Function | Alternative Function #1 | Alternative Function #2 |
| ------ | ------ | ------ | ------ | ------ | ------ |
| A1 | PG3 | Low Side 12 (G3) | FUEL PUMP | | |
| A2 | PG4 | Low Side 13 (G4) | FAN RELAY | | |
| A3 | PG5 | Low Side 14 (G5) | BOOST | | |
| A4 | PG6 | Low Side 15 (G6) | IDLE | | |
| A5 | | | LSU HEATER- | LSU 4.9 CONNECTOR PIN 3 | WHITE WIRE |
| A6 | | | LSU IA | LSU 4.9 CONNECTOR PIN 5 | GREEN WIRE |
| A7 | | | LSU VGND | LSU 4.9 CONNECTOR PIN 2 | YELLOW WIRE |
| A8 | | | LSU HEATER+ | LSU 4.9 CONNECTOR PIN 4 | GREY WIRE |
| B1 | | Switch SW5 | DBW+ | Low Side 11 (G2) | |
| B2 | | Switch SW4 | CAN LOW | Digital Input 1 (D5) | USB D+ |
| B3 | | Switch SW3 | CAN HIGH | Digital Input 2 (D4) | USB D- |
| B4 | | Switch SW2 | Digital Input 4 (D2) | Analogue Input 8 (A4) | Knock 1 (C0) |
| B5 | | Switch SW1 | Digital Input 3 (D3) | Analogue Input 9 (A1) | Knock 2 (C1) |
| B6 | | | LSU NERMEST | LSU 4.9 CONNECTOR PIN 6 | BLACK WIRE |
| B7 | | | LSU IP | LSU 4.9 CONNECTOR PIN 1 | RED WIRE |
| B8 | | +12V from Battery | +12V Battery | | |
| C1 | | Switch SW6 | DBW- | Low Side 10 (D15) | |
| C2 | PE2 | VR1+ | VR1+ | HALL 1 (PG1) | |
| C3 | | VR1- | VR1- | HALL 2 (PE7) | |
| C4 | | VR2- | VR2- | HALL 4 (PE8) | |
| C5 | PE3 | VR2+ | VR2+ | HALL 3 (PE9) | |
| C6 | PG7 | Low Side 16 (G7) | VVTI | | |
| C7 | | Sensor +5v Supply | Sensor +5v Supply | | |
| C8 | | Ground | Ground | | |
### Grey Connector
<div align="center">
<a href="https://opelpanfan.github.io/CORE48/core48_21.html" target="_blank">
<img src="https://github.com/opelpanfan/CORE48/assets/12942077/ebb802ea-ebaf-4b2f-a6b5-6568010a384e" alt="grey" width="100%" />
</a>
</div>
| Pin Number | STM32 Pin Number | TS Name | Typical Function | Alternative Function #1 |
| ------ | ------ | ------ | ------ | ------ |
| A1 | PD6 | Low Side 1 (D6) |INJECTOR 1 | |
| A2 | PD7 | Low Side 2 (D7) |INJECTOR 2 | |
| A3 | PD8 | Low Side 3 (D8) |INJECTOR 3 | |
| A4 | PD9 | Low Side 4 (D9) |INJECTOR 4 | |
| A5 | PD10 | Low Side 5 (D10) |INJECTOR 5 | |
| A6 | PD11 | Low Side 6 (D11) |INJECTOR 6 | |
| A7 | PD12 | Low Side 7 (D12) |INJECTOR 7 | |
| A8 | PD13 | Low Side 8 (D13) |INJECTOR 8 | |
| B1 | PG15 | High Side 1 (G15) |COIL 1 | +5v or +12v signal depends on selection |
| B2 | PG8 | High Side 2 (G8) |COIL 2 | +5v or +12v signal depends on selection |
| B3 | PE10 | High Side 3 (E10) |COIL 3 | +5v or +12v signal depends on selection |
| B4 | PE11 | High Side 4 (E11) |COIL 4 | +5v or +12v signal depends on selection |
| B5 | PE12 | High Side 5 (E12) |COIL 5 | +5v or +12v signal depends on selection |
| B6 | PE13 | High Side 6 (E13) |COIL 6 | +5v or +12v signal depends on selection |
| B7 | PE14 | High Side 7 (E14) |COIL 7 | +5v or +12v signal depends on selection |
| B8 | PE15 | High Side 8 (E15) |COIL 8 | |
| C1 | PC5 | Analog Inputs 1 (C5) |TPS | |
| C2 | PB0 | Analog Inputs 2 (B0) |CLT | turn SW10 B0 ON to enable 2.49k PULL UP |
| C3 | PA7 | Analog Inputs 3 (A7) |IAT | turn SW10 A7 ON to enable 2.49k PULL UP |
| C4 | PC4 | Analog Inputs 4 (C4) |OIL PRESSURE | HALL 4 (PE8) |
| C5 | PA5 | Analog Inputs 5 (A5) |FUEL PRESSURE | HALL 3 (PE9) |
| C6 | PA6 | Analog Inputs 6 (A6) |SPARE ANALOG INPUT| |
| C7 | PA3 | Analog Inputs 7 (A3) |SPARE ANALOG INPUT| |
| C8 | PD14 | High Side 9 (D14) |TACHO | PULLUP +5v or +12v depends on selection |
## PCB Layout
### :warning: **Please check the connector pinout table as some silk prints on the PCB are wrong.**
![image](https://github.com/opelpanfan/CORE48/assets/12942077/3469a74a-7623-40d8-a7de-25a0a55c2823)
## Solder jumper configuration
| Switch ID | Link to Connector | Image | RED | BLUE | GREEN |
| ------ | ------ | ------ | ------ | ------ | ------ |
| SW1 | B_B5 | ![image](https://github.com/opelpanfan/CORE48/assets/12942077/1757576a-7584-4ea2-9035-57acbbaf3b19) | Knock 2 (C1) | Analog Inputs 9 (A1) | Digital Input 3 (D3) |
| SW2 | B_C6 | ![image](https://github.com/opelpanfan/CORE48/assets/12942077/1b31a344-36ec-4790-a561-0a1140de30eb) | Digital Input 4 (D2) | Analog Inputs 8 (A4) | Knock 1 (C0) |
| SW3 | B_B3 | ![image](https://github.com/opelpanfan/CORE48/assets/12942077/711358c0-e6ea-4739-a8e7-d2e205c731dd) | USB D+ | Digital Input 1 (D5) | CAN LOW |
| SW4 | B_B2 | ![image](https://github.com/opelpanfan/CORE48/assets/12942077/13c2c3d5-92b9-4165-abd7-87adfbc2b485) | CAN HIGH | Digital Input 2 (D4) | USB D- |
| SW5 | B_B1 | ![image](https://github.com/opelpanfan/CORE48/assets/12942077/f82bcf90-6858-464f-9b6d-c5ac517da40f) | Low Side 11 (G2) | DBW+ | |
| SW6 | B_C1 | ![image](https://github.com/opelpanfan/CORE48/assets/12942077/f0aa1e6a-c734-4d53-98a2-01fd3d8e0ee6) | Low Side 10 (D15) | DBW- | |
| SW7 | B_C8 | ![image](https://github.com/opelpanfan/CORE48/assets/12942077/4ac00500-5d3b-4104-9123-b3110029daaf) | TACHO PULL UP to +12v | TACHO PULL UP to +5v | |
| SW8 | COIL Signal | ![image](https://github.com/opelpanfan/CORE48/assets/12942077/ce27c313-928a-4be8-b1f0-466bbbb1c55b) | COIL Trigger +12v | COIL Trigger +5v | |
### VR Trigger Configuration
![image](https://github.com/opelpanfan/CORE48/assets/12942077/76f164eb-7be7-466e-9e0a-0189acd6b181)
### HALL Trigger Configuration
![image](https://github.com/opelpanfan/CORE48/assets/12942077/5c0ed98f-dc9c-4850-972a-7a3a368713a3)
### SW10 and SW11: Analogue input PULLUP resistors (2.49k) to +5V for Temperature Sensor
>Analogue input pull up settings to use for temperature inputs:
>Most of Analogue inputs can be used as temperature inputs with 2.49Kohm pull up to +5v resistors.
>These resistors can be enabled by flipping toggle switch to ON position.
![image](https://github.com/opelpanfan/CORE48/assets/12942077/feb964ff-f6d2-4a99-856c-991d7fd84f30)
### SW12 Digital Input PULLUP resistors (680k) to +5v
>Digital input 680kohm pull up resistors to +5v.
>If your digital input requires pull up resistor taht can be enabled by flipping toggle switch to ON possition.
![image](https://github.com/opelpanfan/CORE48/assets/12942077/7b24b38e-0779-4887-ad61-4abda1b18171)
### SW9 CAN bus terminator Resistors and Knock Audio Filters
>1. toggle switch is to ON possition to enable 120ohm terminating resistor on CAN1
>2. toggle switch is to ON possition to enable 120ohm terminating resistor on CAN2
>3. toggle switch is to ON possition to enable 3.3nF filter capacitor on KNOCK 1 Input
>4. toggle switch is to ON possition to enable 3.3nF filter capacitor on KNOCK 2 Input
![image](https://github.com/opelpanfan/CORE48/assets/12942077/d3dc0053-40e4-4aa0-af15-56401b117058)
## Additional Connectors
![image](https://github.com/opelpanfan/CORE48/assets/12942077/232973ae-c908-4171-bbfc-a493dfd78635)
### CAN Connector
![image](https://github.com/opelpanfan/CORE48/assets/12942077/1f331c42-2952-4920-9695-7dd1e4caabf2)
| Pin | STM32 PIN | Function |
| ------ | ------ | ------ |
| 1 | | CAN 1 LOW |
| 2 | | CAN 1 HIGH |
| 3 | | CAN 2 LOW |
| 4 | | CAN 2 HIGH |
### USB Connector
![image](https://github.com/opelpanfan/CORE48/assets/12942077/d67afd6f-4710-4ef0-bb53-0fb0c96deeb1)
| Pin | STM32 PIN | Function |
| ------ | ------ | ------ |
| 1 | | USB +5V |
| 2 | | USB D- |
| 3 | | USB D+ |
| 4 | | GND |
### Stepper Connector
![image](https://github.com/opelpanfan/CORE48/assets/12942077/c8108ecd-139e-4c5d-8e20-70fbb49c9b4d)
| Pin | STM32 PIN | Function |
| ------ | ------ | ------ |
| 1 | | STEP 1B |
| 2 | | STEP 1A |
| 3 | | STEP 2A |
| 4 | | STEP 2B |
### VR3/VR4 Connector
![image](https://github.com/opelpanfan/CORE48/assets/12942077/c49c41fe-d15f-4377-80a0-b8a9ff652205)
| Pin | STM32 PIN | Function |
| ------ | ------ | ------ |
| 1 | PE4/PF13 | VR3+/HALL5 (F13) |
| 2 | PF14 | VR3-/HALL6 (F14) |
| 3 | PF15 | VR4-/HALL8 (F15) |
| 4 | PE5/PG0 | VR4+/HALL7 (G0) |
### EGT Connector
![image](https://github.com/opelpanfan/CORE48/assets/12942077/1dcf5bb6-c38a-41e1-8293-b87aee4d508b)
| Pin | STM32 PIN | Function |
| ------ | ------ | ------ |
| 1 | | EGT1 T- |
| 2 | | EGT1 T+ |
| 3 | | EGT2 T- |
| 4 | | EGT2 T+ |
### Knock/Serial Connector
![image](https://github.com/opelpanfan/CORE48/assets/12942077/24d01a55-a5b8-459b-b840-11c136f379a0)
| Pin | STM32 PIN | Function |
| ------ | ------ | ------ |
| 1 | | UART6 RX |
| 2 | | UART6 TX |
| 3 | | KNOCK 2 Audio |
| 4 | | KNOCK 1 Audio |
### DBW Connector
![image](https://github.com/opelpanfan/CORE48/assets/12942077/c65efae5-5758-409d-acdc-784bcb1f960b)
| Pin | STM32 PIN | Function |
| ------ | ------ | ------ |
| 1 | | GND |
| 2 | | +5V |
| 3 | | ET- |
| 4 | | ET+ |
| 5 | | Analog Inputs 8 (A4) |
| 6 | | Analog Inputs 9 (A1) |
### LSU Connector
![image](https://github.com/opelpanfan/CORE48/assets/12942077/63d5e15a-5c4e-44d1-8edd-1df03da7e6d4)
![image](https://github.com/opelpanfan/CORE48/assets/12942077/05f5cd9a-93ac-4810-8be9-47d00f090758)
| Pin | STM32 PIN | Function |
| ------ | ------ | ------ |
| 1 | | LSU Connector 4 |
| 2 | | LSU Connector 3 |
| 3 | | LSU Connector 2 |
| 4 | | LSU Connector 1 |
| 5 | | LSU Connector 6 |
| 6 | | LSU Connector 5 |

View File

@ -0,0 +1,21 @@
/**
* @file knock_config.h
*/
#pragma once
// Knock is on ADC3
#define KNOCK_ADC ADCD3
// knock 1 - pin PC0
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN10
#define KNOCK_PIN_CH1 Gpio::C0
// knock 2 - pin PC1
#define KNOCK_HAS_CH2 true
#define KNOCK_ADC_CH2 ADC_CHANNEL_IN11
#define KNOCK_PIN_CH2 Gpio::C1
// Sample rate & time - depends on the exact MCU
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84
#define KNOCK_SAMPLE_RATE (STM32_PCLK2 / (4 * (84 + 12)))

View File

@ -1,4 +1,9 @@
#define ts_show_hip9011 false
#define ts_show_cj125 false
#define ts_show_lcd false
#define ts_show_joystick false
#define ts_show_gps false
#define ts_show_software_knock true
#define show_test_presets true

View File

@ -39,6 +39,7 @@ for BOARD in \
"config/boards/microrusefi mre_f7" \
"config/boards/microrusefi mre_f4" \
"config/boards/core8 core8" \
"config/boards/core48 core48" \
"config/boards/48way 48way" \
"config/boards/frankenso frankenso_na6" \
"config/boards/prometheus prometheus_469" \