rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions | Variables
board_configuration.cpp File Reference

Detailed Description

Configuration defaults for the microRusefi board.

MICRO_RUS_EFI set engine_type 60

MRE_BOARD_OLD_TEST set engine_type 30

MRE_BOARD_NEW_TEST set engine_type 31

See https://github.com/rusefi/rusefi/wiki/Hardware-microRusEfi-wiring

Author
Matthew Kennedy, (c) 2019

Definition in file board_configuration.cpp.

Functions

static void setInjectorPins ()
 
static void setIgnitionPins ()
 
Gpio getCommsLedPin ()
 
Gpio getRunningLedPin ()
 
Gpio getWarningLedPin ()
 
static void setupVbatt ()
 
static void setupTle8888 ()
 
static void setupEtb ()
 
static void setupDefaultSensorInputs ()
 
static void microrusefi_boardConfigOverrides ()
 
static void microrusefi_boardDefaultConfiguration ()
 Board-specific configuration defaults.
 
int getBoardMetaOutputsCount ()
 
GpiogetBoardMetaOutputs ()
 
int getBoardMetaDcOutputsCount ()
 
void setup_custom_board_overrides ()
 

Variables

static Gpio MRE_OUTPUTS []
 
static Gpio M111_OUTPUTS []
 

Function Documentation

◆ getBoardMetaDcOutputsCount()

int getBoardMetaDcOutputsCount ( )

Definition at line 228 of file board_configuration.cpp.

228 {
229 return 1;
230}

◆ getBoardMetaOutputs()

Gpio * getBoardMetaOutputs ( )

Definition at line 221 of file board_configuration.cpp.

221 {
223 return M111_OUTPUTS;
224 }
225 return MRE_OUTPUTS;
226}
static constexpr engine_configuration_s * engineConfiguration
static Gpio M111_OUTPUTS[]
static Gpio MRE_OUTPUTS[]

◆ getBoardMetaOutputsCount()

int getBoardMetaOutputsCount ( )

Definition at line 214 of file board_configuration.cpp.

214 {
216 return efi::size(M111_OUTPUTS);
217 }
218 return efi::size(MRE_OUTPUTS);
219}

◆ getCommsLedPin()

Gpio getCommsLedPin ( )

Definition at line 40 of file board_configuration.cpp.

40 {
41 return Gpio::E2; // d23 = blue
42}

◆ getRunningLedPin()

Gpio getRunningLedPin ( )

Definition at line 44 of file board_configuration.cpp.

44 {
45 // D22 = green
46 return Gpio::E4;
47}

◆ getWarningLedPin()

Gpio getWarningLedPin ( )

Definition at line 49 of file board_configuration.cpp.

49 {
50 // D27 = orange or yellow
51 return Gpio::E1;
52}

◆ microrusefi_boardConfigOverrides()

static void microrusefi_boardConfigOverrides ( )
static

Definition at line 122 of file board_configuration.cpp.

122 {
123 setupVbatt();
124 setupTle8888();
125 setupEtb();
126
129
132
133 // SPI2 for onboard SD card on v0.6.0
138
139 // SPI3 for expansion header
140 // Don't override enable since you might want these pins for something else
144}
static void setupEtb()
static void setupVbatt()
static void setupTle8888()

Referenced by setup_custom_board_overrides().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ microrusefi_boardDefaultConfiguration()

static void microrusefi_boardDefaultConfiguration ( )
static

Board-specific configuration defaults.

See also setDefaultEngineConfiguration

Definition at line 153 of file board_configuration.cpp.

153 {
156
157 // MRE has a special main relay control low side pin
158 // rusEfi firmware is totally not involved with main relay control on microRusEfi board
159 // todo: maybe even set EFI_MAIN_RELAY_CONTROL to FALSE for MRE configuration
160 // TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_IN11 / TLE8888_OUT21
161 // Gpio::TLE8888_PIN_21: "35 - GP Out 1"
162 engineConfiguration->fuelPumpPin = MRE_GPOUT_1;
163
164// engineConfiguration->isSdCardEnabled = true;
165
166 // TLE8888 high current low side: VVT2 IN9 / OUT5
167 // Gpio::E10: "3 - Lowside 2"
169
170
171 // Gpio::TLE8888_PIN_22: "34 - GP Out 2"
172 engineConfiguration->fanPin = MRE_GPOUT_2;
173
174 // "required" hardware is done - set some reasonable defaults
176
177 // Enable onboard SD card on v0.6.0
178 engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
181
182 // Don't enable expansion header SPI by default
184
186 engineConfiguration->firingOrder = FO_1_3_4_2;
187
188 engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; // IM_WASTED_SPARK
190 engineConfiguration->injectionMode = IM_SIMULTANEOUS;//IM_BATCH;// IM_SEQUENTIAL;
191}
static void setupDefaultSensorInputs()
static void setIgnitionPins()
static void setInjectorPins()

Referenced by setup_custom_board_overrides().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setIgnitionPins()

static void setIgnitionPins ( )
static

◆ setInjectorPins()

static void setInjectorPins ( )
static

