Skip to content

Commit 2733043

Browse files
committed
Add mazduino-core board and publish lite INI artifacts
- boards/mazduino-core: STM32F427ZGT6, Proteus F4 pinout, dual ETB + traction control; prepend already has ts_show_idle_stepper=true so its generated INI ships the stepper idle UI (panel + Use Stepper toggle), consistent with the mini6ch stepper work - generated core INI + signature, generated.patch refresh - nightly-release: add mazduino-core to the build matrix - readme: document the Core board - ini/: published mazduino-lite auto-update INI snapshots
1 parent 8685394 commit 2733043

17 files changed

Lines changed: 66687 additions & 1 deletion

File tree

‎.github/workflows/nightly-release.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ jobs:
128128
- mazduino-compact (STM32F407VGT6, knock enabled)
129129
- mazduino-lite (STM32F407VGT6, no knock)
130130
- mazduino-mini6ch (STM32F427VGT6, ETB + traction control)
131+
- mazduino-core (STM32F427ZGT6, Proteus F4 pinout, dual ETB + traction control)
131132
- mazduino-mega100 (STM32F407VGT6, 1MB, full features, USB + CAN)
132133
- mazduino-mega100-512 (STM32F407VET6, 512KB, reduced feature set)
133134

‎boards/mazduino-core/board.mk‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Requires STM32F427ZGT6 (LQFP144), not the VGT6 (LQFP100) used by the rest of
2+
# the mazduino fleet: this pinout uses GPIOG (LS 2-7, IGN 6-12), which the
3+
# 100-pin package does not bond out.
4+
5+
ifneq ($(PROJECT_CPU),simulator)
6+
BOARDCPPSRC += \
7+
$(BOARD_DIR)/board_configuration.cpp \
8+
9+
endif
10+
11+
# STM32F427ZGT6: same core as F429 minus LTDC/DMA2D.
12+
# Enables SRAM3 (+64KB), correct flash driver, and EFI_IS_F42x features.
13+
# Clock stays at 168MHz so USB 48MHz remains exact (PLLN=336, PLLQ=7).
14+
IS_STM32F427 = yes
15+
16+
# Hardware serial port on UART 2 -> PD5/PD6, same as official Proteus F4
17+
DDEFS += -DSTM32_UART_USE_USART2=TRUE
18+
DDEFS += -DTS_PRIMARY_UxART_PORT=UARTD2
19+
DDEFS += -DEFI_CONSOLE_TX_BRAIN_PIN=Gpio::D5 -DEFI_CONSOLE_RX_BRAIN_PIN=Gpio::D6
20+
21+
DDEFS += -DEFI_WIDEBAND_FIRMWARE_UPDATE=FALSE
22+
DDEFS += -DRAM_UNUSED_SIZE=100
23+
DDEFS += -DSTM32_ADC_USE_ADC3=TRUE
24+
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
25+
DDEFS += -DKNOCK_SPECTROGRAM=TRUE
26+
27+
# Comms/Running/Warning LEDs at PE4/PE5/PE6, error LED at PE3 - same as official Proteus F4
28+
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::E3
29+
30+
# INI embedded in flash overflows the 768KB budget with CAN feature additions.
31+
# INI is published as a GitHub Releases artifact instead.
32+
DDEFS += -DEFI_EMBED_INI_MSD=FALSE
33+
34+
# Same as official Proteus F4: EGO/DYNO view and RTC don't fit the F4 flash budget
35+
# alongside ETB + 12x12 outputs + knock spectrogram.
36+
DDEFS += -DEFI_DYNO_VIEW=FALSE
37+
DDEFS += -DEFI_RTC=FALSE
38+
39+
# Mazda PFI — no GDI high-pressure fuel pump
40+
DDEFS += -DEFI_HPFP=FALSE
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
/**
2+
* @file board_configuration.cpp
3+
* Mazduino Core
4+
* https://wiki.mazduino.com/mazduino-core/
5+
*
6+
* Pinout is identical to the official rusEFI Proteus F4 board.
7+
*/
8+
9+
#include "pch.h"
10+
#include "board_overrides.h"
11+
12+
// 12 low-side outputs, same as official Proteus F4 (LS_1..LS_12)
13+
static const brain_pin_e injPins[] = {
14+
Gpio::D7, // LS 1
15+
Gpio::G9, // LS 2
16+
Gpio::G10, // LS 3
17+
Gpio::G11, // LS 4
18+
Gpio::G12, // LS 5
19+
Gpio::G13, // LS 6
20+
Gpio::G14, // LS 7
21+
Gpio::B4, // LS 8
22+
Gpio::B5, // LS 9
23+
Gpio::B6, // LS 10
24+
Gpio::B7, // LS 11
25+
Gpio::B8, // LS 12
26+
};
27+
28+
// 12 ignition outputs, same as official Proteus F4 (IGN_1..IGN_12)
29+
static const brain_pin_e ignPins[] = {
30+
Gpio::D4, // IGN 1
31+
Gpio::D3, // IGN 2
32+
Gpio::C9, // IGN 3
33+
Gpio::C8, // IGN 4
34+
Gpio::C7, // IGN 5
35+
Gpio::G8, // IGN 6
36+
Gpio::G7, // IGN 7
37+
Gpio::G6, // IGN 8
38+
Gpio::G5, // IGN 9
39+
Gpio::G4, // IGN 10
40+
Gpio::G3, // IGN 11
41+
Gpio::G2, // IGN 12
42+
};
43+
44+
static void setInjectorPins() {
45+
copyArray(engineConfiguration->injectionPins, injPins);
46+
}
47+
48+
static void setIgnitionPins() {
49+
copyArray(engineConfiguration->ignitionPins, ignPins);
50+
}
51+
52+
Gpio getCommsLedPin() { return Gpio::E4; }
53+
Gpio getRunningLedPin() { return Gpio::E5; }
54+
Gpio getWarningLedPin() { return Gpio::E6; }
55+
// PE3 is the critical error LED, configured in board.mk
56+
57+
static void setupVbatt() {
58+
// 5.6k high side/10k low side = 1.56 ratio divider
59+
engineConfiguration->analogInputDividerCoefficient = 1.56f;
60+
61+
// 82k high side/10k low side = 9.2
62+
engineConfiguration->vbattDividerCoeff = (92.0f / 10.0f);
63+
64+
// Battery sense on PA7
65+
engineConfiguration->vbattAdcChannel = EFI_ADC_7;
66+
67+
engineConfiguration->adcVcc = 3.3f;
68+
}
69+
70+
static void setupEtb() {
71+
// TLE9201 driver: DIR / PWM / DIS, same as official Proteus F4
72+
73+
// Throttle #1
74+
engineConfiguration->etbIo[0].controlPin = Gpio::D12; // PWM
75+
engineConfiguration->etbIo[0].directionPin1 = Gpio::D10; // DIR
76+
engineConfiguration->etbIo[0].disablePin = Gpio::D11; // Disable
77+
78+
// Throttle #2
79+
engineConfiguration->etbIo[1].controlPin = Gpio::D13; // PWM
80+
engineConfiguration->etbIo[1].directionPin1 = Gpio::D9; // DIR
81+
engineConfiguration->etbIo[1].disablePin = Gpio::D8; // Disable
82+
83+
// we only have pwm/dir, no dira/dirb
84+
engineConfiguration->etb_use_two_wires = false;
85+
}
86+
87+
static void setupDefaultSensorInputs() {
88+
// Digital 1 (PC6) as default trigger input, same as official Proteus F4
89+
engineConfiguration->triggerInputPins[0] = Gpio::C6;
90+
engineConfiguration->camInputs[0] = Gpio::Unassigned;
91+
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
92+
93+
engineConfiguration->clt.adcChannel = EFI_ADC_8; // PB0 - Analog Temp 3
94+
engineConfiguration->iat.adcChannel = EFI_ADC_15; // PC5 - Analog Temp 2
95+
engineConfiguration->tps1_1AdcChannel = EFI_ADC_11; // PC1 - Analog Volt 2
96+
engineConfiguration->map.sensor.hwChannel = EFI_ADC_10; // PC0 - Analog Volt 1
97+
98+
// pin PA5 "Analog Volt 10"
99+
engineConfiguration->afr.hwChannel = EFI_ADC_5;
100+
}
101+
102+
static void setupSdCard() {
103+
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
104+
engineConfiguration->sdCardCsPin = Gpio::D2;
105+
106+
engineConfiguration->is_enabled_spi_3 = true;
107+
engineConfiguration->spi3sckPin = Gpio::C10;
108+
engineConfiguration->spi3misoPin = Gpio::C11;
109+
engineConfiguration->spi3mosiPin = Gpio::C12;
110+
}
111+
112+
static void customBoardDefaultConfiguration() {
113+
setInjectorPins();
114+
setIgnitionPins();
115+
setupEtb();
116+
setupSdCard();
117+
setupVbatt();
118+
setupDefaultSensorInputs();
119+
120+
engineConfiguration->isSdCardEnabled = true;
121+
engineConfiguration->enableSoftwareKnock = true;
122+
123+
engineConfiguration->clt.config.bias_resistor = 2700;
124+
engineConfiguration->iat.config.bias_resistor = 2700;
125+
126+
// CAN
127+
engineConfiguration->canTxPin = Gpio::D1;
128+
engineConfiguration->canRxPin = Gpio::D0;
129+
engineConfiguration->can2RxPin = Gpio::B12;
130+
engineConfiguration->can2TxPin = Gpio::B13;
131+
132+
// onboard LPS25 baro sensor
133+
engineConfiguration->lps25BaroSensorScl = Gpio::B10;
134+
engineConfiguration->lps25BaroSensorSda = Gpio::B11;
135+
136+
// LS 10/11/12 double as fuel pump/fan/main relay, same as official Proteus F4
137+
engineConfiguration->mainRelayPin = Gpio::B8;
138+
engineConfiguration->fanPin = Gpio::B7;
139+
engineConfiguration->fuelPumpPin = Gpio::B6;
140+
}
141+
142+
void setup_custom_board_overrides() {
143+
custom_board_DefaultConfiguration = customBoardDefaultConfiguration;
144+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
pins:
2+
- id: CAN_INPUT_0
3+
class: switch_inputs
4+
ts_name: CAN Switch 1
5+
6+
- id: CAN_INPUT_1
7+
class: switch_inputs
8+
ts_name: CAN Switch 2
9+
10+
- id: CAN_INPUT_2
11+
class: switch_inputs
12+
ts_name: CAN Switch 3
13+
14+
- id: CAN_INPUT_3
15+
class: switch_inputs
16+
ts_name: CAN Switch 4
17+
18+
- id: CAN_INPUT_4
19+
class: switch_inputs
20+
ts_name: CAN Switch 5
21+
22+
- id: CAN_INPUT_5
23+
class: switch_inputs
24+
ts_name: CAN Switch 6
25+
26+
- id: CAN_INPUT_6
27+
class: switch_inputs
28+
ts_name: CAN Switch 7
29+
30+
- id: CAN_INPUT_7
31+
class: switch_inputs
32+
ts_name: CAN Switch 8
33+
34+
- id: EFI_ADC_48
35+
class: analog_inputs
36+
ts_name: CAN Analog 1
37+
38+
- id: EFI_ADC_49
39+
class: analog_inputs
40+
ts_name: CAN Analog 2
41+
42+
- id: EFI_ADC_50
43+
class: analog_inputs
44+
ts_name: CAN Analog 3
45+
46+
- id: EFI_ADC_51
47+
class: analog_inputs
48+
ts_name: CAN Analog 4
49+
50+
- id: EFI_ADC_52
51+
class: analog_inputs
52+
ts_name: CAN Analog 5
53+
54+
- id: EFI_ADC_53
55+
class: analog_inputs
56+
ts_name: CAN Analog 6
57+
58+
- id: EFI_ADC_54
59+
class: analog_inputs
60+
ts_name: CAN Analog 7
61+
62+
- id: EFI_ADC_55
63+
class: analog_inputs
64+
ts_name: CAN Analog 8
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// DO NOT EDIT MANUALLY, let automation work hard.
2+
3+
// auto-generated by PinoutLogic.java based on ../../../boards/mazduino-core/connectors/can.yaml
4+
// auto-generated by PinoutLogic.java based on ../../../boards/mazduino-core/connectors/main.yaml
5+
#pragma once
6+
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
// DO NOT EDIT MANUALLY, let automation work hard.
2+
3+
// auto-generated by PinoutLogic.java based on ../../../boards/mazduino-core/connectors/can.yaml
4+
// auto-generated by PinoutLogic.java based on ../../../boards/mazduino-core/connectors/main.yaml
5+
#pragma once
6+
7+
Gpio GENERATED_OUTPUTS[] = {
8+
Gpio::D7, // LS 1 (PD7)
9+
Gpio::G9, // LS 2 (PG9)
10+
Gpio::G10, // LS 3 (PG10)
11+
Gpio::G11, // LS 4 (PG11)
12+
Gpio::G12, // LS 5 (PG12)
13+
Gpio::G13, // LS 6 (PG13)
14+
Gpio::G14, // LS 7 (PG14)
15+
Gpio::B4, // LS 8 (PB4)
16+
Gpio::B5, // LS 9 (PB5)
17+
Gpio::B6, // LS 10 - Fuel Pump (PB6)
18+
Gpio::B7, // LS 11 - Fan (PB7)
19+
Gpio::B8, // LS 12 - Main Relay (PB8)
20+
Gpio::B9, // LS 13 (PB9)
21+
Gpio::E0, // LS 14 (PE0)
22+
Gpio::E1, // LS 15 (PE1)
23+
Gpio::E2, // LS 16 (PE2)
24+
Gpio::A9, // HS 1 (PA9)
25+
Gpio::A8, // HS 2 (PA8)
26+
Gpio::D15, // HS 3 (PD15)
27+
Gpio::D14, // HS 4 (PD14)
28+
Gpio::D4, // IGN 1 (PD4)
29+
Gpio::D3, // IGN 2 (PD3)
30+
Gpio::C9, // IGN 3 (PC9)
31+
Gpio::C8, // IGN 4 (PC8)
32+
Gpio::C7, // IGN 5 (PC7)
33+
Gpio::G8, // IGN 6 (PG8)
34+
Gpio::G7, // IGN 7 (PG7)
35+
Gpio::G6, // IGN 8 (PG6)
36+
Gpio::G5, // IGN 9 (PG5)
37+
Gpio::G4, // IGN 10 (PG4)
38+
Gpio::G3, // IGN 11 (PG3)
39+
Gpio::G2, // IGN 12 (PG2)
40+
Gpio::D12, // ETB1 PWM (PD12)
41+
Gpio::D10, // ETB1 DIR (PD10)
42+
Gpio::D11, // ETB1 DIS (PD11)
43+
Gpio::D13, // ETB2 PWM (PD13)
44+
Gpio::D9, // ETB2 DIR (PD9)
45+
Gpio::D8, // ETB2 DIS (PD8)
46+
// "LS 1 (PD7)",
47+
// "LS 2 (PG9)",
48+
// "LS 3 (PG10)",
49+
// "LS 4 (PG11)",
50+
// "LS 5 (PG12)",
51+
// "LS 6 (PG13)",
52+
// "LS 7 (PG14)",
53+
// "LS 8 (PB4)",
54+
// "LS 9 (PB5)",
55+
// "LS 10 - Fuel Pump (PB6)",
56+
// "LS 11 - Fan (PB7)",
57+
// "LS 12 - Main Relay (PB8)",
58+
// "LS 13 (PB9)",
59+
// "LS 14 (PE0)",
60+
// "LS 15 (PE1)",
61+
// "LS 16 (PE2)",
62+
// "HS 1 (PA9)",
63+
// "HS 2 (PA8)",
64+
// "HS 3 (PD15)",
65+
// "HS 4 (PD14)",
66+
// "IGN 1 (PD4)",
67+
// "IGN 2 (PD3)",
68+
// "IGN 3 (PC9)",
69+
// "IGN 4 (PC8)",
70+
// "IGN 5 (PC7)",
71+
// "IGN 6 (PG8)",
72+
// "IGN 7 (PG7)",
73+
// "IGN 8 (PG6)",
74+
// "IGN 9 (PG5)",
75+
// "IGN 10 (PG4)",
76+
// "IGN 11 (PG3)",
77+
// "IGN 12 (PG2)",
78+
// "ETB1 PWM (PD12)",
79+
// "ETB1 DIR (PD10)",
80+
// "ETB1 DIS (PD11)",
81+
// "ETB2 PWM (PD13)",
82+
// "ETB2 DIR (PD9)",
83+
// "ETB2 DIS (PD8)",
84+
}

0 commit comments

Comments
 (0)