diff --git a/firmware/config/engines/custom_engine.cpp b/firmware/config/engines/custom_engine.cpp index ed12ade1f8..3d82df208e 100644 --- a/firmware/config/engines/custom_engine.cpp +++ b/firmware/config/engines/custom_engine.cpp @@ -487,6 +487,10 @@ void mreBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) { boardConfiguration->ignitionPins[7] = GPIO_UNASSIGNED; + // fuel pump is useful to test power on/off scenario +// boardConfiguration->fuelPumpPin = TLE8888_PIN_22; + + // LED #1 // GPIOE_7: "34 - GP Out 2" boardConfiguration->injectionPins[1 - 1] = TLE8888_PIN_22;//GPIOE_7; diff --git a/firmware/hw_layer/drivers/gpio/tle8888.c b/firmware/hw_layer/drivers/gpio/tle8888.c index 5bd430361c..27eaac075d 100644 --- a/firmware/hw_layer/drivers/gpio/tle8888.c +++ b/firmware/hw_layer/drivers/gpio/tle8888.c @@ -360,7 +360,11 @@ int tle8888SpiStartupExchange(void * data) { struct tle8888_priv *chip = (struct tle8888_priv *)data; const struct tle8888_config *cfg = chip->cfg; - chThdSleepMilliseconds(3); + /** + * We need around 50ms to get reliable TLE8888 start if MCU is powered externally but +12 goes gown and then goes up + * again + */ + chThdSleepMilliseconds(50); /* Software reset */ // first packet: 0x335=821 > 0xFD=253 uint16_t response = 0;