diff --git a/firmware/hw_layer/drivers/gpio/mc33810.cpp b/firmware/hw_layer/drivers/gpio/mc33810.cpp index 024d713384..9d2bc08f44 100644 --- a/firmware/hw_layer/drivers/gpio/mc33810.cpp +++ b/firmware/hw_layer/drivers/gpio/mc33810.cpp @@ -408,18 +408,14 @@ int Mc33810::chip_init() */ { - uint16_t spark_settings = - //(3 << 9) | /* max dwell is 16 mS */ - //(2 << 9) | /* max dwell is 8 mS */ + uint16_t spark_cmd = // Table 11. Maximum Dwell Timer - // 4: 32ms - // 5,6 and 7 all represent 64ms (engineConfiguration->mc33810maxDwellTimer << 9) | BIT(8) | /* enable max dwell control */ (3 << 2) | /* Open Secondary OSFLT = 100 uS, default */ (1 << 0) | /* End Spark THreshold: VPWR +5.5V, default */ 0; - ret = spi_rw(MC_CMD_SPARK(spark_settings), NULL); + ret = spi_rw(MC_CMD_SPARK(spark_cmd), NULL); if (ret) { efiPrintf(DRIVER_NAME " cmd spark"); goto err_exit; diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 830bfd5c6e..1c9f0aa3a8 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1203,7 +1203,8 @@ int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\ bit can1ListenMode;ListenMode is about acknowledging CAN traffic on the protocol level. Different from canWriteEnabled bit can2ListenMode uint8_t camDecoder2jzPosition - uint8_t mc33810maxDwellTimer + custom mc33810maxDwellTimer_e 1 bits, U08, @OFFSET@, [0:2], "2 mS", "4 mS", "8 mS", "16 mS", "32 mS", "64 mS" + mc33810maxDwellTimer_e mc33810maxDwellTimer; uint16_t autoscale benchTestOnTime;Duration of each test pulse;"ms", 0.01, 0, 0, 500, 2 uint8_t lambdaProtectionRestoreTps;;"%", 1, 0, 0, 100, 0 diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index a2fc098e84..fd830610b9 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -2000,6 +2000,7 @@ menuDialog = main subMenu = sdCard, "SD Card Logger" @@if_ts_show_sd_card subMenu = connection, "Connection" subMenu = tle8888, "TLE8888" + subMenu = mc33810Dialog "MC33810 IGN/INJ driver" subMenu = allPins1, "Full pinout 1/3" @@if_ts_show_full_pinout subMenu = allPins2, "Full pinout 2/3" @@if_ts_show_full_pinout @@ -4611,7 +4612,13 @@ dialog = tcuControls, "Transmission Settings" field = dacOutputPins2, dacOutputPins2 field = "Read RPM matching VSS profile", canInputBCM field = useSpiImu, useSpiImu - field = mc33810maxDwellTimer, mc33810maxDwellTimer + + dialog = mc33810Dialog, "MC33810 IGN/INJ driver" + field = "SPI settings" + field = "mc33810_cs", mc33810_cs1 + field = "mc33810_csPinMode", mc33810_csPinMode + field = "Chip configuration" + field = "Maximum dwell (IGN pins mode only)", mc33810maxDwellTimer dialog = harleyAcr, "Harley Automatic Compression Release" field = "Pin", acrPin