bench test 33810 module #5745

only:f407-discovery
This commit is contained in:
rusefi 2023-11-24 10:30:15 -05:00
parent 84650679d8
commit 318fc8c358
5 changed files with 25 additions and 5 deletions

View File

@ -155,6 +155,7 @@ static const struct mc33810_config mc33810 = {
.spi_config = {
.circular = false,
.end_cb = NULL,
// todo: use engineConfiguration->mc33810_cs
.ssport = GPIOC,
.sspad = 5,
.cr1 =

View File

@ -85,6 +85,11 @@ void setDiscovery33810Test() {
// CS PC5 white
// EN PA6 yellow
engineConfiguration->triggerSimulatorPins[0] = Gpio::Unassigned;
engineConfiguration->triggerSimulatorPins[1] = Gpio::Unassigned;
engineConfiguration->mc33810_cs[0] = Gpio::C5;
engineConfiguration->injectionPins[0] = Gpio::MC33810_0_OUT_0;
engineConfiguration->injectionPins[1] = Gpio::MC33810_0_OUT_1;
engineConfiguration->injectionPins[2] = Gpio::Unassigned;

View File

@ -188,6 +188,10 @@ struct tle8888_config tle8888_cfg = {
};
#endif
#if (BOARD_MC33810_COUNT > 0)
static OutputPin mc33810Cs[C_MC33810_COUNT];
#endif /* (BOARD_MC33810_COUNT > 0) */
#if (BOARD_DRV8860_COUNT > 0)
static OutputPin drv8860Cs;
struct drv8860_config drv8860 = {
@ -322,10 +326,12 @@ void stopSmartCsPins() {
efiSetPadUnused(activeConfiguration.mc33972_cs);
#endif /* BOARD_MC33972_COUNT */
#if (BOARD_DRV8860_COUNT > 0)
efiSetPadUnused(activeConfiguration.drv8860_cs);
#endif /* BOARD_DRV8860_COUNT */
#if (BOARD_MC33810_COUNT > 0)
/* none of official boards has this IC */
for (size_t i = 0;i<C_MC33810_COUNT;i++) {
efiSetPadUnused(engineConfiguration->mc33810_cs[i]);
}
#endif /* (BOARD_MC33810_COUNT > 0) */
#if (BOARD_TLE9104_COUNT > 0)
// No official boards have this IC
@ -357,12 +363,17 @@ void startSmartCsPins() {
drv8860Cs.setValue(true);
#endif /* BOARD_DRV8860_COUNT */
#if (BOARD_MC33810_COUNT > 0)
// todo: no official boards have this IC yet
for (size_t i = 0;i<C_MC33810_COUNT;i++) {
mc33810Cs[i].initPin("mc33810 CS", engineConfiguration->mc33810_cs[i],
engineConfiguration->mc33810_csPinMode);
mc33810Cs[i].setValue(true);
}
#endif /* (BOARD_MC33810_COUNT > 0) */
#if (BOARD_TLE9104_COUNT > 0)
// todo: no official boards have this IC yet
#endif
#if (BOARD_L9779_COUNT > 0)
// todo: use existing l9779_cs and l9779_csPinMode settings
// todo: no official boards have this IC yet
#endif
}

View File

@ -599,7 +599,7 @@ adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position
uint8_t autoscale etbSplit;TPS/PPS error threshold;"%", 0.1, 0, 0, 20, 1
Gpio tle6240_cs;
pin_output_mode_e tle6240_csPinMode;
!unused 1
pin_output_mode_e mc33810_csPinMode;
switch_input_pin_e throttlePedalUpPin;Throttle Pedal not pressed switch - used on some older vehicles like early Mazda Miata
@ -683,7 +683,8 @@ spi_device_e digitalPotentiometerSpiDevice;Digital Potentiometer is used by stoc
uint8_t[FUEL_LEVEL_TABLE_COUNT] fuelLevelValues;;"%", 1, 0, 0, 100, 0
ego_sensor_e afr_type;AFR, WBO, EGO - whatever you like to call it;
! unused 2
#define C_MC33810_COUNT 1
Gpio[C_MC33810_COUNT iterate] mc33810_cs;
float idle_antiwindupFreq;0.1 is a good default value;"x", 1, 0, -1000000, 1000000, 4
brain_input_pin_e[TRIGGER_INPUT_PIN_COUNT iterate] triggerInputPins;

View File

@ -2992,6 +2992,8 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_
field = "trigger stimulator output #1", triggerSimulatorPins1
field = "trigger stimulator output #2", triggerSimulatorPins2
field = "tle6240_cs", tle6240_cs
field = "mc33810_cs", mc33810_cs0
field = "mc33810_csPinMode", mc33810_csPinMode
field = "tle6240 SPI", tle6240spiDevice
dialog = allPins1_2