Definition at line 26 of file board_configuration.cpp.

26 {
27 engineConfiguration->injectionPins[0] = MRE_INJ_1;
28 engineConfiguration->injectionPins[1] = MRE_INJ_2;
29 engineConfiguration->injectionPins[2] = MRE_INJ_3;
30 engineConfiguration->injectionPins[3] = MRE_INJ_4;
31}

◆ setup_custom_board_overrides()

void setup_custom_board_overrides ( )

Definition at line 232 of file board_configuration.cpp.

232 {
235}
std::optional< setup_custom_board_overrides_type > custom_board_ConfigOverrides
std::optional< setup_custom_board_overrides_type > custom_board_DefaultConfiguration
static void microrusefi_boardConfigOverrides()
static void microrusefi_boardDefaultConfiguration()
Board-specific configuration defaults.
Here is the call graph for this function:

◆ setupDefaultSensorInputs()

static void setupDefaultSensorInputs ( )
static

Definition at line 94 of file board_configuration.cpp.

94 {
95 // trigger inputs
96 // tle8888 VR conditioner
99 // Direct hall-only cam input
101
102 // open question if it's great to have TPS in default TPS - the down-side is for
103 // vehicles without TPS or for first start without TPS one would have to turn in off
104 // to avoid cranking corrections based on wrong TPS data
106
108
109 // EFI_ADC_14: "32 - AN volt 6"
110 engineConfiguration->afr.hwChannel = EFI_ADC_14;
111
112 engineConfiguration->clt.adcChannel = MRE_IN_CLT;
113
114 engineConfiguration->iat.adcChannel = MRE_IN_IAT;
115
116#ifndef EFI_BOOTLOADER
117 setCommonNTCSensor(&engineConfiguration->auxTempSensor1, MRE_DEFAULT_AT_PULLUP);
118 setCommonNTCSensor(&engineConfiguration->auxTempSensor2, MRE_DEFAULT_AT_PULLUP);
119#endif // EFI_BOOTLOADER
120}
@ Unassigned
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT]
void setCommonNTCSensor(ThermistorConf *thermistorConf, float pullup)
Here is the call graph for this function:

◆ setupEtb()

static void setupEtb ( )
static

Definition at line 90 of file board_configuration.cpp.

90 {
91 setupTLE9201(/*PWM controlPin*/Gpio::C7, Gpio::A8, Gpio::C8);
92}
void setupTLE9201(Gpio controlPin, Gpio direction, Gpio disable, int dcIndex)
Here is the call graph for this function:

◆ setupTle8888()

static void setupTle8888 ( )
static

Definition at line 73 of file board_configuration.cpp.

Referenced by microrusefi_boardConfigOverrides().

Here is the caller graph for this function:

◆ setupVbatt()

static void setupVbatt ( )
static

Definition at line 54 of file board_configuration.cpp.

54 {
55/*
56 below 0.4
57 // 1k high side/1.5k low side = 1.6667 ratio divider
58 engineConfiguration->analogInputDividerCoefficient = 2.5f / 1.5f;
59*/
60
61 // 6.8k high side/10k low side = 1.68 ratio divider
63
64 // set vbatt_divider 8.23
65 // R139=39k high side/R141=10k low side multiplied by above analogInputDividerCoefficient = 8.232f
67 // PC1, pin #1 input +12 from Main Relay. Main Relay controlled by TLE8888
69
71}

Referenced by microrusefi_boardConfigOverrides(), proteus_boardConfigOverrides(), and s105_boardConfigOverrides().

Here is the caller graph for this function:

Variable Documentation

◆ M111_OUTPUTS

Gpio M111_OUTPUTS[]
static
Initial value:
= {
MRE_INJ_1,
MRE_INJ_2,
MRE_INJ_3,
MRE_INJ_4,
#if HW_MICRO_RUSEFI
MRE_AV9_REUSE,
MRE_LS_1,
MRE_LS_2,
#endif
}

Definition at line 201 of file board_configuration.cpp.

201 {
202MRE_INJ_1, // green
203MRE_INJ_2, // white
204MRE_INJ_3, // blue
205MRE_INJ_4, //
206#if HW_MICRO_RUSEFI
207MRE_AV9_REUSE, // brown boost control
208MRE_LS_1, // VVT
209MRE_LS_2, // SC clutch
210//MRE_GPOUT_3, // SC Bypass
211#endif // HW_MICRO_RUSEFI
212};

Referenced by getBoardMetaOutputs(), and getBoardMetaOutputsCount().

◆ MRE_OUTPUTS

Gpio MRE_OUTPUTS[]
static
Initial value:
= {
MRE_INJ_1,
MRE_INJ_2,
MRE_INJ_3,
MRE_INJ_4,
MRE_LS_1,
}

Definition at line 193 of file board_configuration.cpp.

193 {
194MRE_INJ_1,
195MRE_INJ_2,
196MRE_INJ_3,
197MRE_INJ_4,
198MRE_LS_1,
199};

Referenced by getBoardMetaOutputs(), and getBoardMetaOutputsCount().

Go to the source code of this file.