From 6b19b10783dfd1a7e62d35b44d93d1b9b6e6db13 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 9 May 2020 16:41:24 -0400 Subject: [PATCH 01/39] less important now --- misc/jenkins/compile_other_versions/run.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/jenkins/compile_other_versions/run.bat b/misc/jenkins/compile_other_versions/run.bat index 741d99ed49..e78b601842 100644 --- a/misc/jenkins/compile_other_versions/run.bat +++ b/misc/jenkins/compile_other_versions/run.bat @@ -53,10 +53,10 @@ IF NOT ERRORLEVEL 0 echo ERROR invoking compile_and_upload.bat IF NOT ERRORLEVEL 0 EXIT /B 1 pwd -call misc\jenkins\compile_other_versions\compile_and_upload.bat microrusefi mre-f7-test rusefi_microrusefi.ini %f7_console_setting% -IF NOT ERRORLEVEL 0 echo ERROR invoking compile_and_upload.bat -IF NOT ERRORLEVEL 0 EXIT /B 1 -pwd +rem call misc\jenkins\compile_other_versions\compile_and_upload.bat microrusefi mre-f7-test rusefi_microrusefi.ini %f7_console_setting% +rem IF NOT ERRORLEVEL 0 echo ERROR invoking compile_and_upload.bat +rem IF NOT ERRORLEVEL 0 EXIT /B 1 +rem pwd call misc\jenkins\compile_other_versions\compile_and_upload.bat nucleo_f746 stm32f746_nucleo no %f7_console_setting% IF NOT ERRORLEVEL 0 echo ERROR invoking compile_and_upload.bat From 19a1ad05b1c13a7ff57b7427595fb03527e68001 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 9 May 2020 16:59:54 -0400 Subject: [PATCH 02/39] tle8888 restoration --- firmware/hw_layer/drivers/gpio/tle8888.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/firmware/hw_layer/drivers/gpio/tle8888.c b/firmware/hw_layer/drivers/gpio/tle8888.c index 37b2a11afc..620117c770 100644 --- a/firmware/hw_layer/drivers/gpio/tle8888.c +++ b/firmware/hw_layer/drivers/gpio/tle8888.c @@ -922,8 +922,8 @@ static int tle8888_chip_init(void * data) { } for (int i = 0; i < TLE8888_DIRECT_MISC; i++) { if (cfg->direct_io[i].port) { - ret |= gpio_pin_markUsed(cfg->direct_io[i].port, cfg->direct_io[i].pad, DRIVER_NAME " DIRECT IO"); // TODO: we need this but that's incompatible configuration change +// ret |= gpio_pin_markUsed(cfg->direct_io[i].port, cfg->direct_io[i].pad, DRIVER_NAME " DIRECT IO"); // palSetPadMode(cfg->direct_io[i].port, cfg->direct_io[i].pad, PAL_MODE_OUTPUT_PUSHPULL); // palClearPort(cfg->direct_io[i].port, PAL_PORT_BIT(cfg->direct_io[i].pad)); } @@ -945,9 +945,12 @@ err_gpios: gpio_pin_markUnused(cfg->ign_en.port, cfg->ign_en.pad); if (cfg->reset.port != NULL) gpio_pin_markUnused(cfg->reset.port, cfg->reset.pad); - for (int i = 0; i < TLE8888_DIRECT_MISC; i++) - if (cfg->direct_io[i].port) - gpio_pin_markUnused(cfg->direct_io[i].port, cfg->direct_io[i].pad); + for (int i = 0; i < TLE8888_DIRECT_MISC; i++) { + if (cfg->direct_io[i].port) { +// TODO: we need this but that's incompatible configuration change +// gpio_pin_markUnused(cfg->direct_io[i].port, cfg->direct_io[i].pad); + } + } return ret; } From b469c5a0f79d838678216c86efebdcd9cb0c4074 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 9 May 2020 17:25:06 -0400 Subject: [PATCH 03/39] LED docs --- firmware/integration/rusefi_config.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 60101f88e8..2d1f295a78 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1029,8 +1029,8 @@ int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\ pid_s idleRpmPid;See cltIdleRpmBins float wwaeBeta;+0 = No fuel settling on port walls 1 = All the fuel settling on port walls setting this to 0 disables the wall wetting enrichment. ;"Fraction", 1, 0, 0.0, 1.0, 2 - brain_pin_e communicationLedPin;blue LED on discovery by default - brain_pin_e runningLedPin;green LED on discovery by default + brain_pin_e communicationLedPin;+blue LED on many rusEFI boards.\nBlue Communication LED which is expected to blink at 50% duty cycle during normal board operation.\nIf USB communication cable is connected Blue LED starts to blink faster. + brain_pin_e runningLedPin;+Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running. brain_pin_e binarySerialTxPin;See also EFI_CONSOLE_RX_BRAIN_PIN brain_pin_e binarySerialRxPin; From f9c82b860db6f684e6a601d82845e4211eac2077 Mon Sep 17 00:00:00 2001 From: dron0gus Date: Sun, 10 May 2020 01:22:17 +0300 Subject: [PATCH 04/39] board: subaru-ej20g: remove (#1414) Noone uses this board anymore --- .../boards/subaru-ej20gn/STM32F76xxI.ld | 132 --- firmware/config/boards/subaru-ej20gn/board.c | 221 ----- firmware/config/boards/subaru-ej20gn/board.h | 864 ------------------ firmware/config/boards/subaru-ej20gn/board.mk | 17 - .../subaru-ej20gn/board_configuration.cpp | 248 ----- .../config/boards/subaru-ej20gn/efifeatures.h | 108 --- .../config/boards/subaru-ej20gn/halconf.h | 39 - firmware/config/boards/subaru-ej20gn/make.sh | 11 - .../config/boards/subaru-ej20gn/mcuconf.h | 76 -- .../config/boards/subaru-ej20gn/readme.txt | 7 - 10 files changed, 1723 deletions(-) delete mode 100644 firmware/config/boards/subaru-ej20gn/STM32F76xxI.ld delete mode 100644 firmware/config/boards/subaru-ej20gn/board.c delete mode 100644 firmware/config/boards/subaru-ej20gn/board.h delete mode 100644 firmware/config/boards/subaru-ej20gn/board.mk delete mode 100644 firmware/config/boards/subaru-ej20gn/board_configuration.cpp delete mode 100644 firmware/config/boards/subaru-ej20gn/efifeatures.h delete mode 100644 firmware/config/boards/subaru-ej20gn/halconf.h delete mode 100755 firmware/config/boards/subaru-ej20gn/make.sh delete mode 100644 firmware/config/boards/subaru-ej20gn/mcuconf.h delete mode 100644 firmware/config/boards/subaru-ej20gn/readme.txt diff --git a/firmware/config/boards/subaru-ej20gn/STM32F76xxI.ld b/firmware/config/boards/subaru-ej20gn/STM32F76xxI.ld deleted file mode 100644 index 3dfa0d6909..0000000000 --- a/firmware/config/boards/subaru-ej20gn/STM32F76xxI.ld +++ /dev/null @@ -1,132 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * STM32F76xxI generic setup. - * - * RAM0 - Data, Heap. - * RAM3 - Main Stack, Process Stack, BSS, NOCACHE, ETH. - * - * Notes: - * BSS is placed in DTCM RAM in order to simplify DMA buffers management. - */ -MEMORY -{ - flash0 : org = 0x08000000, len = 2M /* Flash as AXIM (writable) */ - flash1 : org = 0x00200000, len = 2M /* Flash as ITCM */ - flash2 : org = 0x00000000, len = 0 - flash3 : org = 0x00000000, len = 0 - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x20020000, len = 384k /* SRAM1 + SRAM2 */ - ram1 : org = 0x20020000, len = 368k /* SRAM1 */ - ram2 : org = 0x2007C000, len = 16k /* SRAM2 */ - ram3 : org = 0x20000000, len = 128k /* DTCM-RAM */ - ram4 : org = 0x00000000, len = 16k /* ITCM-RAM */ - ram5 : org = 0x40024000, len = 4k /* BCKP SRAM */ - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash0); -REGION_ALIAS("XTORS_FLASH_LMA", flash0); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash0); -REGION_ALIAS("TEXT_FLASH_LMA", flash0); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash0); -REGION_ALIAS("RODATA_FLASH_LMA", flash0); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash0); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -/* Stack rules inclusion.*/ -INCLUDE rules_stacks.ld - -/*===========================================================================*/ -/* Custom sections for STM32F7xx. */ -/*===========================================================================*/ - -/* RAM region to be used for nocache segment.*/ -REGION_ALIAS("NOCACHE_RAM", ram3); - -/* RAM region to be used for eth segment.*/ -REGION_ALIAS("ETH_RAM", ram3); - -SECTIONS -{ - /* Special section for non cache-able areas.*/ - .nocache (NOLOAD) : ALIGN(4) - { - __nocache_base__ = .; - *(.nocache) - *(.nocache.*) - *(.bss.__nocache_*) - . = ALIGN(4); - __nocache_end__ = .; - } > NOCACHE_RAM - - /* Special section for Ethernet DMA non cache-able areas.*/ - .eth (NOLOAD) : ALIGN(4) - { - __eth_base__ = .; - *(.eth) - *(.eth.*) - *(.bss.__eth_*) - . = ALIGN(4); - __eth_end__ = .; - } > ETH_RAM -} - -/* Code rules inclusion.*/ -INCLUDE rules_code.ld - -/* Data rules inclusion.*/ -INCLUDE rules_data.ld diff --git a/firmware/config/boards/subaru-ej20gn/board.c b/firmware/config/boards/subaru-ej20gn/board.c deleted file mode 100644 index 287fb4711b..0000000000 --- a/firmware/config/boards/subaru-ej20gn/board.c +++ /dev/null @@ -1,221 +0,0 @@ -/* - * ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ - -/* - * This file has been automatically generated using ChibiStudio board - * generator plugin. Do not edit manually. - */ - -#include "hal.h" -#include "stm32_gpio.h" -#include "efilib.h" - -/* drivers */ -#include "drivers/gpio/tle6240.h" -#include "drivers/gpio/mc33972.h" - -/*==========================================================================*/ -/* Driver local definitions. */ -/*==========================================================================*/ - -/*==========================================================================*/ -/* Driver exported variables. */ -/*==========================================================================*/ - -/*==========================================================================*/ -/* Driver local variables and types. */ -/*==========================================================================*/ - -/** - * @brief Type of STM32 GPIO port setup. - */ -typedef struct { - uint32_t moder; - uint32_t otyper; - uint32_t ospeedr; - uint32_t pupdr; - uint32_t odr; - uint32_t afrl; - uint32_t afrh; -} gpio_setup_t; - -/** - * @brief Type of STM32 GPIO initialization data. - */ -typedef struct { - gpio_setup_t PAData; - gpio_setup_t PBData; - gpio_setup_t PCData; - gpio_setup_t PDData; - gpio_setup_t PEData; - gpio_setup_t PFData; - gpio_setup_t PGData; - gpio_setup_t PHData; -} gpio_config_t; - -/** - * @brief STM32 GPIO static initialization data. - */ -static const gpio_config_t gpio_default_config = { - {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, - VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, - {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, - VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, - {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, - VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, - {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, - VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, - {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, - VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, - {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, - VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, - {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, - VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, - {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, - VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, -}; - -/*==========================================================================*/ -/* Driver local functions. */ -/*==========================================================================*/ - -static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { - - gpiop->OTYPER = config->otyper; - gpiop->OSPEEDR = config->ospeedr; - gpiop->PUPDR = config->pupdr; - gpiop->ODR = config->odr; - gpiop->AFRL = config->afrl; - gpiop->AFRH = config->afrh; - gpiop->MODER = config->moder; -} - -static void stm32_gpio_init(void) { - - /* Enabling GPIO-related clocks, the mask comes from the - * registry header file.*/ - rccResetAHB1(STM32_GPIO_EN_MASK); - rccEnableAHB1(STM32_GPIO_EN_MASK, true); - - /* Initializing all the defined GPIO ports.*/ - gpio_init(GPIOA, &gpio_default_config.PAData); - gpio_init(GPIOB, &gpio_default_config.PBData); - gpio_init(GPIOC, &gpio_default_config.PCData); - gpio_init(GPIOD, &gpio_default_config.PDData); - gpio_init(GPIOE, &gpio_default_config.PEData); - gpio_init(GPIOF, &gpio_default_config.PFData); - gpio_init(GPIOG, &gpio_default_config.PGData); - gpio_init(GPIOH, &gpio_default_config.PHData); -} - -/*==========================================================================*/ -/* Driver interrupt handlers. */ -/*==========================================================================*/ - -/*==========================================================================*/ -/* Driver exported functions. */ -/*==========================================================================*/ - -/** - * @brief Early initialization code. - * @details GPIO ports and system clocks are initialized before everything - * else. - */ -void __early_init(void) -{ - /* allow debug in all low-power modes */ - DBGMCU->CR |= DBGMCU_CR_DBG_SLEEP | DBGMCU_CR_DBG_STOP | DBGMCU_CR_DBG_STANDBY; - - stm32_gpio_init(); - stm32_clock_init(); -} - -#if HAL_USE_SDC || defined(__DOXYGEN__) -/** - * @brief SDC card detection. - */ -bool sdc_lld_is_card_inserted(SDCDriver *sdcp) -{ - UNUSED(sdcp); - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief SDC card write protection detection. - */ -bool sdc_lld_is_write_protected(SDCDriver *sdcp) -{ - UNUSED(sdcp); - /* TODO: Fill the implementation.*/ - return false; -} -#endif /* HAL_USE_SDC */ - -#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) -/** - * @brief MMC_SPI card detection. - */ -bool mmc_lld_is_card_inserted(MMCDriver *mmcp) -{ - UNUSED(mmcp); - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief MMC_SPI card write protection detection. - */ -bool mmc_lld_is_write_protected(MMCDriver *mmcp) -{ - UNUSED(mmcp); - /* TODO: Fill the implementation.*/ - return false; -} -#endif - -/** - * @brief Board-specific initialization code. - * @todo Add your board-specific code, if any. - */ -void boardInit(void) -{ -} - -/** - * @brief Board-specific ADC channel configuration code overrides. - * @todo Add your board-specific code, if any. - */ -void setAdcChannelOverrides(void) { -} - - -#define STATUS_LED_PIN 8 -#define STATUS_LED_PORT GPIOG - -void BLIIINK(int t) { - int i, j; - palSetPadMode(STATUS_LED_PORT, STATUS_LED_PIN, PAL_MODE_OUTPUT_PUSHPULL); - //while (true) { - for (j = 0; j < 2; j++) { - palClearPad(STATUS_LED_PORT, STATUS_LED_PIN); - for (i = 0; i < 2 * t; i++) { - palTogglePad(STATUS_LED_PORT, STATUS_LED_PIN); - chThdSleepMilliseconds(250); - } - chThdSleepMilliseconds(1000); - } -} diff --git a/firmware/config/boards/subaru-ej20gn/board.h b/firmware/config/boards/subaru-ej20gn/board.h deleted file mode 100644 index 75715169b1..0000000000 --- a/firmware/config/boards/subaru-ej20gn/board.h +++ /dev/null @@ -1,864 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * This file has been automatically generated using ChibiStudio board - * generator plugin. Do not edit manually. - */ - -#ifndef BOARD_H -#define BOARD_H - -/* - * Board identifier. - */ -#define BOARD_NAME "Subaru EJ20G/STM32F765 for RusEFI" - -#undef BOARD_TLE6240_COUNT -#define BOARD_TLE6240_COUNT 1 -#undef BOARD_MC33972_COUNT -#define BOARD_MC33972_COUNT 1 -#undef BOARD_TLE8888_COUNT -#define BOARD_TLE8888_COUNT 0 - -/* - * Board oscillators-related settings. - * NOTE: LSE not fitted. - */ -#if !defined(STM32_LSECLK) -#define STM32_LSECLK 32768U -#endif - -#define STM32_LSEDRV (3U << 3U) - -#if !defined(STM32_HSECLK) -#define STM32_HSECLK 12000000U -#endif - -/* - * Board voltages. - * Required for performance limits calculation. - */ -#define STM32_VDD 330U - -/* - * MCU type as defined in the ST header. - * this declaration for stm32_registry.h - */ -#ifndef STM32F765xx -#define STM32F765xx -#endif - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * Please refer to the STM32 Reference Manual for details. - */ -#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) -#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) -#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) -#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) - -#define PIN_ODR_LOW(n) (0U << (n)) -#define PIN_ODR_HIGH(n) (1U << (n)) - -#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) -#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) - -#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) -#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) -#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) -#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) - -#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) -#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) -#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) - -#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) - -// See https://github.com/rusefi/rusefi/issues/397 -#define DEFAULT_GPIO_SPEED PIN_OSPEED_HIGH - -/* - * GPIOA setup: - * - * PA0 - - * PA1 - - * PA2 - - * PA3 - - * PA4 - - * PA5 - - * PA6 - - * PA7 - - * PA8 - - * PA9 - USART1_TX - boot/console - TTL level on XP4.2 - * PA10 - USART1_RX - boot/console - TTL level on XP4.3 - * PA11 - USB_FS_D- - boot/console/TS - XS3 - * PA12 - USB_FS_D+ - boot/console/TS - XS3 - * PA13 - - * PA14 - - * PA15 - - */ -#define VAL_GPIOA_MODER (/*PIN_MODE_ALTERNATE(0) */ PIN_MODE_OUTPUT(0) | \ - /*PIN_MODE_ALTERNATE(1) */ PIN_MODE_OUTPUT(1) | \ - PIN_MODE_ANALOG(2) | \ - PIN_MODE_ANALOG(3) | \ - PIN_MODE_ANALOG(4) | \ - PIN_MODE_ANALOG(5) | \ - PIN_MODE_ANALOG(6) | \ - PIN_MODE_ANALOG(7) | \ - PIN_MODE_ALTERNATE(8) | \ - PIN_MODE_ALTERNATE(9) | \ - PIN_MODE_ALTERNATE(10) | \ - PIN_MODE_ALTERNATE(11) | \ - PIN_MODE_ALTERNATE(12) | \ - PIN_MODE_ALTERNATE(13) | \ - PIN_MODE_ALTERNATE(14) | \ - PIN_MODE_OUTPUT(15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL( 0) | \ - PIN_OTYPE_PUSHPULL( 1) | \ - PIN_OTYPE_PUSHPULL( 2) | \ - PIN_OTYPE_PUSHPULL( 3) | \ - PIN_OTYPE_PUSHPULL( 4) | \ - PIN_OTYPE_PUSHPULL( 5) | \ - PIN_OTYPE_PUSHPULL( 6) | \ - PIN_OTYPE_PUSHPULL( 7) | \ - PIN_OTYPE_PUSHPULL( 8) | \ - PIN_OTYPE_PUSHPULL( 9) | \ - PIN_OTYPE_PUSHPULL(10) | \ - PIN_OTYPE_PUSHPULL(11) | \ - PIN_OTYPE_PUSHPULL(12) | \ - PIN_OTYPE_PUSHPULL(13) | \ - PIN_OTYPE_PUSHPULL(14) | \ - PIN_OTYPE_PUSHPULL(15)) -#define VAL_GPIOA_OSPEEDR (DEFAULT_GPIO_SPEED( 0) | \ - DEFAULT_GPIO_SPEED( 1) | \ - DEFAULT_GPIO_SPEED( 2) | \ - DEFAULT_GPIO_SPEED( 3) | \ - DEFAULT_GPIO_SPEED( 4) | \ - DEFAULT_GPIO_SPEED( 5) | \ - DEFAULT_GPIO_SPEED( 6) | \ - DEFAULT_GPIO_SPEED( 7) | \ - DEFAULT_GPIO_SPEED( 8) | \ - DEFAULT_GPIO_SPEED( 9) | \ - DEFAULT_GPIO_SPEED(10) | \ - DEFAULT_GPIO_SPEED(11) | \ - DEFAULT_GPIO_SPEED(12) | \ - DEFAULT_GPIO_SPEED(13) | \ - DEFAULT_GPIO_SPEED(14) | \ - DEFAULT_GPIO_SPEED(15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING( 0) | \ - PIN_PUPDR_FLOATING( 1) | \ - PIN_PUPDR_FLOATING( 2) | \ - PIN_PUPDR_FLOATING( 3) | \ - PIN_PUPDR_FLOATING( 4) | \ - PIN_PUPDR_FLOATING( 5) | \ - PIN_PUPDR_FLOATING( 6) | \ - PIN_PUPDR_FLOATING( 7) | \ - PIN_PUPDR_FLOATING( 8) | \ - PIN_PUPDR_PULLUP( 9) | \ - PIN_PUPDR_PULLUP(10) | \ - PIN_PUPDR_FLOATING(11) | \ - PIN_PUPDR_FLOATING(12) | \ - PIN_PUPDR_PULLUP(13) | \ - PIN_PUPDR_PULLDOWN(14) | \ - PIN_PUPDR_PULLUP(15)) -#define VAL_GPIOA_ODR (PIN_ODR_LOW(0) | \ - PIN_ODR_LOW(1) | \ - PIN_ODR_HIGH(15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF( 0, 1U) | \ - PIN_AFIO_AF( 1, 1U) | \ - PIN_AFIO_AF( 2, 0U) | \ - PIN_AFIO_AF( 3, 0U) | \ - PIN_AFIO_AF( 4, 0U) | \ - PIN_AFIO_AF( 5, 0U) | \ - PIN_AFIO_AF( 6, 0U) | \ - PIN_AFIO_AF( 7, 0U)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF( 8, 0U) | \ - PIN_AFIO_AF( 9, 7U) | \ - PIN_AFIO_AF(10, 7U) | \ - PIN_AFIO_AF(11, 10U) | \ - PIN_AFIO_AF(12, 10U) | \ - PIN_AFIO_AF(13, 0U) | \ - PIN_AFIO_AF(14, 0U) | \ - PIN_AFIO_AF(15, 0U)) - -/* - * GPIOB setup: - * - * PB0 - - * PB1 - - * PB2 - boot mode - set JP2 to pull high. - * PB3 - - * PB4 - SPI4_CS3 - MC33792 chip select - * PB5 - - * PB6 - - * PB7 - - * PB8 - - * PB9 - - * PB10 - - * PB11 - - * PB12 - - * PB13 - - * PB14 - - * PB15 - - */ -#define VAL_GPIOB_MODER (PIN_MODE_ANALOG(0) | \ - PIN_MODE_ANALOG(1) | \ - PIN_MODE_INPUT(2) | \ - /*PIN_MODE_ALTERNATE(3)*/ PIN_MODE_OUTPUT(3) | \ - PIN_MODE_OUTPUT(4) | \ - /*PIN_MODE_ALTERNATE(5)*/ PIN_MODE_OUTPUT(5) | \ - PIN_MODE_ALTERNATE(6) | \ - PIN_MODE_OUTPUT(7) | \ - /*PIN_MODE_ALTERNATE(8)*/ PIN_MODE_OUTPUT(8) | \ - /*PIN_MODE_ALTERNATE(9)*/ PIN_MODE_OUTPUT(9) | \ - /*PIN_MODE_ALTERNATE(10)*/ PIN_MODE_OUTPUT(10) | \ - /*PIN_MODE_ALTERNATE(11)*/ PIN_MODE_OUTPUT(11) | \ - PIN_MODE_ALTERNATE(12) | \ - PIN_MODE_INPUT(13) | \ - PIN_MODE_ALTERNATE(14) | \ - PIN_MODE_ALTERNATE(15)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL( 0) | \ - PIN_OTYPE_PUSHPULL( 1) | \ - PIN_OTYPE_PUSHPULL( 2) | \ - PIN_OTYPE_PUSHPULL( 3) | \ - PIN_OTYPE_PUSHPULL( 4) | \ - PIN_OTYPE_PUSHPULL( 5) | \ - PIN_OTYPE_PUSHPULL( 6) | \ - PIN_OTYPE_PUSHPULL( 7) | \ - PIN_OTYPE_PUSHPULL( 8) | \ - PIN_OTYPE_PUSHPULL( 9) | \ - PIN_OTYPE_PUSHPULL(10) | \ - PIN_OTYPE_PUSHPULL(11) | \ - PIN_OTYPE_PUSHPULL(12) | \ - PIN_OTYPE_PUSHPULL(13) | \ - PIN_OTYPE_PUSHPULL(14) | \ - PIN_OTYPE_PUSHPULL(15)) -#define VAL_GPIOB_OSPEEDR (DEFAULT_GPIO_SPEED( 0) | \ - DEFAULT_GPIO_SPEED( 1) | \ - DEFAULT_GPIO_SPEED( 2) | \ - DEFAULT_GPIO_SPEED( 3) | \ - DEFAULT_GPIO_SPEED( 4) | \ - DEFAULT_GPIO_SPEED( 5) | \ - DEFAULT_GPIO_SPEED( 6) | \ - DEFAULT_GPIO_SPEED( 7) | \ - DEFAULT_GPIO_SPEED( 8) | \ - DEFAULT_GPIO_SPEED( 9) | \ - DEFAULT_GPIO_SPEED(10) | \ - DEFAULT_GPIO_SPEED(11) | \ - DEFAULT_GPIO_SPEED(12) | \ - DEFAULT_GPIO_SPEED(13) | \ - DEFAULT_GPIO_SPEED(14) | \ - DEFAULT_GPIO_SPEED(15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_FLOATING( 0) | \ - PIN_PUPDR_FLOATING( 1) | \ - PIN_PUPDR_PULLDOWN( 2) | \ - PIN_PUPDR_FLOATING( 3) | \ - PIN_PUPDR_FLOATING( 4) | \ - PIN_PUPDR_FLOATING( 5) | \ - PIN_PUPDR_FLOATING( 6) | \ - PIN_PUPDR_FLOATING( 7) | \ - PIN_PUPDR_FLOATING( 8) | \ - PIN_PUPDR_FLOATING( 9) | \ - PIN_PUPDR_FLOATING(10) | \ - PIN_PUPDR_FLOATING(11) | \ - PIN_PUPDR_FLOATING(12) | \ - PIN_PUPDR_FLOATING(13) | \ - PIN_PUPDR_PULLDOWN(14) | \ - PIN_PUPDR_FLOATING(15)) -#define VAL_GPIOB_ODR (PIN_ODR_LOW(3) | \ - PIN_ODR_HIGH(4) | \ - PIN_ODR_LOW(5) | \ - PIN_ODR_LOW(8) | \ - PIN_ODR_LOW(9) | \ - PIN_ODR_LOW(10) | \ - PIN_ODR_LOW(11)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF( 0, 0U) | \ - PIN_AFIO_AF( 1, 0U) | \ - PIN_AFIO_AF( 2, 0U) | \ - PIN_AFIO_AF( 3, 1U) | \ - PIN_AFIO_AF( 4, 0U) | \ - PIN_AFIO_AF( 5, 2U) | \ - PIN_AFIO_AF( 6, 10U) | \ - PIN_AFIO_AF( 7, 0U)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF( 8, 2U) | \ - PIN_AFIO_AF( 9, 2U) | \ - PIN_AFIO_AF(10, 1U) | \ - PIN_AFIO_AF(11, 1U) | \ - PIN_AFIO_AF(12, 12U) | \ - PIN_AFIO_AF(13, 0U) | \ - PIN_AFIO_AF(14, 12U) | \ - PIN_AFIO_AF(15, 12U)) - -/* - * GPIOC setup: - * - * PC0 - - * PC1 - - * PC2 - - * PC3 - - * PC4 - - * PC5 - - * PC6 - - * PC7 - - * PC8 - - * PC9 - - * PC10 - - * PC11 - - * PC12 - - * PC13 - - * PC14 - - * PC15 - - */ -#define VAL_GPIOC_MODER (PIN_MODE_ANALOG(0) | \ - PIN_MODE_ANALOG(1) | \ - PIN_MODE_ANALOG(2) | \ - PIN_MODE_ANALOG(3) | \ - PIN_MODE_ANALOG(4) | \ - PIN_MODE_ANALOG(5) | \ - /*PIN_MODE_ALTERNATE(6)*/ PIN_MODE_OUTPUT(6) | \ - /*PIN_MODE_ALTERNATE(7)*/ PIN_MODE_OUTPUT(7) | \ - /*PIN_MODE_ALTERNATE(8)*/ PIN_MODE_INPUT(8) | \ - /*PIN_MODE_ALTERNATE(9)*/ PIN_MODE_INPUT(9) | \ - PIN_MODE_ALTERNATE(10) | \ - PIN_MODE_ALTERNATE(11) | \ - PIN_MODE_ALTERNATE(12) | \ - PIN_MODE_OUTPUT(13) | \ - PIN_MODE_OUTPUT(14) | \ - PIN_MODE_OUTPUT(15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL( 0) | \ - PIN_OTYPE_PUSHPULL( 1) | \ - PIN_OTYPE_PUSHPULL( 2) | \ - PIN_OTYPE_PUSHPULL( 3) | \ - PIN_OTYPE_PUSHPULL( 4) | \ - PIN_OTYPE_PUSHPULL( 5) | \ - PIN_OTYPE_PUSHPULL( 6) | \ - PIN_OTYPE_PUSHPULL( 7) | \ - PIN_OTYPE_PUSHPULL( 8) | \ - PIN_OTYPE_PUSHPULL( 9) | \ - PIN_OTYPE_PUSHPULL(10) | \ - PIN_OTYPE_PUSHPULL(11) | \ - PIN_OTYPE_PUSHPULL(12) | \ - PIN_OTYPE_PUSHPULL(13) | \ - PIN_OTYPE_PUSHPULL(14) | \ - PIN_OTYPE_PUSHPULL(15)) -#define VAL_GPIOC_OSPEEDR (DEFAULT_GPIO_SPEED( 0) | \ - DEFAULT_GPIO_SPEED( 1) | \ - DEFAULT_GPIO_SPEED( 2) | \ - DEFAULT_GPIO_SPEED( 3) | \ - DEFAULT_GPIO_SPEED( 4) | \ - DEFAULT_GPIO_SPEED( 5) | \ - DEFAULT_GPIO_SPEED( 6) | \ - DEFAULT_GPIO_SPEED( 7) | \ - DEFAULT_GPIO_SPEED( 8) | \ - DEFAULT_GPIO_SPEED( 9) | \ - DEFAULT_GPIO_SPEED(10) | \ - DEFAULT_GPIO_SPEED(11) | \ - DEFAULT_GPIO_SPEED(12) | \ - DEFAULT_GPIO_SPEED(13) | \ - DEFAULT_GPIO_SPEED(14) | \ - DEFAULT_GPIO_SPEED(15)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING( 0) | \ - PIN_PUPDR_FLOATING( 1) | \ - PIN_PUPDR_FLOATING( 2) | \ - PIN_PUPDR_FLOATING( 3) | \ - PIN_PUPDR_FLOATING( 4) | \ - PIN_PUPDR_FLOATING( 5) | \ - PIN_PUPDR_FLOATING( 6) | \ - PIN_PUPDR_FLOATING( 7) | \ - PIN_PUPDR_PULLUP( 8) | \ - PIN_PUPDR_PULLUP( 9) | \ - PIN_PUPDR_FLOATING(10) | \ - PIN_PUPDR_PULLUP(11) | \ - PIN_PUPDR_FLOATING(12) | \ - PIN_PUPDR_FLOATING(13) | \ - PIN_PUPDR_FLOATING(14) | \ - PIN_PUPDR_FLOATING(15)) -#define VAL_GPIOC_ODR (PIN_ODR_LOW(6) | \ - PIN_ODR_LOW(7) | \ - PIN_ODR_HIGH(13) | \ - PIN_ODR_HIGH(14) | \ - PIN_ODR_HIGH(15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF( 0, 0U) | \ - PIN_AFIO_AF( 1, 0U) | \ - PIN_AFIO_AF( 2, 0U) | \ - PIN_AFIO_AF( 3, 0U) | \ - PIN_AFIO_AF( 4, 0U) | \ - PIN_AFIO_AF( 5, 0U) | \ - PIN_AFIO_AF( 6, 3U) | \ - PIN_AFIO_AF( 7, 3U)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF( 8, 4U) | \ - PIN_AFIO_AF( 9, 4U) | \ - PIN_AFIO_AF(10, 6U) | \ - PIN_AFIO_AF(11, 6U) | \ - PIN_AFIO_AF(12, 6U) | \ - PIN_AFIO_AF(13, 0U) | \ - PIN_AFIO_AF(14, 0U) | \ - PIN_AFIO_AF(15, 0U)) - -/* - * GPIOD setup: - * - * PD0 - - * PD1 - - * PD2 - USB_HS 5V en out - * PD3 - USB HS 5V Over current input - * PD4 - USB FS 5V Over current input - * PD5 - USB FS 5V en out - * PD6 - - * PD7 - - * PD8 - - * PD9 - - * PD10 - - * PD11 - - * PD12 - - * PD13 - - * PD14 - - * PD15 - - */ -#define VAL_GPIOD_MODER (PIN_MODE_ALTERNATE(0) | \ - PIN_MODE_ALTERNATE(1) | \ - PIN_MODE_OUTPUT(2) | \ - PIN_MODE_INPUT(3) | \ - PIN_MODE_INPUT(4) | \ - PIN_MODE_OUTPUT(5) | \ - PIN_MODE_ALTERNATE(6) | \ - PIN_MODE_ALTERNATE(7) | \ - PIN_MODE_ALTERNATE(8) | \ - PIN_MODE_ALTERNATE(9) | \ - PIN_MODE_OUTPUT(10) | \ - PIN_MODE_ALTERNATE(11) | \ - PIN_MODE_ALTERNATE(12) | \ - PIN_MODE_ALTERNATE(13) | \ - /*PIN_MODE_ALTERNATE(14)*/ PIN_MODE_OUTPUT(14) | \ - /*PIN_MODE_ALTERNATE(15)*/ PIN_MODE_OUTPUT(15)) -#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL( 0) | \ - PIN_OTYPE_PUSHPULL( 1) | \ - PIN_OTYPE_PUSHPULL( 2) | \ - PIN_OTYPE_PUSHPULL( 3) | \ - PIN_OTYPE_PUSHPULL( 4) | \ - PIN_OTYPE_PUSHPULL( 5) | \ - PIN_OTYPE_PUSHPULL( 6) | \ - PIN_OTYPE_PUSHPULL( 7) | \ - PIN_OTYPE_PUSHPULL( 8) | \ - PIN_OTYPE_PUSHPULL( 9) | \ - PIN_OTYPE_PUSHPULL(10) | \ - PIN_OTYPE_PUSHPULL(11) | \ - PIN_OTYPE_PUSHPULL(12) | \ - PIN_OTYPE_PUSHPULL(13) | \ - PIN_OTYPE_PUSHPULL(14) | \ - PIN_OTYPE_PUSHPULL(15)) -#define VAL_GPIOD_OSPEEDR (DEFAULT_GPIO_SPEED( 0) | \ - DEFAULT_GPIO_SPEED( 1) | \ - DEFAULT_GPIO_SPEED( 2) | \ - DEFAULT_GPIO_SPEED( 3) | \ - DEFAULT_GPIO_SPEED( 4) | \ - DEFAULT_GPIO_SPEED( 5) | \ - DEFAULT_GPIO_SPEED( 6) | \ - DEFAULT_GPIO_SPEED( 7) | \ - DEFAULT_GPIO_SPEED( 8) | \ - DEFAULT_GPIO_SPEED( 9) | \ - DEFAULT_GPIO_SPEED(10) | \ - DEFAULT_GPIO_SPEED(11) | \ - DEFAULT_GPIO_SPEED(12) | \ - DEFAULT_GPIO_SPEED(13) | \ - DEFAULT_GPIO_SPEED(14) | \ - DEFAULT_GPIO_SPEED(15)) -#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP( 0) | \ - PIN_PUPDR_FLOATING( 1) | \ - PIN_PUPDR_FLOATING( 2) | \ - PIN_PUPDR_PULLUP( 3) | \ - PIN_PUPDR_PULLUP( 4) | \ - PIN_PUPDR_FLOATING( 5) | \ - PIN_PUPDR_FLOATING( 6) | \ - PIN_PUPDR_FLOATING( 7) | \ - PIN_PUPDR_FLOATING( 8) | \ - PIN_PUPDR_PULLUP( 9) | \ - PIN_PUPDR_FLOATING(10) | \ - PIN_PUPDR_PULLUP(11) | \ - PIN_PUPDR_PULLUP(12) | \ - PIN_PUPDR_PULLUP(13) | \ - PIN_PUPDR_FLOATING(14) | \ - PIN_PUPDR_FLOATING(15)) -#define VAL_GPIOD_ODR (PIN_ODR_LOW(2) | \ - PIN_ODR_LOW(5) | \ - PIN_ODR_HIGH(10) | \ - PIN_ODR_LOW(14) | \ - PIN_ODR_LOW(15)) -#define VAL_GPIOD_AFRL (PIN_AFIO_AF( 0, 9U) | \ - PIN_AFIO_AF( 1, 9U) | \ - PIN_AFIO_AF( 2, 0U) | \ - PIN_AFIO_AF( 3, 0U) | \ - PIN_AFIO_AF( 4, 0U) | \ - PIN_AFIO_AF( 5, 0U) | \ - PIN_AFIO_AF( 6, 11U) | \ - PIN_AFIO_AF( 7, 11U)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF( 8, 7U) | \ - PIN_AFIO_AF( 9, 7U) | \ - PIN_AFIO_AF(10, 0U) | \ - PIN_AFIO_AF(11, 9U) | \ - PIN_AFIO_AF(12, 9U) | \ - PIN_AFIO_AF(13, 9U) | \ - PIN_AFIO_AF(14, 2U) | \ - PIN_AFIO_AF(15, 2U)) - -/* - * GPIOE setup: - * - * PE0 - - * PE1 - - * PE2 - - * PE3 - - * PE4 - - * PE5 - - * PE6 - SPI4_MOSI - * PE7 - - * PE8 - - * PE9 - - * PE10 - - * PE11 - - * PE12 - - * PE13 - - * PE14 - - * PE15 - - */ -#define VAL_GPIOE_MODER (PIN_MODE_ALTERNATE(0) | \ - PIN_MODE_ALTERNATE(1) | \ - PIN_MODE_ALTERNATE(2) | \ - PIN_MODE_OUTPUT(3) | \ - PIN_MODE_OUTPUT(4) | \ - PIN_MODE_ALTERNATE(5) | \ - PIN_MODE_ALTERNATE(6) | \ - PIN_MODE_ALTERNATE(7) | \ - PIN_MODE_ALTERNATE(8) | \ - PIN_MODE_OUTPUT(9) | \ - /*PIN_MODE_ALTERNATE(10)*/ PIN_MODE_OUTPUT(10) | \ - /*PIN_MODE_ALTERNATE(11)*/ PIN_MODE_OUTPUT(11) | \ - PIN_MODE_ALTERNATE(12) | \ - /*PIN_MODE_ALTERNATE(13)*/ PIN_MODE_OUTPUT(13) | \ - /*PIN_MODE_ALTERNATE(14)*/ PIN_MODE_OUTPUT(14) | \ - PIN_MODE_INPUT(15)) -#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL( 0) | \ - PIN_OTYPE_PUSHPULL( 1) | \ - PIN_OTYPE_PUSHPULL( 2) | \ - PIN_OTYPE_PUSHPULL( 3) | \ - PIN_OTYPE_PUSHPULL( 4) | \ - PIN_OTYPE_PUSHPULL( 5) | \ - PIN_OTYPE_PUSHPULL( 6) | \ - PIN_OTYPE_PUSHPULL( 7) | \ - PIN_OTYPE_PUSHPULL( 8) | \ - PIN_OTYPE_PUSHPULL( 9) | \ - PIN_OTYPE_PUSHPULL(10) | \ - PIN_OTYPE_PUSHPULL(11) | \ - PIN_OTYPE_PUSHPULL(12) | \ - PIN_OTYPE_PUSHPULL(13) | \ - PIN_OTYPE_PUSHPULL(14) | \ - PIN_OTYPE_PUSHPULL(15)) -#define VAL_GPIOE_OSPEEDR (DEFAULT_GPIO_SPEED( 0) | \ - DEFAULT_GPIO_SPEED( 1) | \ - DEFAULT_GPIO_SPEED( 2) | \ - DEFAULT_GPIO_SPEED( 3) | \ - DEFAULT_GPIO_SPEED( 4) | \ - DEFAULT_GPIO_SPEED( 5) | \ - DEFAULT_GPIO_SPEED( 6) | \ - DEFAULT_GPIO_SPEED( 7) | \ - DEFAULT_GPIO_SPEED( 8) | \ - DEFAULT_GPIO_SPEED( 9) | \ - DEFAULT_GPIO_SPEED(10) | \ - DEFAULT_GPIO_SPEED(11) | \ - DEFAULT_GPIO_SPEED(12) | \ - DEFAULT_GPIO_SPEED(13) | \ - DEFAULT_GPIO_SPEED(14) | \ - DEFAULT_GPIO_SPEED(15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP( 0) | \ - PIN_PUPDR_FLOATING( 1) | \ - PIN_PUPDR_PULLUP( 2) | \ - PIN_PUPDR_FLOATING( 3) | \ - PIN_PUPDR_FLOATING( 4) | \ - PIN_PUPDR_PULLUP( 5) | \ - PIN_PUPDR_FLOATING( 6) | \ - PIN_PUPDR_PULLUP( 7) | \ - PIN_PUPDR_FLOATING( 8) | \ - PIN_PUPDR_FLOATING( 9) | \ - PIN_PUPDR_FLOATING(10) | \ - PIN_PUPDR_FLOATING(11) | \ - PIN_PUPDR_FLOATING(12) | \ - PIN_PUPDR_FLOATING(13) | \ - PIN_PUPDR_FLOATING(14) | \ - PIN_PUPDR_PULLUP(15)) -#define VAL_GPIOE_ODR (PIN_ODR_LOW(3) | \ - PIN_ODR_HIGH(4) | \ - PIN_ODR_LOW(9)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF( 0, 8U) | \ - PIN_AFIO_AF( 1, 8U) | \ - PIN_AFIO_AF( 2, 9U) | \ - PIN_AFIO_AF( 3, 0U) | \ - PIN_AFIO_AF( 4, 5U) | \ - PIN_AFIO_AF( 5, 5U) | \ - PIN_AFIO_AF( 6, 5U) | \ - PIN_AFIO_AF( 7, 8U)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF( 8, 8U) | \ - PIN_AFIO_AF( 9, 0U) | \ - PIN_AFIO_AF(10, 1U) | \ - PIN_AFIO_AF(11, 1U) | \ - PIN_AFIO_AF(12, 5U) | \ - PIN_AFIO_AF(13, 1U) | \ - PIN_AFIO_AF(14, 1U) | \ - PIN_AFIO_AF(15, 0U)) - -/* - * GPIOF setup: - * - * PF0 - - * PF1 - - * PF2 - - * PF3 - - * PF4 - - * PF5 - - * PF6 - - * PF7 - - * PF8 - - * PF9 - - * PF10 - - * PF11 - - * PF12 - - * PF13 - - * PF14 - self simulation pin 0 (actually i2c) - * PF15 - self simulation pin 1 (actually i2c) - */ -#define VAL_GPIOF_MODER (PIN_MODE_OUTPUT(0) | \ - PIN_MODE_OUTPUT(1) | \ - PIN_MODE_OUTPUT(2) | \ - PIN_MODE_ANALOG(3) | \ - PIN_MODE_ANALOG(4) | \ - PIN_MODE_ANALOG(5) | \ - PIN_MODE_ANALOG(6) | \ - PIN_MODE_ANALOG(7) | \ - /*PIN_MODE_ALTERNATE(8)*/ PIN_MODE_OUTPUT(8) | \ - /*PIN_MODE_ALTERNATE(9)*/ PIN_MODE_OUTPUT(9) | \ - PIN_MODE_ALTERNATE(10) | \ - PIN_MODE_OUTPUT(11) | \ - PIN_MODE_OUTPUT(12) | \ - PIN_MODE_INPUT(13) | \ - /* PIN_MODE_ALTERNATE(14) | \ */ PIN_MODE_OUTPUT(14) | \ - /* PIN_MODE_ALTERNATE(15)) */ PIN_MODE_OUTPUT(15)) -#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL( 0) | \ - PIN_OTYPE_PUSHPULL( 1) | \ - PIN_OTYPE_PUSHPULL( 2) | \ - PIN_OTYPE_PUSHPULL( 3) | \ - PIN_OTYPE_PUSHPULL( 4) | \ - PIN_OTYPE_PUSHPULL( 5) | \ - PIN_OTYPE_PUSHPULL( 6) | \ - PIN_OTYPE_PUSHPULL( 7) | \ - PIN_OTYPE_PUSHPULL( 8) | \ - PIN_OTYPE_PUSHPULL( 9) | \ - PIN_OTYPE_PUSHPULL(10) | \ - PIN_OTYPE_PUSHPULL(11) | \ - PIN_OTYPE_PUSHPULL(12) | \ - PIN_OTYPE_PUSHPULL(13) | \ - /* PIN_OTYPE_OPENDRAIN(14)| \ */ PIN_OTYPE_PUSHPULL(14) | \ - /* PIN_OTYPE_OPENDRAIN(15)) */ PIN_OTYPE_PUSHPULL(15)) -#define VAL_GPIOF_OSPEEDR (DEFAULT_GPIO_SPEED( 0) | \ - DEFAULT_GPIO_SPEED( 1) | \ - DEFAULT_GPIO_SPEED( 2) | \ - DEFAULT_GPIO_SPEED( 3) | \ - DEFAULT_GPIO_SPEED( 4) | \ - DEFAULT_GPIO_SPEED( 5) | \ - DEFAULT_GPIO_SPEED( 6) | \ - DEFAULT_GPIO_SPEED( 7) | \ - DEFAULT_GPIO_SPEED( 8) | \ - DEFAULT_GPIO_SPEED( 9) | \ - DEFAULT_GPIO_SPEED(10) | \ - DEFAULT_GPIO_SPEED(11) | \ - DEFAULT_GPIO_SPEED(12) | \ - DEFAULT_GPIO_SPEED(13) | \ - DEFAULT_GPIO_SPEED(14) | \ - DEFAULT_GPIO_SPEED(15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING( 0) | \ - PIN_PUPDR_FLOATING( 1) | \ - PIN_PUPDR_FLOATING( 2) | \ - PIN_PUPDR_FLOATING( 3) | \ - PIN_PUPDR_FLOATING( 4) | \ - PIN_PUPDR_FLOATING( 5) | \ - PIN_PUPDR_FLOATING( 6) | \ - PIN_PUPDR_FLOATING( 7) | \ - PIN_PUPDR_FLOATING( 8) | \ - PIN_PUPDR_FLOATING( 9) | \ - PIN_PUPDR_FLOATING(10) | \ - PIN_PUPDR_FLOATING(11) | \ - PIN_PUPDR_FLOATING(12) | \ - PIN_PUPDR_PULLUP(13) | \ - PIN_PUPDR_PULLUP(14) | \ - PIN_PUPDR_PULLUP(15)) -#define VAL_GPIOF_ODR (PIN_ODR_HIGH(0) | \ - PIN_ODR_HIGH(1) | \ - PIN_ODR_HIGH(2) | \ - PIN_ODR_LOW(8) | \ - PIN_ODR_LOW(9) | \ - PIN_ODR_HIGH(11) | \ - PIN_ODR_HIGH(12) | \ - PIN_ODR_HIGH(14) | \ - PIN_ODR_HIGH(15)) -#define VAL_GPIOF_AFRL (PIN_AFIO_AF( 0, 0U) | \ - PIN_AFIO_AF( 1, 0U) | \ - PIN_AFIO_AF( 2, 0U) | \ - PIN_AFIO_AF( 3, 0U) | \ - PIN_AFIO_AF( 4, 0U) | \ - PIN_AFIO_AF( 5, 0U) | \ - PIN_AFIO_AF( 6, 0U) | \ - PIN_AFIO_AF( 7, 0U)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF( 8, 9U) | \ - PIN_AFIO_AF( 9, 9U) | \ - PIN_AFIO_AF(10, 9U) | \ - PIN_AFIO_AF(11, 0U) | \ - PIN_AFIO_AF(12, 0U) | \ - PIN_AFIO_AF(13, 0U) | \ - /*PIN_AFIO_AF(14, 4U) | \ */ PIN_AFIO_AF(14, 0U) | \ - /*PIN_AFIO_AF(15, 4U)) */ PIN_AFIO_AF(15, 0U)) - -/* - * GPIOG setup: - * - * PG0 - - * PG1 - - * PG2 - - * PG3 - - * PG4 - - * PG5 - - * PG6 - LD1 - active low - * PG7 - LD3 - active low - * PG8 - LD2 - active PIN_ODR_LOW - * PG9 - - * PG10 - - * PG11 - - * PG12 - - * PG13 - - * PG14 - - * PG15 - - */ -#define VAL_GPIOG_MODER (PIN_MODE_OUTPUT(0) | \ - PIN_MODE_INPUT(1) | \ - PIN_MODE_OUTPUT(2) | \ - PIN_MODE_OUTPUT(3) | \ - PIN_MODE_OUTPUT(4) | \ - PIN_MODE_OUTPUT(5) | \ - PIN_MODE_OUTPUT(6) | \ - PIN_MODE_OUTPUT(7) | \ - PIN_MODE_OUTPUT(8) | \ - PIN_MODE_ALTERNATE(9) | \ - PIN_MODE_ALTERNATE(10) | \ - PIN_MODE_ALTERNATE(11) | \ - PIN_MODE_ALTERNATE(12) | \ - PIN_MODE_OUTPUT(13) | \ - PIN_MODE_ALTERNATE(14) | \ - PIN_MODE_OUTPUT(15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL( 0) | \ - PIN_OTYPE_PUSHPULL( 1) | \ - PIN_OTYPE_PUSHPULL( 2) | \ - PIN_OTYPE_PUSHPULL( 3) | \ - PIN_OTYPE_PUSHPULL( 4) | \ - PIN_OTYPE_PUSHPULL( 5) | \ - PIN_OTYPE_OPENDRAIN( 6)| \ - PIN_OTYPE_OPENDRAIN( 7)| \ - PIN_OTYPE_OPENDRAIN( 8)| \ - PIN_OTYPE_PUSHPULL( 9) | \ - PIN_OTYPE_PUSHPULL(10) | \ - PIN_OTYPE_PUSHPULL(11) | \ - PIN_OTYPE_PUSHPULL(12) | \ - PIN_OTYPE_PUSHPULL(13) | \ - PIN_OTYPE_OPENDRAIN(14)| \ - PIN_OTYPE_PUSHPULL(15)) -#define VAL_GPIOG_OSPEEDR (DEFAULT_GPIO_SPEED( 0) | \ - DEFAULT_GPIO_SPEED( 1) | \ - DEFAULT_GPIO_SPEED( 2) | \ - DEFAULT_GPIO_SPEED( 3) | \ - DEFAULT_GPIO_SPEED( 4) | \ - DEFAULT_GPIO_SPEED( 5) | \ - DEFAULT_GPIO_SPEED( 6) | \ - DEFAULT_GPIO_SPEED( 7) | \ - DEFAULT_GPIO_SPEED( 8) | \ - DEFAULT_GPIO_SPEED( 9) | \ - DEFAULT_GPIO_SPEED(10) | \ - DEFAULT_GPIO_SPEED(11) | \ - DEFAULT_GPIO_SPEED(12) | \ - DEFAULT_GPIO_SPEED(13) | \ - DEFAULT_GPIO_SPEED(14) | \ - DEFAULT_GPIO_SPEED(15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_FLOATING( 0) | \ - PIN_PUPDR_PULLUP( 1) | \ - PIN_PUPDR_FLOATING( 2) | \ - PIN_PUPDR_FLOATING( 3) | \ - PIN_PUPDR_FLOATING( 4) | \ - PIN_PUPDR_FLOATING( 5) | \ - PIN_PUPDR_FLOATING( 6) | \ - PIN_PUPDR_FLOATING( 7) | \ - PIN_PUPDR_FLOATING( 8) | \ - PIN_PUPDR_PULLUP( 9) | \ - PIN_PUPDR_PULLUP(10) | \ - PIN_PUPDR_PULLUP(11) | \ - PIN_PUPDR_PULLUP(12) | \ - PIN_PUPDR_FLOATING(13) | \ - PIN_PUPDR_PULLUP(14) | \ - PIN_PUPDR_FLOATING(15)) -#define VAL_GPIOG_ODR (PIN_ODR_LOW(0) | \ - PIN_ODR_LOW(2) | \ - PIN_ODR_LOW(3) | \ - PIN_ODR_LOW(4) | \ - PIN_ODR_LOW(5) | \ - PIN_ODR_HIGH(6) | \ - PIN_ODR_HIGH(7) | \ - PIN_ODR_HIGH(8) | \ - PIN_ODR_HIGH(13) | \ - PIN_ODR_LOW(15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF( 0, 0U) | \ - PIN_AFIO_AF( 1, 0U) | \ - PIN_AFIO_AF( 2, 0U) | \ - PIN_AFIO_AF( 3, 0U) | \ - PIN_AFIO_AF( 4, 0U) | \ - PIN_AFIO_AF( 5, 0U) | \ - PIN_AFIO_AF( 6, 0U) | \ - PIN_AFIO_AF( 7, 0U)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF( 8, 0U) | \ - PIN_AFIO_AF( 9, 11U) | \ - PIN_AFIO_AF(10, 11U) | \ - PIN_AFIO_AF(11, 10U) | \ - PIN_AFIO_AF(12, 11U) | \ - PIN_AFIO_AF(13, 0U) | \ - PIN_AFIO_AF(14, 8U) | \ - PIN_AFIO_AF(15, 0U)) - -/* - * GPIOH setup: - * - * PH0 - OSC_IN (input floating). - * PH1 - OSC_OUT (input floating). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(0) | \ - PIN_MODE_INPUT(1)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL( 0) | \ - PIN_OTYPE_PUSHPULL( 1)) -#define VAL_GPIOH_OSPEEDR (DEFAULT_GPIO_SPEED( 0) | \ - DEFAULT_GPIO_SPEED( 1)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING( 0) | \ - PIN_PUPDR_FLOATING( 1)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH( 0) | \ - PIN_ODR_HIGH( 1)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF( 0, 0U) | \ - PIN_AFIO_AF( 1, 0U)) -#define VAL_GPIOH_AFRH (0) - -#endif /* BOARD_H */ diff --git a/firmware/config/boards/subaru-ej20gn/board.mk b/firmware/config/boards/subaru-ej20gn/board.mk deleted file mode 100644 index 3d009ed59e..0000000000 --- a/firmware/config/boards/subaru-ej20gn/board.mk +++ /dev/null @@ -1,17 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(PROJECT_DIR)/config/boards/subaru-ej20gn/board.c -BOARDSRC_CPP = $(PROJECT_DIR)/config/boards/subaru-ej20gn/board_configuration.cpp - -# Required include directories -BOARDINC = $(PROJECT_DIR)/config/boards/subaru-ej20gn - -# Override LD script -ifeq ($(USE_BOOTLOADER),yes) - # include Prometheus bootloader code - BOOTLOADERINC= $(PROJECT_DIR)/bootloader/subaru-ej20gn -endif - -LDSCRIPT= $(PROJECT_DIR)/config/boards/subaru-ej20gn/STM32F76xxI.ld - -# Override DEFAULT_ENGINE_TYPE -DDEFS += -DDEFAULT_ENGINE_TYPE=SUBARUEJ20G_DEFAULTS -DSTM32F765xx diff --git a/firmware/config/boards/subaru-ej20gn/board_configuration.cpp b/firmware/config/boards/subaru-ej20gn/board_configuration.cpp deleted file mode 100644 index 9e052d08d9..0000000000 --- a/firmware/config/boards/subaru-ej20gn/board_configuration.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/** - * @file boards/subaru-ej20g/board_configuration.h - * - * @brief In this file we can override engine_configuration.cpp. - * - * @date Feb 19, 2019 - * @author Andrey Gusakov, 2019 - */ - -#include "global.h" -#include "engine.h" -#include "engine_math.h" -#include "allsensors.h" -#include "fsio_impl.h" -#include "engine_configuration.h" -#include "smart_gpio.h" - -EXTERN_ENGINE; - -static void setSubaruEJ20GDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR); - engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2; - //engineConfiguration->useOnlyRisingEdgeForTrigger = true; - setAlgorithm(LM_SPEED_DENSITY PASS_CONFIG_PARAMETER_SUFFIX); - - engineConfiguration->specs.cylindersCount = 4; - engineConfiguration->specs.firingOrder = FO_1_3_4_2; - - engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; // IM_WASTED_SPARK - engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS; - engineConfiguration->injectionMode = IM_SIMULTANEOUS;//IM_BATCH;// IM_SEQUENTIAL; - - engineConfiguration->globalTriggerAngleOffset = 114; // the end of 19th tooth? - - engineConfiguration->specs.displacement = 1.645; - engineConfiguration->injector.flow = 200; - - engineConfiguration->cranking.baseFuel = 5; // ??? - engineConfiguration->crankingChargeAngle = 70; - engineConfiguration->cranking.rpm = 600; - - engineConfiguration->rpmHardLimit = 8500; - - engineConfiguration->map.sensor.type = MT_MPX4250; - - engineConfiguration->idleStepperReactionTime = 10; - engineConfiguration->stepperDirectionPinMode = OM_INVERTED; - engineConfiguration->useLinearCltSensor = true; - - //engineConfiguration->canNbcType = CAN_BUS_NBC_BMW; - engineConfiguration->canNbcType = CAN_BUS_MAZDA_RX8; - engineConfiguration->canReadEnabled = true; - engineConfiguration->canWriteEnabled = false; - - engineConfiguration->tpsMin = convertVoltageTo10bitADC(0.250); - engineConfiguration->tpsMax = convertVoltageTo10bitADC(4.538); - engineConfiguration->tpsErrorDetectionTooLow = -10; // -10% open - engineConfiguration->tpsErrorDetectionTooHigh = 110; // 110% open - - engineConfiguration->mapMinBufferLength = 4; -} - -void setPinConfigurationOverrides(void) { - -} - -void setSerialConfigurationOverrides(void) { - engineConfiguration->useSerialPort = false; - engineConfiguration->binarySerialTxPin = GPIOE_1; - engineConfiguration->binarySerialRxPin = GPIOE_0; -// engineConfiguration->consoleSerialTxPin = GPIOA_9; -// engineConfiguration->consoleSerialRxPin = GPIOA_10; - engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED; - engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED; -} - -void setSdCardConfigurationOverrides(void) { - engineConfiguration->is_enabled_spi_1 = false; - engineConfiguration->sdCardSpiDevice = SPI_DEVICE_1; - engineConfiguration->sdCardCsPin = GPIOA_2; - CONFIG(isSdCardEnabled) = false; -} - -/** - * @brief Board-specific configuration code overrides. - * @todo Add your board-specific code, if any. - */ -void setBoardConfigurationOverrides(void) { - setSerialConfigurationOverrides(); - - engineConfiguration->vbattAdcChannel = EFI_ADC_6; - engineConfiguration->tps1_1AdcChannel = EFI_ADC_13; - engineConfiguration->map.sensor.hwChannel = EFI_ADC_14; - engineConfiguration->clt.adcChannel = EFI_ADC_8; - /* not yet */ - engineConfiguration->iat.adcChannel = EFI_ADC_NONE; - /* narrow */ - engineConfiguration->afr.hwChannel = EFI_ADC_9; - - engineConfiguration->adcVcc = ADC_VCC; - - engineConfiguration->baroSensor.hwChannel = EFI_ADC_NONE; - engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_NONE; - - /* Injectors */ - engineConfiguration->injectionPins[0] = GPIOB_11; - engineConfiguration->injectionPins[1] = GPIOA_0; - engineConfiguration->injectionPins[2] = GPIOA_1; - engineConfiguration->injectionPins[3] = GPIOB_10; - /* 5th injector */ - //engineConfiguration->injectionPins[4] = GPIOD_15; - - /* Ignition */ - engineConfiguration->ignitionPins[0] = GPIOB_8; - engineConfiguration->ignitionPins[1] = GPIOB_9; - engineConfiguration->ignitionPins[2] = GPIOF_8; - engineConfiguration->ignitionPins[3] = GPIOF_9; - //engineConfiguration->ignitionPinMode = OM_INVERTED; - - //? - //engineConfiguration->vbattDividerCoeff = ((float) (2 + 10)) / 2; - //engineConfiguration->clt.config.bias_resistor = 2700; - //sengineConfiguration->iat.config.bias_resistor = 2700; - - //? - //engineConfiguration->useStepperIdle = true; - //engineConfiguration->idle.stepperDirectionPin = GPIOB_12; - //engineConfiguration->idle.stepperStepPin = GPIOB_13; - //engineConfiguration->stepperEnablePin = GPIO_UNASSIGNED; - //engineConfiguration->stepperEnablePinMode = OM_DEFAULT; - - engineConfiguration->communicationLedPin = GPIOG_6; /* LD2 - green */ - engineConfiguration->runningLedPin = GPIO_UNASSIGNED; - engineConfiguration->warninigLedPin = GPIOG_8; /* LD3 - yellow*/ - //engineConfiguration->fatalErrorPin = LED_ERROR_BRAIN_PIN; /* LD1 - red */ - - /* IF you have BOTH camshaft position sensor and crankshaft position sensor - * camshaft is always trigger#1 input and then crankshaft is trigger#2. */ - engineConfiguration->triggerInputPins[0] = GPIOC_8; - engineConfiguration->triggerInputPins[1] = GPIOC_9; - engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; - engineConfiguration->camInputs[0] = GPIO_UNASSIGNED; - - /* spi driven - TLE6240 - OUT8, also direct driven by GPIOG_2 */ - engineConfiguration->tachOutputPin = TLE6240_PIN(0); - engineConfiguration->tachOutputPinMode = OM_DEFAULT; - /* spi driven - TLE6240 - OUT5 */ - engineConfiguration->fuelPumpPin = TLE6240_PIN(5); - engineConfiguration->fuelPumpPinMode = OM_DEFAULT; - /* self shutdownd? */ - engineConfiguration->mainRelayPin = GPIOG_4; - engineConfiguration->mainRelayPinMode = OM_DEFAULT; - /* spi driven - TLE6240 - OUT3, OUT4 - * TODO: second fan */ - engineConfiguration->fanPin = TLE6240_PIN(2); - engineConfiguration->fanPinMode = OM_DEFAULT; - /* spi driven - TLE6240 - OUT8 */ - engineConfiguration->malfunctionIndicatorPin = TLE6240_PIN(7); - engineConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT; - - // starter block - /* Starter signal connected through MC33972 - SG11 */ - //setFsio(0, (GPIOB_1), STARTER_RELAY_LOGIC PASS_CONFIG_PARAMETER_SUFFIX); - - - // not used - engineConfiguration->dizzySparkOutputPin = GPIO_UNASSIGNED; - engineConfiguration->externalKnockSenseAdc = EFI_ADC_NONE; - engineConfiguration->displayMode = DM_NONE; - engineConfiguration->HD44780_rs = GPIO_UNASSIGNED; - engineConfiguration->HD44780_e = GPIO_UNASSIGNED; - engineConfiguration->HD44780_db4 = GPIO_UNASSIGNED; - engineConfiguration->HD44780_db5 = GPIO_UNASSIGNED; - engineConfiguration->HD44780_db6 = GPIO_UNASSIGNED; - engineConfiguration->HD44780_db7 = GPIO_UNASSIGNED; - engineConfiguration->digitalPotentiometerChipSelect[0] = GPIO_UNASSIGNED; - engineConfiguration->digitalPotentiometerChipSelect[1] = GPIO_UNASSIGNED; - engineConfiguration->digitalPotentiometerChipSelect[2] = GPIO_UNASSIGNED; - engineConfiguration->digitalPotentiometerChipSelect[3] = GPIO_UNASSIGNED; - engineConfiguration->vehicleSpeedSensorInputPin = GPIO_UNASSIGNED; - - engineConfiguration->digitalPotentiometerSpiDevice = SPI_NONE; - engineConfiguration->max31855spiDevice = SPI_NONE; - - ///////////////////////////////////////////////////////// - - engineConfiguration->is_enabled_spi_1 = true; - engineConfiguration->is_enabled_spi_2 = false; - engineConfiguration->is_enabled_spi_3 = true; - - engineConfiguration->spi1mosiPin = GPIO_UNASSIGNED; - engineConfiguration->spi1MosiMode = PO_DEFAULT; - engineConfiguration->spi1misoPin = GPIO_UNASSIGNED; - engineConfiguration->spi1MisoMode = PO_DEFAULT; - engineConfiguration->spi1sckPin = GPIO_UNASSIGNED; - engineConfiguration->spi1SckMode = PO_DEFAULT; - - engineConfiguration->spi3mosiPin = GPIOC_12; - engineConfiguration->spi3MosiMode = PO_DEFAULT; - engineConfiguration->spi3misoPin = GPIOC_11; - engineConfiguration->spi3MisoMode = PO_DEFAULT; - engineConfiguration->spi3sckPin = GPIOC_10; - engineConfiguration->spi3SckMode = PO_DEFAULT; - - engineConfiguration->hip9011SpiDevice = SPI_DEVICE_4; - engineConfiguration->hip9011CsPin = GPIOF_1; - engineConfiguration->hip9011CsPinMode = OM_OPENDRAIN; - engineConfiguration->hip9011IntHoldPin = GPIOC_15; - engineConfiguration->hip9011IntHoldPinMode = OM_OPENDRAIN; - engineConfiguration->hipOutputChannel = EFI_ADC_7; // PA7 - engineConfiguration->isHip9011Enabled = true; - -#if 0 - engineConfiguration->cj125SpiDevice = SPI_DEVICE_3; - engineConfiguration->cj125ua = EFI_ADC_9; - engineConfiguration->cj125ur = EFI_ADC_12; - engineConfiguration->cj125CsPin = GPIOA_15; - engineConfiguration->cj125CsPinMode = OM_OPENDRAIN; - engineConfiguration->wboHeaterPin = GPIOC_13; - engineConfiguration->o2heaterPin = GPIOC_13; -#endif - engineConfiguration->isCJ125Enabled = false; - - engineConfiguration->canTxPin = GPIOD_0; - engineConfiguration->canRxPin = GPIOD_1; - - //!!!!!!!!!!!!!!! -#if 1 - setSubaruEJ20GDefaults(PASS_ENGINE_PARAMETER_SIGNATURE); -#endif - /* actually i2c extension connector */ - engineConfiguration->triggerSimulatorPins[0] = GPIOF_14; - engineConfiguration->triggerSimulatorPins[1] = GPIOF_15; - engineConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED; - engineConfiguration->triggerSimulatorPinModes[0] = OM_DEFAULT; - engineConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT; - engineConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT; - - engineConfiguration->logicAnalyzerPins[0] = GPIO_UNASSIGNED; - engineConfiguration->logicAnalyzerPins[1] = GPIO_UNASSIGNED; - engineConfiguration->logicAnalyzerPins[2] = GPIO_UNASSIGNED; - engineConfiguration->logicAnalyzerPins[3] = GPIO_UNASSIGNED; - //!!!!!!!!!!!!!!!!!!! - //engineConfiguration->silentTriggerError = true; - - //!!!!!!!!!!!!! - //engineConfiguration->isEngineChartEnabled = false; -} diff --git a/firmware/config/boards/subaru-ej20gn/efifeatures.h b/firmware/config/boards/subaru-ej20gn/efifeatures.h deleted file mode 100644 index cf86f9b2f5..0000000000 --- a/firmware/config/boards/subaru-ej20gn/efifeatures.h +++ /dev/null @@ -1,108 +0,0 @@ -/** - * @file boards/subaruej20g/efifeatures.h - * - * @brief In this header we can override efifeatures.h. - * - * @date Feb 19, 2019 - * @author Andrey Gusakov, 2019 - */ - -#include "../../stm32f7ems/efifeatures.h" - -#pragma once - -/* debug console */ -#undef EFI_USE_UART_FOR_CONSOLE -#define EFI_USE_UART_FOR_CONSOLE TRUE -#undef EFI_CONSOLE_SERIAL_DEVICE -#define EFI_CONSOLE_SERIAL_DEVICE (&SD1) - -/* TunerStudio binary protocol */ -/* do not use UART device for console */ -#undef TS_UART_DEVICE - -/* do not use serial device for console */ -#undef TS_SERIAL_DEVICE - -#undef EFI_RTC -#define EFI_RTC FALSE - -#undef EFI_POTENTIOMETER -#define EFI_POTENTIOMETER FALSE - -#undef EFI_MAX_31855 -#define EFI_MAX_31855 FALSE - -#undef EFI_HD44780_LCD -#define EFI_HD44780_LCD FALSE - -#undef EFI_USB_SERIAL -#define EFI_USB_SERIAL TRUE - -#undef EFI_FUEL_PUMP -#define EFI_FUEL_PUMP TRUE - -#undef MMC_CARD_SPI -#define MMC_CARD_SPI SPID1 - -#define ADC_CHANNEL_VREF ADC_CHANNEL_IN14 - -#undef EFI_UART_GPS -#define EFI_UART_GPS FALSE - -#undef EFI_BLUETOOTH_SETUP -#define EFI_BLUETOOTH_SETUP FALSE - -#undef SERIAL_SPEED -#define SERIAL_SPEED 115200 - -#ifdef EFI_CONSOLE_SERIAL_DEVICE - #undef EFI_CONSOLE_TX_BRAIN_PIN - #define EFI_CONSOLE_TX_BRAIN_PIN GPIOA_9 - - #undef EFI_CONSOLE_RX_BRAIN_PIN - #define EFI_CONSOLE_RX_BRAIN_PIN GPIOA_10 - - #undef EFI_CONSOLE_AF - #define EFI_CONSOLE_AF 7 -#endif - -#undef TS_SERIAL_AF -#define TS_SERIAL_AF 8 - -/* Red */ -#undef LED_ERROR_BRAIN_PIN -#define LED_ERROR_BRAIN_PIN GPIOG_7 - -/* no console switch */ -#undef CONSOLE_MODE_SWITCH_PORT -#undef CONSOLE_MODE_SWITCH_PIN -#define GET_CONSOLE_MODE_VALUE() (FALSE) - -/* no reset switch */ -#undef CONFIG_RESET_SWITCH_PORT -#undef CONFIG_RESET_SWITCH_PIN - -//!!!!!!!!!!!!!!! -//#undef EFI_INTERNAL_ADC -//#define EFI_INTERNAL_ADC FALSE - -#undef ADC_VCC -#define ADC_VCC 2.5f - -#undef EFI_MAIN_RELAY_CONTROL -#define EFI_MAIN_RELAY_CONTROL TRUE - -#undef EFI_MEMS -#define EFI_MEMS FALSE - -#undef EFI_IDLE_PID_CIC -#define EFI_IDLE_PID_CIC TRUE - -#define RPM_LOW_THRESHOLD 8 // RPM=8 is an empirical lower sensitivity threshold of MAX9926 for 60-2 -#define NO_RPM_EVENTS_TIMEOUT_SECS 5 // (RPM < 12) - -#define EFI_PRINT_ERRORS_AS_WARNINGS TRUE - -#define EFI_NARROW_EGO_AVERAGING TRUE - diff --git a/firmware/config/boards/subaru-ej20gn/halconf.h b/firmware/config/boards/subaru-ej20gn/halconf.h deleted file mode 100644 index ca6f842fdf..0000000000 --- a/firmware/config/boards/subaru-ej20gn/halconf.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @file boards/subaruej20g/halconf.h - * - * @brief In this header we can override halconf.h. - * - * @date Feb 19, 2019 - * @author Andrey Gusakov, 2019 - */ - -#include "mcuconf.h" -#include "../../stm32f7ems/halconf.h" - -#ifndef _HALCONF_SUBARUEJ20G_H_ -#define _HALCONF_SUBARUEJ20G_H_ - -#undef HAL_USE_PAL -#define HAL_USE_PAL TRUE -#undef PAL_USE_CALLBACKS -#define PAL_USE_CALLBACKS TRUE - -#undef HAL_USE_I2C -#define HAL_USE_I2C FALSE - -#undef HAL_USE_SERIAL -#define HAL_USE_SERIAL TRUE - -//#if TS_UART_DMA_MODE -#undef HAL_USE_UART -#define HAL_USE_UART TRUE -#undef UART_USE_WAIT -#define UART_USE_WAIT TRUE -//#else -//#define HAL_USE_UART FALSE -//#endif - -#undef HAL_USE_USB_MSD -#define HAL_USE_USB_MSD FALSE - -#endif /* _HALCONF_SUBARUEJ20G_H_ */ diff --git a/firmware/config/boards/subaru-ej20gn/make.sh b/firmware/config/boards/subaru-ej20gn/make.sh deleted file mode 100755 index 19152e6e61..0000000000 --- a/firmware/config/boards/subaru-ej20gn/make.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -export PROJECT_BOARD=subaru-ej20gn -export PROJECT_CPU=ARCH_STM32F7 -export PROJECT_CORE=cortex-m7 -export EXTRA_PARAMS="-DDUMMY -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE" -#echo $EXTRA_PARAMS -#export DEBUG_LEVEL_OPT="-O0" -#export USE_BOOTLOADER=yes - -CROSS_COMPILE=../../toolchain/gcc-arm-none-eabi-8-2018-q4-major/bin/arm-none-eabi- make $* \ No newline at end of file diff --git a/firmware/config/boards/subaru-ej20gn/mcuconf.h b/firmware/config/boards/subaru-ej20gn/mcuconf.h deleted file mode 100644 index 8f7f86ae5f..0000000000 --- a/firmware/config/boards/subaru-ej20gn/mcuconf.h +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @file boards/subaruej20g/mcuconf.h - * - * @brief In this header we can override mcuconf.h. - * - * @date Feb 19, 2019 - * @author Andrey Gusakov, 2019 - */ - -#include "../../stm32f7ems/mcuconf.h" - -#ifndef _MCUCONF_SUBARUEJ20G_H_ -#define _MCUCONF_SUBARUEJ20G_H_ - -/* clocks adjust for 12 MHz ocs */ -#undef STM32_PLLM_VALUE -#define STM32_PLLM_VALUE 12 - -//#undef CORTEX_ENABLE_WFI_IDLE -#define CORTEX_ENABLE_WFI_IDLE FALSE - -//#undef STM32_LSE_ENABLED -//#define STM32_LSE_ENABLED FALSE - -#undef STM32_RTCSEL -#define STM32_RTCSEL STM32_RTCSEL_HSEDIV // STM32_RTCSEL_LSI - -/* serials and uarts */ -#undef STM32_SERIAL_USE_USART1 -#undef STM32_UART_USE_USART1 -//#if TS_UART_DMA_MODE -//#define STM32_SERIAL_USE_UART1 FALSE -//#else -#define STM32_SERIAL_USE_USART1 TRUE -#define STM32_UART_USE_USART1 FALSE -//#endif - -#undef STM32_SERIAL_USE_USART2 -#undef STM32_UART_USE_USART2 -#define STM32_SERIAL_USE_USART2 FALSE -#define STM32_UART_USE_USART2 TRUE - -#undef STM32_SERIAL_USE_USART3 -#undef STM32_UART_USE_USART3 -#define STM32_SERIAL_USE_USART3 FALSE -#define STM32_UART_USE_USART3 FALSE - -#undef STM32_UART_USE_USART3 -#define STM32_UART_USE_USART3 FALSE - -#undef STM32_UART_USE_UART4 -#define STM32_UART_USE_UART4 FALSE - -#undef STM32_USB_USE_OTG1 -#define STM32_USB_USE_OTG1 TRUE - -#undef STM32_USB_USE_USB1 -#define STM32_USB_USE_USB1 TRUE - -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 FALSE - -#undef STM32_SPI_USE_SPI2 -#define STM32_SPI_USE_SPI2 FALSE - -#undef STM32_SPI_USE_SPI4 -#define STM32_SPI_USE_SPI4 TRUE - -#undef STM32_ICU_USE_TIM3 -#define STM32_ICU_USE_TIM3 TRUE - - -//#undef STM32_CAN_CAN1_IRQ_PRIORITY -//#define STM32_CAN_CAN1_IRQ_PRIORITY 4 - -#endif /* _MCUCONF_SUBARUEJ20G_H_ */ diff --git a/firmware/config/boards/subaru-ej20gn/readme.txt b/firmware/config/boards/subaru-ej20gn/readme.txt deleted file mode 100644 index b72731d52b..0000000000 --- a/firmware/config/boards/subaru-ej20gn/readme.txt +++ /dev/null @@ -1,7 +0,0 @@ -subaru EJ20G board. - -https://rusefi.com/wiki/index.php?title=Vehicle:Subaru_Impreza_1991-1996 -https://github.com/dron0gus/rusefi - -Cars: -https://rusefi.com/forum/viewtopic.php?f=15&t=1096 From c0d45f9330cbf98f92dc71040af8e95ef499b4db Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 9 May 2020 18:31:41 -0400 Subject: [PATCH 05/39] rusEFI online engine crc --- firmware/console/binary/tunerstudio_configuration.h | 3 ++- firmware/tunerstudio/rusefi.input | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/firmware/console/binary/tunerstudio_configuration.h b/firmware/console/binary/tunerstudio_configuration.h index 2bde4a2b29..054ea7f04d 100644 --- a/firmware/console/binary/tunerstudio_configuration.h +++ b/firmware/console/binary/tunerstudio_configuration.h @@ -174,8 +174,9 @@ typedef struct { // it wants to send have been sent. float calibrationValue; // 128 TsCalMode calibrationMode; // 132 - uint8_t padding[3]; // 133-135 + uint8_t padding[1]; // 133 + int16_t engineMakeCodeNameCrc16; // 134 // Errors int totalTriggerErrorCounter; // 136 int orderingErrorCounter; // 140 diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 52845a700c..7d7b71fe55 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -305,7 +305,9 @@ enable2ndByteCanID = false ; calibation helpers calibrationValue = scalar, F32, 128, "", 1, 0 calibrationMode = scalar, U08, 132, "", 1, 0 - ; 3 bytes padding1 + ; 1 bytes padding1 + + engineMakeCodeNameCrc16= scalar, U16, 134, "crc16", 1, 0 ; Errors totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 @@ -1197,6 +1199,8 @@ gaugeCategory = Sensors - Raw entry = debugIntField5, @@GAUGE_NAME_DEBUG_I5@@,int,"%d", { !enableLogDebugChannels } + entry = engineMakeCodeNameCrc16, "Engine CRC16",int,"%d" + entry = engineMode, "Engine Mode",int,"%d" entry = warningCounter, @@GAUGE_NAME_WARNING_COUNTER@@,int,"%d" entry = lastErrorCode, @@GAUGE_NAME_WARNING_LAST@@,int,"%d" From 7be4c750334d79912beaed244165ce6b4026aeda Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 9 May 2020 18:59:03 -0400 Subject: [PATCH 06/39] Fresh generated - auto --- .../algo/engine_configuration_generated_structures.h | 11 +++++++---- .../engine_configuration_generated_structures.h | 11 +++++++---- firmware/tunerstudio/rusefi.ini | 10 ++++++++-- firmware/tunerstudio/rusefi_frankenso.ini | 10 ++++++++-- firmware/tunerstudio/rusefi_kinetis.ini | 10 ++++++++-- firmware/tunerstudio/rusefi_microrusefi.ini | 10 ++++++++-- firmware/tunerstudio/rusefi_prometheus.ini | 10 ++++++++-- firmware/tunerstudio/rusefi_proteus.ini | 10 ++++++++-- 8 files changed, 62 insertions(+), 20 deletions(-) diff --git a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h index ecd02e474e..fa0e9d7ab4 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Fri May 08 22:00:16 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sat May 09 18:58:46 EDT 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -2351,12 +2351,15 @@ struct engine_configuration_s { */ float wwaeBeta; /** - * blue LED on discovery by default + * blue LED on many rusEFI boards. + * Blue Communication LED which is expected to blink at 50% duty cycle during normal board operation. + * If USB communication cable is connected Blue LED starts to blink faster. * offset 1812 */ brain_pin_e communicationLedPin; /** - * green LED on discovery by default + * Green LED on many rusEFI boards. + * Off if engine is stopped, blinks if engine is cranking, solid if engine is running. * offset 1813 */ brain_pin_e runningLedPin; @@ -3452,4 +3455,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Fri May 08 22:00:16 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sat May 09 18:58:46 EDT 2020 diff --git a/firmware/controllers/generated/engine_configuration_generated_structures.h b/firmware/controllers/generated/engine_configuration_generated_structures.h index a4a09dc6b6..ee88a2a55e 100644 --- a/firmware/controllers/generated/engine_configuration_generated_structures.h +++ b/firmware/controllers/generated/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Fri May 08 22:00:03 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:34 EDT 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -2351,12 +2351,15 @@ struct engine_configuration_s { */ float wwaeBeta; /** - * blue LED on discovery by default + * blue LED on many rusEFI boards. + * Blue Communication LED which is expected to blink at 50% duty cycle during normal board operation. + * If USB communication cable is connected Blue LED starts to blink faster. * offset 1812 */ brain_pin_e communicationLedPin; /** - * green LED on discovery by default + * Green LED on many rusEFI boards. + * Off if engine is stopped, blinks if engine is cranking, solid if engine is running. * offset 1813 */ brain_pin_e runningLedPin; @@ -3452,4 +3455,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Fri May 08 22:00:03 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:34 EDT 2020 diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 4e468831e5..0d096b970c 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 03:45:38 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:34 EDT 2020 pageSize = 20000 page = 1 @@ -1284,6 +1284,8 @@ page = 1 tachPulseTriggerIndex = "Trigger cycle index at which we start tach pulse (performance consideration)" wwaeTau = "Length of time the deposited wall fuel takes to dissipate after the start of acceleration. " wwaeBeta = "0 = No fuel settling on port walls 1 = All the fuel settling on port walls setting this to 0 disables the wall wetting enrichment. " + communicationLedPin = "blue LED on many rusEFI boards.\nBlue Communication LED which is expected to blink at 50% duty cycle during normal board operation.\nIf USB communication cable is connected Blue LED starts to blink faster." + runningLedPin = "Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running." throttlePedalWOTVoltage = "Pedal in the floor" startUpFuelPumpDuration = "on ECU start turn fuel pump on to build fuel pressure" targetVBatt = "This is the target battery voltage the alternator PID control will attempt to maintain" @@ -1560,7 +1562,9 @@ page = 1 ; calibation helpers calibrationValue = scalar, F32, 128, "", 1, 0 calibrationMode = scalar, U08, 132, "", 1, 0 - ; 3 bytes padding1 + ; 1 bytes padding1 + + engineMakeCodeNameCrc16= scalar, U16, 134, "crc16", 1, 0 ; Errors totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 @@ -2452,6 +2456,8 @@ gaugeCategory = Sensors - Raw entry = debugIntField5, "debug i5",int,"%d", { !enableLogDebugChannels } + entry = engineMakeCodeNameCrc16, "Engine CRC16",int,"%d" + entry = engineMode, "Engine Mode",int,"%d" entry = warningCounter, "warning: counter",int,"%d" entry = lastErrorCode, "warning: last",int,"%d" diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index 87c651c425..869c6a26c1 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 03:45:51 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:40 EDT 2020 pageSize = 20000 page = 1 @@ -1284,6 +1284,8 @@ page = 1 tachPulseTriggerIndex = "Trigger cycle index at which we start tach pulse (performance consideration)" wwaeTau = "Length of time the deposited wall fuel takes to dissipate after the start of acceleration. " wwaeBeta = "0 = No fuel settling on port walls 1 = All the fuel settling on port walls setting this to 0 disables the wall wetting enrichment. " + communicationLedPin = "blue LED on many rusEFI boards.\nBlue Communication LED which is expected to blink at 50% duty cycle during normal board operation.\nIf USB communication cable is connected Blue LED starts to blink faster." + runningLedPin = "Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running." throttlePedalWOTVoltage = "Pedal in the floor" startUpFuelPumpDuration = "on ECU start turn fuel pump on to build fuel pressure" targetVBatt = "This is the target battery voltage the alternator PID control will attempt to maintain" @@ -1560,7 +1562,9 @@ page = 1 ; calibation helpers calibrationValue = scalar, F32, 128, "", 1, 0 calibrationMode = scalar, U08, 132, "", 1, 0 - ; 3 bytes padding1 + ; 1 bytes padding1 + + engineMakeCodeNameCrc16= scalar, U16, 134, "crc16", 1, 0 ; Errors totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 @@ -2452,6 +2456,8 @@ gaugeCategory = Sensors - Raw entry = debugIntField5, "debug i5",int,"%d", { !enableLogDebugChannels } + entry = engineMakeCodeNameCrc16, "Engine CRC16",int,"%d" + entry = engineMode, "Engine Mode",int,"%d" entry = warningCounter, "warning: counter",int,"%d" entry = lastErrorCode, "warning: last",int,"%d" diff --git a/firmware/tunerstudio/rusefi_kinetis.ini b/firmware/tunerstudio/rusefi_kinetis.ini index 9bf3ae6fb1..10a9ee0fc4 100644 --- a/firmware/tunerstudio/rusefi_kinetis.ini +++ b/firmware/tunerstudio/rusefi_kinetis.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sat May 09 03:45:55 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sat May 09 18:58:46 EDT 2020 pageSize = 20000 page = 1 @@ -1284,6 +1284,8 @@ page = 1 tachPulseTriggerIndex = "Trigger cycle index at which we start tach pulse (performance consideration)" wwaeTau = "Length of time the deposited wall fuel takes to dissipate after the start of acceleration. " wwaeBeta = "0 = No fuel settling on port walls 1 = All the fuel settling on port walls setting this to 0 disables the wall wetting enrichment. " + communicationLedPin = "blue LED on many rusEFI boards.\nBlue Communication LED which is expected to blink at 50% duty cycle during normal board operation.\nIf USB communication cable is connected Blue LED starts to blink faster." + runningLedPin = "Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running." throttlePedalWOTVoltage = "Pedal in the floor" startUpFuelPumpDuration = "on ECU start turn fuel pump on to build fuel pressure" targetVBatt = "This is the target battery voltage the alternator PID control will attempt to maintain" @@ -1560,7 +1562,9 @@ page = 1 ; calibation helpers calibrationValue = scalar, F32, 128, "", 1, 0 calibrationMode = scalar, U08, 132, "", 1, 0 - ; 3 bytes padding1 + ; 1 bytes padding1 + + engineMakeCodeNameCrc16= scalar, U16, 134, "crc16", 1, 0 ; Errors totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 @@ -2452,6 +2456,8 @@ gaugeCategory = Sensors - Raw entry = debugIntField5, "debug i5",int,"%d", { !enableLogDebugChannels } + entry = engineMakeCodeNameCrc16, "Engine CRC16",int,"%d" + entry = engineMode, "Engine Mode",int,"%d" entry = warningCounter, "warning: counter",int,"%d" entry = lastErrorCode, "warning: last",int,"%d" diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index 3464a2fee0..7138eb1d97 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 03:45:49 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:38 EDT 2020 pageSize = 20000 page = 1 @@ -1284,6 +1284,8 @@ page = 1 tachPulseTriggerIndex = "Trigger cycle index at which we start tach pulse (performance consideration)" wwaeTau = "Length of time the deposited wall fuel takes to dissipate after the start of acceleration. " wwaeBeta = "0 = No fuel settling on port walls 1 = All the fuel settling on port walls setting this to 0 disables the wall wetting enrichment. " + communicationLedPin = "blue LED on many rusEFI boards.\nBlue Communication LED which is expected to blink at 50% duty cycle during normal board operation.\nIf USB communication cable is connected Blue LED starts to blink faster." + runningLedPin = "Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running." throttlePedalWOTVoltage = "Pedal in the floor" startUpFuelPumpDuration = "on ECU start turn fuel pump on to build fuel pressure" targetVBatt = "This is the target battery voltage the alternator PID control will attempt to maintain" @@ -1560,7 +1562,9 @@ page = 1 ; calibation helpers calibrationValue = scalar, F32, 128, "", 1, 0 calibrationMode = scalar, U08, 132, "", 1, 0 - ; 3 bytes padding1 + ; 1 bytes padding1 + + engineMakeCodeNameCrc16= scalar, U16, 134, "crc16", 1, 0 ; Errors totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 @@ -2452,6 +2456,8 @@ gaugeCategory = Sensors - Raw entry = debugIntField5, "debug i5",int,"%d", { !enableLogDebugChannels } + entry = engineMakeCodeNameCrc16, "Engine CRC16",int,"%d" + entry = engineMode, "Engine Mode",int,"%d" entry = warningCounter, "warning: counter",int,"%d" entry = lastErrorCode, "warning: last",int,"%d" diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index d0ecd48207..3c461efbc1 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 03:45:52 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:42 EDT 2020 pageSize = 20000 page = 1 @@ -1284,6 +1284,8 @@ page = 1 tachPulseTriggerIndex = "Trigger cycle index at which we start tach pulse (performance consideration)" wwaeTau = "Length of time the deposited wall fuel takes to dissipate after the start of acceleration. " wwaeBeta = "0 = No fuel settling on port walls 1 = All the fuel settling on port walls setting this to 0 disables the wall wetting enrichment. " + communicationLedPin = "blue LED on many rusEFI boards.\nBlue Communication LED which is expected to blink at 50% duty cycle during normal board operation.\nIf USB communication cable is connected Blue LED starts to blink faster." + runningLedPin = "Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running." throttlePedalWOTVoltage = "Pedal in the floor" startUpFuelPumpDuration = "on ECU start turn fuel pump on to build fuel pressure" targetVBatt = "This is the target battery voltage the alternator PID control will attempt to maintain" @@ -1560,7 +1562,9 @@ page = 1 ; calibation helpers calibrationValue = scalar, F32, 128, "", 1, 0 calibrationMode = scalar, U08, 132, "", 1, 0 - ; 3 bytes padding1 + ; 1 bytes padding1 + + engineMakeCodeNameCrc16= scalar, U16, 134, "crc16", 1, 0 ; Errors totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 @@ -2452,6 +2456,8 @@ gaugeCategory = Sensors - Raw entry = debugIntField5, "debug i5",int,"%d", { !enableLogDebugChannels } + entry = engineMakeCodeNameCrc16, "Engine CRC16",int,"%d" + entry = engineMode, "Engine Mode",int,"%d" entry = warningCounter, "warning: counter",int,"%d" entry = lastErrorCode, "warning: last",int,"%d" diff --git a/firmware/tunerstudio/rusefi_proteus.ini b/firmware/tunerstudio/rusefi_proteus.ini index 7a3c72d339..3032d4d3e9 100644 --- a/firmware/tunerstudio/rusefi_proteus.ini +++ b/firmware/tunerstudio/rusefi_proteus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 03:45:53 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:44 EDT 2020 pageSize = 20000 page = 1 @@ -1284,6 +1284,8 @@ page = 1 tachPulseTriggerIndex = "Trigger cycle index at which we start tach pulse (performance consideration)" wwaeTau = "Length of time the deposited wall fuel takes to dissipate after the start of acceleration. " wwaeBeta = "0 = No fuel settling on port walls 1 = All the fuel settling on port walls setting this to 0 disables the wall wetting enrichment. " + communicationLedPin = "blue LED on many rusEFI boards.\nBlue Communication LED which is expected to blink at 50% duty cycle during normal board operation.\nIf USB communication cable is connected Blue LED starts to blink faster." + runningLedPin = "Green LED on many rusEFI boards.\nOff if engine is stopped, blinks if engine is cranking, solid if engine is running." throttlePedalWOTVoltage = "Pedal in the floor" startUpFuelPumpDuration = "on ECU start turn fuel pump on to build fuel pressure" targetVBatt = "This is the target battery voltage the alternator PID control will attempt to maintain" @@ -1560,7 +1562,9 @@ page = 1 ; calibation helpers calibrationValue = scalar, F32, 128, "", 1, 0 calibrationMode = scalar, U08, 132, "", 1, 0 - ; 3 bytes padding1 + ; 1 bytes padding1 + + engineMakeCodeNameCrc16= scalar, U16, 134, "crc16", 1, 0 ; Errors totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 @@ -2452,6 +2456,8 @@ gaugeCategory = Sensors - Raw entry = debugIntField5, "debug i5",int,"%d", { !enableLogDebugChannels } + entry = engineMakeCodeNameCrc16, "Engine CRC16",int,"%d" + entry = engineMode, "Engine Mode",int,"%d" entry = warningCounter, "warning: counter",int,"%d" entry = lastErrorCode, "warning: last",int,"%d" From c59271c66954bd99524ccd9c90244edc6f272a3c Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 9 May 2020 20:04:58 -0400 Subject: [PATCH 07/39] engine crc for REO --- firmware/console/binary/tunerstudio_configuration.h | 1 + firmware/console/status_loop.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/firmware/console/binary/tunerstudio_configuration.h b/firmware/console/binary/tunerstudio_configuration.h index 054ea7f04d..2b76b0f78f 100644 --- a/firmware/console/binary/tunerstudio_configuration.h +++ b/firmware/console/binary/tunerstudio_configuration.h @@ -176,6 +176,7 @@ typedef struct { TsCalMode calibrationMode; // 132 uint8_t padding[1]; // 133 + // we want a hash of engineMake+engineCode+vehicleName in the log file in order to match TS logs to rusEFI Online tune int16_t engineMakeCodeNameCrc16; // 134 // Errors int totalTriggerErrorCounter; // 136 diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 00404e1af8..e7447c64bd 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -765,6 +765,8 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ tsOutputChannels->totalTriggerErrorCounter = engine->triggerCentral.triggerState.totalTriggerErrorCounter; // 132 tsOutputChannels->orderingErrorCounter = engine->triggerCentral.triggerState.orderingErrorCounter; + // 134 we take 2 bytes of crc32, no idea if it's right to call it crc16 or not + tsOutputChannels->engineMakeCodeNameCrc16 = crc32(engineConfiguration->engineMake, 3 * VEHICLE_INFO_SIZE); // 68 tsOutputChannels->baroCorrection = engine->engineState.baroCorrection; // 140 From 633afc10c8424517a17c42ec526b7148162391b9 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 9 May 2020 20:45:20 -0400 Subject: [PATCH 08/39] trying to guess --- firmware/hw_layer/drivers/gpio/tle8888.c | 29 +----------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/firmware/hw_layer/drivers/gpio/tle8888.c b/firmware/hw_layer/drivers/gpio/tle8888.c index 620117c770..998052f871 100644 --- a/firmware/hw_layer/drivers/gpio/tle8888.c +++ b/firmware/hw_layer/drivers/gpio/tle8888.c @@ -321,39 +321,12 @@ static int tle8888_spi_rw(struct tle8888_priv *chip, uint16_t tx, uint16_t *rx) static int tle8888_update_output(struct tle8888_priv *chip) { - int i; int ret = 0; - uint8_t briconfig0 = 0; /* TODO: lock? */ - uint32_t out_data = chip->o_state; - - /* calculate briconfig0 */ - uint32_t out_low = out_data & chip->o_pp_mask; - for (i = 20; i < 24; i++) { - if (out_low & BIT(i)) { - /* low-side switch mode */ - } else { - /* else enable high-side switch mode */ - briconfig0 |= BIT((i - 20) * 2); - } - } - /* TODO: set freewheeling bits in briconfig0? */ - - /* output for push-pull pins is allways enabled - * (at least until we start supporting hi-Z state) */ - out_data |= chip->o_pp_mask; - /* TODO: apply hi-Z mask when support will be added */ - /* set value only for non-direct driven pins */ - /* look like here is some conflict in case of - * direct-driven PP output */ - out_data &= (~chip->o_direct_mask); - - /* bridge config */ - ret = tle8888_spi_rw(chip, CMD_BRICONFIG(0, briconfig0), NULL); - + uint32_t out_data = chip->o_state & (~chip->o_direct_mask); for (int i = 0; i < 4; i++) { uint8_t od; From fcbba66e89086be48c925dada0e7d7bf311eb7b6 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 9 May 2020 22:43:39 -0400 Subject: [PATCH 09/39] rusEFI online engine crc --- firmware/console/status_loop.cpp | 2 -- firmware/controllers/algo/engine.cpp | 10 ++++++++++ firmware/controllers/algo/engine_configuration.cpp | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index e7447c64bd..00404e1af8 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -765,8 +765,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ tsOutputChannels->totalTriggerErrorCounter = engine->triggerCentral.triggerState.totalTriggerErrorCounter; // 132 tsOutputChannels->orderingErrorCounter = engine->triggerCentral.triggerState.orderingErrorCounter; - // 134 we take 2 bytes of crc32, no idea if it's right to call it crc16 or not - tsOutputChannels->engineMakeCodeNameCrc16 = crc32(engineConfiguration->engineMake, 3 * VEHICLE_INFO_SIZE); // 68 tsOutputChannels->baroCorrection = engine->engineState.baroCorrection; // 140 diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 5f3902155c..19a3913f4b 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -27,6 +27,10 @@ #include "sensor.h" #include "gppwm.h" +#if EFI_TUNER_STUDIO +#include "tunerstudio_configuration.h" +#endif /* EFI_TUNER_STUDIO */ + #if EFI_PROD_CODE #include "bench_test.h" #else @@ -238,11 +242,17 @@ void Engine::reset() { * so that we can prepare some helper structures */ void Engine::preCalculate(DECLARE_ENGINE_PARAMETER_SIGNATURE) { +// todo: start using this 'adcToVoltageInputDividerCoefficient' micro-optimization or... throw it away? #if HAL_USE_ADC adcToVoltageInputDividerCoefficient = adcToVolts(1) * engineConfiguration->analogInputDividerCoefficient; #else adcToVoltageInputDividerCoefficient = engineConfigurationPtr->analogInputDividerCoefficient; #endif + +#if EFI_TUNER_STUDIO + // we take 2 bytes of crc32, no idea if it's right to call it crc16 or not + tsOutputChannels.engineMakeCodeNameCrc16 = crc32(engineConfiguration->engineMake, 3 * VEHICLE_INFO_SIZE); +#endif /* EFI_TUNER_STUDIO */ } #if EFI_SHAFT_POSITION_INPUT diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 5feeb74ee3..d48a50a024 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -1406,6 +1406,7 @@ void validateConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { if (engineConfiguration->adcVcc > 5.0f || engineConfiguration->adcVcc < 1.0f) { engineConfiguration->adcVcc = 3.0f; } + engine->preCalculate(PASS_ENGINE_PARAMETER_SIGNATURE); } void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_SUFFIX) { From 816356f987c8cb7b4ae517684b6563955420ff0c Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 9 May 2020 22:44:44 -0400 Subject: [PATCH 10/39] manual date --- firmware/controllers/engine_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index b305731f6e..dd6d9ac4cf 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -717,6 +717,6 @@ int getRusEfiVersion(void) { if (initBootloader() != 0) return 123; #endif /* EFI_BOOTLOADER_INCLUDE_CODE */ - return 20200508; + return 20200509; } #endif /* EFI_UNIT_TEST */ From 8d91cc65cca6602c6251ac54b9a079d3e9c902db Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 9 May 2020 23:47:51 -0400 Subject: [PATCH 11/39] 34-2 3 cam Toyota wheel progress --- .../config/controllers/algo/auto_generated_enums.cpp | 2 ++ .../kinetis/config/controllers/algo/rusefi_generated.h | 2 +- firmware/config/engines/toyota_jzs147.cpp | 6 +++++- firmware/controllers/algo/auto_generated_enums.cpp | 2 ++ firmware/controllers/algo/rusefi_enums.h | 4 +++- firmware/controllers/generated/rusefi_generated.h | 2 +- firmware/controllers/trigger/decoders/trigger_structure.cpp | 4 ++++ firmware/controllers/trigger/decoders/trigger_toyota.h | 1 + firmware/integration/rusefi_config.txt | 2 +- 9 files changed, 20 insertions(+), 5 deletions(-) diff --git a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp index 18cbf3f1b9..4d71158447 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp +++ b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp @@ -1041,6 +1041,8 @@ case TT_ONE_PLUS_ONE: return "TT_ONE_PLUS_ONE"; case TT_ONE_PLUS_TOOTHED_WHEEL_60_2: return "TT_ONE_PLUS_TOOTHED_WHEEL_60_2"; +case TT_TOOTHED_WHEEL_36_2: + return "TT_TOOTHED_WHEEL_36_2"; case TT_ROVER_K: return "TT_ROVER_K"; case TT_SUBARU_7_6: diff --git a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h index 2c85ff4311..9dda3233a0 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -2149,7 +2149,7 @@ #define trigger_todoRemoveMeOneDay1_offset_hex 210 #define TRIGGER_TYPE_36_1 9 #define TRIGGER_TYPE_60_2 8 -#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "trg49", "trg50", "INVALID" #define trigger_type_offset 524 #define trigger_type_offset_hex 20c #define trigger_unusedBit_4_10_offset 528 diff --git a/firmware/config/engines/toyota_jzs147.cpp b/firmware/config/engines/toyota_jzs147.cpp index b1a0cdd196..7cff7944aa 100644 --- a/firmware/config/engines/toyota_jzs147.cpp +++ b/firmware/config/engines/toyota_jzs147.cpp @@ -95,13 +95,17 @@ void setToyota_jzs147EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { } +/** + * TOYOTA_2JZ_GTE_VVTi + * set engine_type 44 + */ void setToyota_2jz_vics(DECLARE_CONFIG_PARAMETER_SIGNATURE) { common2jz(PASS_CONFIG_PARAMETER_SIGNATURE); engineConfiguration->isSdCardEnabled = true; setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); - engineConfiguration->trigger.type = TT_2JZ_3_34; + engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_36_2; engineConfiguration->triggerInputPins[0] = GPIOA_5; // crank sensor engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; // cam sensor will he handled by custom vtti code diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index eb2ada7262..7f9ffb07a1 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -1193,6 +1193,8 @@ case TT_TOOTHED_WHEEL: return "TT_TOOTHED_WHEEL"; case TT_TOOTHED_WHEEL_36_1: return "TT_TOOTHED_WHEEL_36_1"; +case TT_TOOTHED_WHEEL_36_2: + return "TT_TOOTHED_WHEEL_36_2"; case TT_TOOTHED_WHEEL_60_2: return "TT_TOOTHED_WHEEL_60_2"; case TT_UNUSED: diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 81e459e65c..f0655084a3 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -341,13 +341,15 @@ typedef enum { TT_BOSCH_QUICK_START = 47, + TT_TOOTHED_WHEEL_36_2 = 48, + // do not forget to edit "#define trigger_type_e_enum" line in integration/rusefi_config.txt file to propogate new value to rusefi.ini TS project // do not forget to invoke "gen_config.bat" once you make changes to integration/rusefi_config.txt // todo: one day a hero would integrate some of these things into Makefile in order to reduce manual magic // // Another point: once you add a new trigger, run get_trigger_images.bat which would run rusefi_test.exe from unit_tests // - TT_UNUSED = 48, // this is used if we want to iterate over all trigger types + TT_UNUSED = 49, // this is used if we want to iterate over all trigger types Force_4_bytes_size_trigger_type = ENUM_32_BITS, } trigger_type_e; diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index 1a681eae0d..8f527a99d0 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -2149,7 +2149,7 @@ #define trigger_todoRemoveMeOneDay1_offset_hex 210 #define TRIGGER_TYPE_36_1 9 #define TRIGGER_TYPE_60_2 8 -#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "trg49", "trg50", "INVALID" #define trigger_type_offset 524 #define trigger_type_offset_hex 20c #define trigger_unusedBit_4_10_offset 528 diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index f0d3b1537f..1ced3b7348 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -546,6 +546,10 @@ void TriggerWaveform::initializeTriggerWaveform(Logging *logger, operation_mode_ setToothedWheelConfiguration(this, 60, 2, ambiguousOperationMode); break; + case TT_TOOTHED_WHEEL_36_2: + setToothedWheelConfiguration(this, 36, 2, ambiguousOperationMode); + break; + case TT_60_2_VW: setVwConfiguration(this); break; diff --git a/firmware/controllers/trigger/decoders/trigger_toyota.h b/firmware/controllers/trigger/decoders/trigger_toyota.h index 5c62dc4022..7488b2a7a8 100644 --- a/firmware/controllers/trigger/decoders/trigger_toyota.h +++ b/firmware/controllers/trigger/decoders/trigger_toyota.h @@ -10,5 +10,6 @@ #include "trigger_structure.h" void initialize2jzGE1_12(TriggerWaveform *s); +// TT_2JZ_3_34 void initialize2jzGE3_34_simulation_shape(TriggerWaveform *s); diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 2d1f295a78..84d93a5a24 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -524,7 +524,7 @@ struct trigger_config_s @brief Trigger wheel(s) configuration custom bool32_t 4 bits, U32, @OFFSET@, [0:0], "false", "true" -#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "trg49", "trg50", "INVALID" custom trigger_type_e 4 bits, U32, @OFFSET@, [0:7], @@trigger_type_e_enum@@ trigger_type_e type;set trigger_type X From b40d367dad06f2a1ffab3a16b6c001700d88e193 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 9 May 2020 23:59:10 -0400 Subject: [PATCH 12/39] more makes --- firmware/integration/rusefi_config.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 84d93a5a24..06051a6485 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1488,6 +1488,9 @@ end_struct #define ENGINE_MAKE_LADA "Lada" #define ENGINE_MAKE_GM "GM" #define ENGINE_MAKE_BMW "BMW" +#define ENGINE_MAKE_TOYOTA "Toyota" +#define ENGINE_MAKE_MERCEDES "Mercedes" + #define CMD_PINS "pins" #define CMD_CALIBRATE_PEDAL_UP "calibrate_pedal_up" From e82de4ac97a5856c2d5e6bd55dd890d9ff12ece6 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 00:26:20 -0400 Subject: [PATCH 13/39] Fresh generated - auto --- .../kinetis/config/controllers/algo/rusefi_generated.h | 2 ++ firmware/controllers/generated/rusefi_generated.h | 2 ++ firmware/tunerstudio/rusefi.ini | 4 ++-- firmware/tunerstudio/rusefi_frankenso.ini | 4 ++-- firmware/tunerstudio/rusefi_kinetis.ini | 4 ++-- firmware/tunerstudio/rusefi_microrusefi.ini | 4 ++-- firmware/tunerstudio/rusefi_prometheus.ini | 4 ++-- firmware/tunerstudio/rusefi_proteus.ini | 4 ++-- .../models/src/com/rusefi/config/generated/Fields.java | 6 ++++-- 9 files changed, 20 insertions(+), 14 deletions(-) diff --git a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h index 9dda3233a0..66176646cf 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -557,6 +557,8 @@ #define ENGINE_MAKE_GM "GM" #define ENGINE_MAKE_LADA "Lada" #define ENGINE_MAKE_MAZDA "Mazda" +#define ENGINE_MAKE_MERCEDES "Mercedes" +#define ENGINE_MAKE_TOYOTA "Toyota" #define ENGINE_NOISE_CURVE_SIZE 8 #define engineChartSize_offset 1480 #define engineChartSize_offset_hex 5c8 diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index 8f527a99d0..5479e4763b 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -557,6 +557,8 @@ #define ENGINE_MAKE_GM "GM" #define ENGINE_MAKE_LADA "Lada" #define ENGINE_MAKE_MAZDA "Mazda" +#define ENGINE_MAKE_MERCEDES "Mercedes" +#define ENGINE_MAKE_TOYOTA "Toyota" #define ENGINE_NOISE_CURVE_SIZE 8 #define engineChartSize_offset 1480 #define engineChartSize_offset_hex 5c8 diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 0d096b970c..7453cbbba4 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:34 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 00:25:55 EDT 2020 pageSize = 20000 page = 1 @@ -208,7 +208,7 @@ page = 1 tps2_1AdcChannel = bits, U08, 515, [0:7] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "Disabled", "PB12", "PB13", "PC14", "PC15", "PC16", "PC17", "PD3", "PD4", "PE2", "PE6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" ;no TS info - skipping overrideCrankingIgnition offset 516 sensorChartFrequency = scalar, S32, 520, "index", 1, 0, 0, 300, 0 ; size 4 - trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" + trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "trg49", "trg50", "INVALID" trigger_todoRemoveMeOneDay0= bits, U32, 528, [0:0], "false", "true" trigger_todoRemoveMeOneDay1= bits, U32, 528, [1:1], "false", "true" trigger_useOnlyFirstChannel= bits, U32, 528, [2:2], "false", "true" diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index 869c6a26c1..4b3274a0af 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:40 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 00:26:00 EDT 2020 pageSize = 20000 page = 1 @@ -208,7 +208,7 @@ page = 1 tps2_1AdcChannel = bits, U08, 515, [0:7] "Analog 3O","Analog 3L","Analog 3M","Analog 3J","Analog 3I","INVALID","Analog 3H","Analog 3G","INVALID","INVALID","INVALID","Analog 3P","Analog 3Q","Analog 3N","Analog VBatt","Analog 3E","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping overrideCrankingIgnition offset 516 sensorChartFrequency = scalar, S32, 520, "index", 1, 0, 0, 300, 0 ; size 4 - trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" + trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "trg49", "trg50", "INVALID" trigger_todoRemoveMeOneDay0= bits, U32, 528, [0:0], "false", "true" trigger_todoRemoveMeOneDay1= bits, U32, 528, [1:1], "false", "true" trigger_useOnlyFirstChannel= bits, U32, 528, [2:2], "false", "true" diff --git a/firmware/tunerstudio/rusefi_kinetis.ini b/firmware/tunerstudio/rusefi_kinetis.ini index 10a9ee0fc4..b1f3b7fed1 100644 --- a/firmware/tunerstudio/rusefi_kinetis.ini +++ b/firmware/tunerstudio/rusefi_kinetis.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sat May 09 18:58:46 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun May 10 00:26:06 EDT 2020 pageSize = 20000 page = 1 @@ -208,7 +208,7 @@ page = 1 tps2_1AdcChannel = bits, U08, 515, [0:7] "PA2", "PA3", "INVALID", "PD3", "INVALID", "INVALID", "INVALID", "PB12", "PB13", "INVALID", "PE2", "INVALID", "PC14", "PC15", "PC16", "PC17", "Disabled", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" ;no TS info - skipping overrideCrankingIgnition offset 516 sensorChartFrequency = scalar, S32, 520, "index", 1, 0, 0, 300, 0 ; size 4 - trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" + trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "trg49", "trg50", "INVALID" trigger_todoRemoveMeOneDay0= bits, U32, 528, [0:0], "false", "true" trigger_todoRemoveMeOneDay1= bits, U32, 528, [1:1], "false", "true" trigger_useOnlyFirstChannel= bits, U32, 528, [2:2], "false", "true" diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index 7138eb1d97..9b895193e1 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:38 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 00:25:58 EDT 2020 pageSize = 20000 page = 1 @@ -208,7 +208,7 @@ page = 1 tps2_1AdcChannel = bits, U08, 515, [0:7] "18 - AN temp 1","23 - AN temp 2","24 - AN temp 3","22 - AN temp 4","28 - AN volt 10","INVALID","26 - AN volt 2","31 - AN volt 3","36 - AN volt 8","40 - AN volt 9","27 - AN volt 1","Battery Sense","19 - AN volt 4","20 - AN volt 5","32 - AN volt 6","30 - AN volt 7","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping overrideCrankingIgnition offset 516 sensorChartFrequency = scalar, S32, 520, "index", 1, 0, 0, 300, 0 ; size 4 - trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" + trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "trg49", "trg50", "INVALID" trigger_todoRemoveMeOneDay0= bits, U32, 528, [0:0], "false", "true" trigger_todoRemoveMeOneDay1= bits, U32, 528, [1:1], "false", "true" trigger_useOnlyFirstChannel= bits, U32, 528, [2:2], "false", "true" diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index 3c461efbc1..1601ee2a37 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:42 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 00:26:03 EDT 2020 pageSize = 20000 page = 1 @@ -208,7 +208,7 @@ page = 1 tps2_1AdcChannel = bits, U08, 515, [0:7] "Analog 3O","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping overrideCrankingIgnition offset 516 sensorChartFrequency = scalar, S32, 520, "index", 1, 0, 0, 300, 0 ; size 4 - trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" + trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "trg49", "trg50", "INVALID" trigger_todoRemoveMeOneDay0= bits, U32, 528, [0:0], "false", "true" trigger_todoRemoveMeOneDay1= bits, U32, 528, [1:1], "false", "true" trigger_useOnlyFirstChannel= bits, U32, 528, [2:2], "false", "true" diff --git a/firmware/tunerstudio/rusefi_proteus.ini b/firmware/tunerstudio/rusefi_proteus.ini index 3032d4d3e9..4f7bc0925a 100644 --- a/firmware/tunerstudio/rusefi_proteus.ini +++ b/firmware/tunerstudio/rusefi_proteus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:44 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 00:26:05 EDT 2020 pageSize = 20000 page = 1 @@ -208,7 +208,7 @@ page = 1 tps2_1AdcChannel = bits, U08, 515, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping overrideCrankingIgnition offset 516 sensorChartFrequency = scalar, S32, 520, "index", 1, 0, 0, 300, 0 ; size 4 - trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" + trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "trg49", "trg50", "INVALID" trigger_todoRemoveMeOneDay0= bits, U32, 528, [0:0], "false", "true" trigger_todoRemoveMeOneDay1= bits, U32, 528, [1:1], "false", "true" trigger_useOnlyFirstChannel= bits, U32, 528, [2:2], "false", "true" diff --git a/java_console/models/src/com/rusefi/config/generated/Fields.java b/java_console/models/src/com/rusefi/config/generated/Fields.java index b1c2d359d3..24cc96a661 100644 --- a/java_console/models/src/com/rusefi/config/generated/Fields.java +++ b/java_console/models/src/com/rusefi/config/generated/Fields.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 00:42:22 EDT 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 00:25:55 EDT 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; @@ -362,6 +362,8 @@ public class Fields { public static final String ENGINE_MAKE_GM = "GM"; public static final String ENGINE_MAKE_LADA = "Lada"; public static final String ENGINE_MAKE_MAZDA = "Mazda"; + public static final String ENGINE_MAKE_MERCEDES = "Mercedes"; + public static final String ENGINE_MAKE_TOYOTA = "Toyota"; public static final int ENGINE_NOISE_CURVE_SIZE = 8; public static final int engineChartSize_offset = 1480; public static final int engineCode_offset = 1128; @@ -1763,7 +1765,7 @@ public class Fields { public static final Field TPS2_1ADCCHANNEL = Field.create("TPS2_1ADCCHANNEL", 515, FieldType.INT8, adc_channel_e); public static final Field OVERRIDECRANKINGIGNITION = Field.create("OVERRIDECRANKINGIGNITION", 516, FieldType.INT); public static final Field SENSORCHARTFREQUENCY = Field.create("SENSORCHARTFREQUENCY", 520, FieldType.INT); - public static final String[] trigger_type_e = {"custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID"}; + public static final String[] trigger_type_e = {"custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "trg49", "trg50", "INVALID"}; public static final Field TRIGGER_TYPE = Field.create("TRIGGER_TYPE", 524, FieldType.INT, trigger_type_e); public static final Field TRIGGER_TODOREMOVEMEONEDAY0 = Field.create("TRIGGER_TODOREMOVEMEONEDAY0", 528, FieldType.BIT, 0); public static final Field TRIGGER_TODOREMOVEMEONEDAY1 = Field.create("TRIGGER_TODOREMOVEMEONEDAY1", 528, FieldType.BIT, 1); From d18bf76fb56c2d9ed1b6cb3c16f8a0c16df6c384 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 00:42:33 -0400 Subject: [PATCH 14/39] 34-2 3 cam Toyota wheel progress --- .../controllers/algo/rusefi_generated.h | 2 + firmware/config/engines/dodge_neon.cpp | 2 +- firmware/config/engines/mazda_miata_vvt.cpp | 46 +++++++++++-------- firmware/config/engines/mazda_miata_vvt.h | 1 + firmware/config/engines/toyota_jzs147.cpp | 12 +++++ .../controllers/generated/rusefi_generated.h | 2 + .../controllers/trigger/trigger_central.cpp | 16 +++++-- 7 files changed, 56 insertions(+), 25 deletions(-) diff --git a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h index 9dda3233a0..66176646cf 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -557,6 +557,8 @@ #define ENGINE_MAKE_GM "GM" #define ENGINE_MAKE_LADA "Lada" #define ENGINE_MAKE_MAZDA "Mazda" +#define ENGINE_MAKE_MERCEDES "Mercedes" +#define ENGINE_MAKE_TOYOTA "Toyota" #define ENGINE_NOISE_CURVE_SIZE 8 #define engineChartSize_offset 1480 #define engineChartSize_offset_hex 5c8 diff --git a/firmware/config/engines/dodge_neon.cpp b/firmware/config/engines/dodge_neon.cpp index 4398a29b6f..8d59d646b1 100644 --- a/firmware/config/engines/dodge_neon.cpp +++ b/firmware/config/engines/dodge_neon.cpp @@ -429,7 +429,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // engineConfiguration->clutchUpPin = GPIOA_14; // note SWCLK - conflict with SWD engineConfiguration->clutchUpPinMode = PI_PULLUP; - engineConfiguration->activateAuxPid1 = 1; + engineConfiguration->activateAuxPid1 = true; engineConfiguration->auxPidPins[0] = GPIOD_5; // playing with AUX PID for alternator engineConfiguration->auxPidFrequency[0] = 300; diff --git a/firmware/config/engines/mazda_miata_vvt.cpp b/firmware/config/engines/mazda_miata_vvt.cpp index 64d17c3d8b..3f87d69a14 100644 --- a/firmware/config/engines/mazda_miata_vvt.cpp +++ b/firmware/config/engines/mazda_miata_vvt.cpp @@ -64,11 +64,11 @@ static const float injectorLagCorrection[VBAT_INJECTOR_CURVE_SIZE] = { 1.5 , 1.35, 1.25 , 1.20 }; -static const float ve18fsioRpmBins[FSIO_TABLE_8] = +static const float vvt18fsioRpmBins[FSIO_TABLE_8] = {700.0, 1000.0, 2000.0, 3000.0, 3500.0, 4500.0, 5500.0, 6500.0} ; -static const float ve18fsioLoadBins[FSIO_TABLE_8] = +static const float vvt18fsioLoadBins[FSIO_TABLE_8] = {30.0, 40.0, 50.0, 60.0, 70.0, 75.0, 82.0, 85.0} ; @@ -216,6 +216,29 @@ void setMazdaMiataNbInjectorLag(DECLARE_CONFIG_PARAMETER_SIGNATURE) { memcpy(engineConfiguration->injector.battLagCorrBins, injectorLagBins, sizeof(injectorLagBins)); } +void setMazdaNB2VVTSettings(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + memcpy(config->fsioTable1RpmBins, vvt18fsioRpmBins, sizeof(vvt18fsioRpmBins)); + memcpy(config->fsioTable1LoadBins, vvt18fsioLoadBins, sizeof(vvt18fsioLoadBins)); + // todo: there should be a better way? + for (int loadIndex = 0; loadIndex < FSIO_TABLE_8; loadIndex++) { + for (int rpmIndex = 0; rpmIndex < FSIO_TABLE_8; rpmIndex++) { + config->fsioTable1[loadIndex][rpmIndex] = fsio_table_vvt_target[loadIndex][rpmIndex]; + } + } + + engineConfiguration->auxPidFrequency[0] = 300; // VVT solenoid control + + // VVT closed loop + engineConfiguration->auxPid[0].pFactor = 2; + engineConfiguration->auxPid[0].iFactor = 0.005; + engineConfiguration->auxPid[0].dFactor = 0; + engineConfiguration->auxPid[0].offset = 33; + engineConfiguration->auxPid[0].minValue = 24; + engineConfiguration->auxPid[0].maxValue = 44; + + engineConfiguration->activateAuxPid1 = true; // todo: remove this field? +} + static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->displayLogicLevelsInEngineSniffer = true; engineConfiguration->useOnlyRisingEdgeForTrigger = true; @@ -233,8 +256,6 @@ static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) { setCommonNTCSensor(&engineConfiguration->iat, 2700); setMAFTransferFunction(PASS_CONFIG_PARAMETER_SIGNATURE); - engineConfiguration->auxPidFrequency[0] = 300; // VVT solenoid control - // set idle_position 35 engineConfiguration->manIdlePosition = 35; @@ -270,14 +291,6 @@ static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->alternatorControl.dFactor = 0; engineConfiguration->alternatorControl.periodMs = 10; - // VVT closed loop - engineConfiguration->auxPid[0].pFactor = 2; - engineConfiguration->auxPid[0].iFactor = 0.005; - engineConfiguration->auxPid[0].dFactor = 0; - engineConfiguration->auxPid[0].offset = 33; - engineConfiguration->auxPid[0].minValue = 24; - engineConfiguration->auxPid[0].maxValue = 44; - engineConfiguration->activateAuxPid1 = true; // todo: remove this field? engineConfiguration->vvtCamSensorUseRise = true; // set vvt_mode 3 @@ -294,14 +307,7 @@ static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) { copyTimingTable(mapBased18vvtTimingTable, config->ignitionTable); #endif - memcpy(config->fsioTable1RpmBins, ve18fsioRpmBins, sizeof(ve18fsioRpmBins)); - memcpy(config->fsioTable1LoadBins, ve18fsioLoadBins, sizeof(ve18fsioLoadBins)); - // todo: there should be a better way? - for (int loadIndex = 0; loadIndex < FSIO_TABLE_8; loadIndex++) { - for (int rpmIndex = 0; rpmIndex < FSIO_TABLE_8; rpmIndex++) { - config->fsioTable1[loadIndex][rpmIndex] = fsio_table_vvt_target[loadIndex][rpmIndex]; - } - } + setMazdaNB2VVTSettings(PASS_CONFIG_PARAMETER_SIGNATURE); // enable cylinder_cleanup engineConfiguration->isCylinderCleanupEnabled = true; diff --git a/firmware/config/engines/mazda_miata_vvt.h b/firmware/config/engines/mazda_miata_vvt.h index cc72460947..af111a67de 100644 --- a/firmware/config/engines/mazda_miata_vvt.h +++ b/firmware/config/engines/mazda_miata_vvt.h @@ -13,6 +13,7 @@ void setMazdaMiataNbInjectorLag(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setMazdaMiataNbTpsTps(DECLARE_CONFIG_PARAMETER_SIGNATURE); +void setMazdaNB2VVTSettings(DECLARE_CONFIG_PARAMETER_SIGNATURE); /** * Primary rusEfi test mule https://rusefi.com/forum/viewtopic.php?f=3&t=1095 diff --git a/firmware/config/engines/toyota_jzs147.cpp b/firmware/config/engines/toyota_jzs147.cpp index 7cff7944aa..ffcc67ec27 100644 --- a/firmware/config/engines/toyota_jzs147.cpp +++ b/firmware/config/engines/toyota_jzs147.cpp @@ -20,6 +20,7 @@ #include "toyota_jzs147.h" #include "custom_engine.h" #include "thermistors.h" +#include "mazda_miata_vvt.h" EXTERN_CONFIG; @@ -121,8 +122,19 @@ void setToyota_2jz_vics(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->twoWireBatchIgnition = true; engineConfiguration->twoWireBatchInjection = true; + strcpy(CONFIG(engineMake), ENGINE_MAKE_TOYOTA); + strcpy(CONFIG(engineCode), "2JZ"); + strcpy(CONFIG(vehicleName), "VVT example"); + // todo: these magic values would be hardcoded once we find out proper magic values + engineConfiguration->fsio_setting[14] = -90; + engineConfiguration->fsio_setting[15] = +90; + + engineConfiguration->auxPidPins[0] = GPIOE_3; // VVT solenoid control + + // Mazda VVT settings have nothing to do wit Toyota 2JZ settings but those are a good starting point for settings + setMazdaNB2VVTSettings(PASS_CONFIG_PARAMETER_SIGNATURE); } diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index 8f527a99d0..5479e4763b 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -557,6 +557,8 @@ #define ENGINE_MAKE_GM "GM" #define ENGINE_MAKE_LADA "Lada" #define ENGINE_MAKE_MAZDA "Mazda" +#define ENGINE_MAKE_MERCEDES "Mercedes" +#define ENGINE_MAKE_TOYOTA "Toyota" #define ENGINE_NOISE_CURVE_SIZE 8 #define engineChartSize_offset 1480 #define engineChartSize_offset_hex 5c8 diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 8aed68df0c..542fb3745d 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -181,7 +181,11 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ tc->vvtPosition = (engineConfiguration->vvtDisplayInverted ? -vvtPosition : vvtPosition) + engineConfiguration->vvtOffset; - if (engineConfiguration->vvtMode == VVT_FIRST_HALF) { + switch (engineConfiguration->vvtMode) { + default: + case VVT_FIRST_HALF: + { + bool isEven = tc->triggerState.isEvenRevolution(); if (!isEven) { /** @@ -196,7 +200,10 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ #endif /* EFI_TUNER_STUDIO */ } } - } else if (engineConfiguration->vvtMode == VVT_SECOND_HALF) { + } + break; + case VVT_SECOND_HALF: + { bool isEven = tc->triggerState.isEvenRevolution(); if (isEven) { // see above comment @@ -207,8 +214,9 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ #endif /* EFI_TUNER_STUDIO */ } } - - } else if (engineConfiguration->vvtMode == MIATA_NB2) { + } + break; + case MIATA_NB2: /** * NB2 is a symmetrical crank, there are four phases total */ From ac9faf66462275e329f687c22e08a4308eb1d90e Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 00:59:32 -0400 Subject: [PATCH 15/39] docs & clean-up --- firmware/controllers/algo/engine.cpp | 1 + unit_tests/main.cpp | 3 +-- unit_tests/test_basic_math/test_find_index.h | 10 ---------- unit_tests/tests/tests.mk | 10 +++++----- .../test_cam_vvt_input.cpp} | 2 +- .../tests/{ => trigger}/test_symmetrical_crank.cpp | 0 .../tests/{ => trigger}/test_trigger_decoder.cpp | 0 .../tests/{ => trigger}/test_trigger_multi_sync.cpp | 0 .../tests/{ => trigger}/test_trigger_noiseless.cpp | 0 9 files changed, 8 insertions(+), 18 deletions(-) delete mode 100644 unit_tests/test_basic_math/test_find_index.h rename unit_tests/tests/{test_cam_vtt_input.cpp => trigger/test_cam_vvt_input.cpp} (99%) rename unit_tests/tests/{ => trigger}/test_symmetrical_crank.cpp (100%) rename unit_tests/tests/{ => trigger}/test_trigger_decoder.cpp (100%) rename unit_tests/tests/{ => trigger}/test_trigger_multi_sync.cpp (100%) rename unit_tests/tests/{ => trigger}/test_trigger_noiseless.cpp (100%) diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 19a3913f4b..2088044c31 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -251,6 +251,7 @@ void Engine::preCalculate(DECLARE_ENGINE_PARAMETER_SIGNATURE) { #if EFI_TUNER_STUDIO // we take 2 bytes of crc32, no idea if it's right to call it crc16 or not + // we have a hack here - we rely on the fact that engineMake is the first of three relevant fields tsOutputChannels.engineMakeCodeNameCrc16 = crc32(engineConfiguration->engineMake, 3 * VEHICLE_INFO_SIZE); #endif /* EFI_TUNER_STUDIO */ } diff --git a/unit_tests/main.cpp b/unit_tests/main.cpp index fbceeed41b..0f34293b30 100644 --- a/unit_tests/main.cpp +++ b/unit_tests/main.cpp @@ -9,7 +9,6 @@ #include #include "global.h" -#include "test_find_index.h" #include "engine_configuration.h" @@ -40,7 +39,7 @@ GTEST_API_ int main(int argc, char **argv) { // printTriggerDebug = true; // resizeMap(); - printf("Success 20200131\r\n"); + printf("Success 20200510\r\n"); printAllTriggers(); // printConvertedTable(); testing::InitGoogleTest(&argc, argv); diff --git a/unit_tests/test_basic_math/test_find_index.h b/unit_tests/test_basic_math/test_find_index.h deleted file mode 100644 index 850649e01c..0000000000 --- a/unit_tests/test_basic_math/test_find_index.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * test_find_index.h - * - * Created on: Oct 30, 2013 - * @author Andrey Belomutskiy, (c) 2012-2020 - */ - -#pragma once - -void testFindIndex(void); diff --git a/unit_tests/tests/tests.mk b/unit_tests/tests/tests.mk index 9927a08885..d7571c22e5 100644 --- a/unit_tests/tests/tests.mk +++ b/unit_tests/tests/tests.mk @@ -1,20 +1,21 @@ TESTS_SRC_CPP = \ + tests/trigger/test_symmetrical_crank.cpp \ + tests/trigger/test_trigger_decoder.cpp \ + tests/trigger/test_trigger_noiseless.cpp \ + tests/trigger/test_trigger_multi_sync.cpp \ + tests/trigger/test_cam_vvt_input.cpp \ tests/test_util.cpp \ tests/test_ion.cpp \ tests/test_aux_valves.cpp \ tests/test_on_demand_parameters.cpp \ tests/test_hip9011.cpp \ tests/test_cj125.cpp \ - tests/test_cam_vtt_input.cpp \ tests/test_engine_math.cpp \ tests/test_startOfCrankingPrimingPulse.cpp \ tests/test_miata_na6_real_cranking.cpp \ tests/test_fasterEngineSpinningUp.cpp \ tests/test_dwell_corner_case_issue_796.cpp \ - tests/test_symmetrical_crank.cpp \ tests/test_idle_controller.cpp \ - tests/test_trigger_decoder.cpp \ - tests/test_trigger_noiseless.cpp \ tests/test_issue_898.cpp \ tests/test_etb.cpp \ tests/test_ignition_scheduling.cpp \ @@ -23,7 +24,6 @@ TESTS_SRC_CPP = \ tests/test_one_cylinder_logic.cpp \ tests/test_maf2map.cpp \ tests/test_fuelCut.cpp \ - tests/test_trigger_multi_sync.cpp \ tests/test_pwm_generator.cpp \ tests/test_logic_expression.cpp \ tests/test_speed_density.cpp \ diff --git a/unit_tests/tests/test_cam_vtt_input.cpp b/unit_tests/tests/trigger/test_cam_vvt_input.cpp similarity index 99% rename from unit_tests/tests/test_cam_vtt_input.cpp rename to unit_tests/tests/trigger/test_cam_vvt_input.cpp index 1add03ace1..3e53065410 100644 --- a/unit_tests/tests/test_cam_vtt_input.cpp +++ b/unit_tests/tests/trigger/test_cam_vvt_input.cpp @@ -1,5 +1,5 @@ /* - * test_cam_vtt_input.cpp + * test_cam_vvt_input.cpp * * Created on: Jan 13, 2019 * @author Andrey Belomutskiy, (c) 2012-2020 diff --git a/unit_tests/tests/test_symmetrical_crank.cpp b/unit_tests/tests/trigger/test_symmetrical_crank.cpp similarity index 100% rename from unit_tests/tests/test_symmetrical_crank.cpp rename to unit_tests/tests/trigger/test_symmetrical_crank.cpp diff --git a/unit_tests/tests/test_trigger_decoder.cpp b/unit_tests/tests/trigger/test_trigger_decoder.cpp similarity index 100% rename from unit_tests/tests/test_trigger_decoder.cpp rename to unit_tests/tests/trigger/test_trigger_decoder.cpp diff --git a/unit_tests/tests/test_trigger_multi_sync.cpp b/unit_tests/tests/trigger/test_trigger_multi_sync.cpp similarity index 100% rename from unit_tests/tests/test_trigger_multi_sync.cpp rename to unit_tests/tests/trigger/test_trigger_multi_sync.cpp diff --git a/unit_tests/tests/test_trigger_noiseless.cpp b/unit_tests/tests/trigger/test_trigger_noiseless.cpp similarity index 100% rename from unit_tests/tests/test_trigger_noiseless.cpp rename to unit_tests/tests/trigger/test_trigger_noiseless.cpp From 32ba492b4803aa38237a49b07194011a0401dd98 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 01:21:54 -0400 Subject: [PATCH 16/39] 34-2 3 cam Toyota wheel progress --- unit_tests/tests/tests.mk | 1 + unit_tests/tests/trigger/test_2jz_vvt.cpp | 33 +++++++++++++++++++ .../tests/trigger/test_cam_vvt_input.cpp | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 unit_tests/tests/trigger/test_2jz_vvt.cpp diff --git a/unit_tests/tests/tests.mk b/unit_tests/tests/tests.mk index d7571c22e5..b54a80cad1 100644 --- a/unit_tests/tests/tests.mk +++ b/unit_tests/tests/tests.mk @@ -4,6 +4,7 @@ TESTS_SRC_CPP = \ tests/trigger/test_trigger_noiseless.cpp \ tests/trigger/test_trigger_multi_sync.cpp \ tests/trigger/test_cam_vvt_input.cpp \ + tests/trigger/test_2jz_vvt.cpp \ tests/test_util.cpp \ tests/test_ion.cpp \ tests/test_aux_valves.cpp \ diff --git a/unit_tests/tests/trigger/test_2jz_vvt.cpp b/unit_tests/tests/trigger/test_2jz_vvt.cpp new file mode 100644 index 0000000000..9e7ce6355c --- /dev/null +++ b/unit_tests/tests/trigger/test_2jz_vvt.cpp @@ -0,0 +1,33 @@ +/* + * @file test_2jz_vvt.cpp + * + * Created on: May 10, 2020 + * @author Andrey Belomutskiy, (c) 2012-2020 + */ + +#include "engine_test_helper.h" + +TEST(sensors, test2jz) { + + WITH_ENGINE_TEST_HELPER(TOYOTA_2JZ_GTE_VVTi); + + + // this crank trigger would be easier to test, crank shape is less important for this test + engineConfiguration->useOnlyRisingEdgeForTrigger = true; + eth.setTriggerType(TT_ONE PASS_ENGINE_PARAMETER_SUFFIX); + + ASSERT_EQ( 0, GET_RPM()) << "test2jz RPM"; + for (int i = 0; i < 3;i++) { + eth.fireRise(25); + ASSERT_EQ( 0, GET_RPM()) << "test2jz RPM at " << i; + } + eth.fireRise(25); + // first time we have RPM + ASSERT_EQ(2400, GET_RPM()) << "test2jz RPM"; + + + eth.moveTimeForwardUs(MS2US(3)); // shifting VVT phase a few angles + + hwHandleVvtCamSignal(TV_FALL, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX); + +} diff --git a/unit_tests/tests/trigger/test_cam_vvt_input.cpp b/unit_tests/tests/trigger/test_cam_vvt_input.cpp index 3e53065410..c1fe6f55da 100644 --- a/unit_tests/tests/trigger/test_cam_vvt_input.cpp +++ b/unit_tests/tests/trigger/test_cam_vvt_input.cpp @@ -138,7 +138,7 @@ TEST(sensors, testNB2CamInput) { ASSERT_EQ(totalRevolutionCountBeforeVvtSync, engine->triggerCentral.triggerState.getTotalRevolutionCounter()); ASSERT_TRUE((totalRevolutionCountBeforeVvtSync % SYMMETRICAL_CRANK_SENSOR_DIVIDER) != 0); - eth.moveTimeForwardUs(MS2US(3)); // shifting VVT phase a few anlges + eth.moveTimeForwardUs(MS2US(3)); // shifting VVT phase a few angles // this would be ignored since we only consume the other kind of fronts here hwHandleVvtCamSignal(TV_FALL, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX); From 919afd35e838d999b91204c6ad06329c264dd5a8 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 01:34:43 -0400 Subject: [PATCH 17/39] removing some unneeded flexibility --- .../algo/engine_configuration_generated_structures.h | 6 +++--- .../kinetis/config/controllers/algo/rusefi_generated.h | 4 ++-- firmware/config/engines/mazda_miata_vvt.cpp | 3 --- .../generated/engine_configuration_generated_structures.h | 6 +++--- firmware/controllers/generated/rusefi_generated.h | 4 ++-- firmware/controllers/trigger/trigger_central.cpp | 5 ++--- firmware/integration/rusefi_config.txt | 2 +- firmware/tunerstudio/rusefi.input | 1 - 8 files changed, 13 insertions(+), 18 deletions(-) diff --git a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h index fa0e9d7ab4..b17c617612 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sat May 09 18:58:46 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun May 10 01:32:43 EDT 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -1918,7 +1918,7 @@ struct engine_configuration_s { int unusedAtOldBoardConfigurationEnd[68]; /** offset 1464 bit 0 */ - bool vvtDisplayInverted : 1; + bool unusedHereWeHave : 1; /** * Enables lambda sensor closed loop feedback for fuelling. offset 1464 bit 1 */ @@ -3455,4 +3455,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sat May 09 18:58:46 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun May 10 01:32:43 EDT 2020 diff --git a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h index 66176646cf..dee51ca550 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -2361,6 +2361,8 @@ #define unusedFlexFuelSensor_offset_hex c1c #define unusedHere_offset 761 #define unusedHere_offset_hex 2f9 +#define unusedHereWeHave_offset 1464 +#define unusedHereWeHave_offset_hex 5b8 #define unusedOldBiquad_offset 2332 #define unusedOldBiquad_offset_hex 91c #define unusedSomethingWasHere_offset 2417 @@ -2479,8 +2481,6 @@ #define vvt_mode_e_enum "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7" #define vvtCamSensorUseRise_offset 744 #define vvtCamSensorUseRise_offset_hex 2e8 -#define vvtDisplayInverted_offset 1464 -#define vvtDisplayInverted_offset_hex 5b8 #define vvtMode_offset 2328 #define vvtMode_offset_hex 918 #define vvtOffset_offset 2052 diff --git a/firmware/config/engines/mazda_miata_vvt.cpp b/firmware/config/engines/mazda_miata_vvt.cpp index 3f87d69a14..6e3b152023 100644 --- a/firmware/config/engines/mazda_miata_vvt.cpp +++ b/firmware/config/engines/mazda_miata_vvt.cpp @@ -350,9 +350,6 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // engineConfiguration->vehicleSpeedSensorInputPin = GPIOA_8; - - engineConfiguration->vvtDisplayInverted = true; - engineConfiguration->auxPidPins[0] = GPIOE_3; // VVT solenoid control // /** // * set_fsio_setting 1 0.55 diff --git a/firmware/controllers/generated/engine_configuration_generated_structures.h b/firmware/controllers/generated/engine_configuration_generated_structures.h index ee88a2a55e..fdcc29b47b 100644 --- a/firmware/controllers/generated/engine_configuration_generated_structures.h +++ b/firmware/controllers/generated/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:34 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:32:34 EDT 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -1918,7 +1918,7 @@ struct engine_configuration_s { int unusedAtOldBoardConfigurationEnd[68]; /** offset 1464 bit 0 */ - bool vvtDisplayInverted : 1; + bool unusedHereWeHave : 1; /** * Enables lambda sensor closed loop feedback for fuelling. offset 1464 bit 1 */ @@ -3455,4 +3455,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sat May 09 18:58:34 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:32:34 EDT 2020 diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index 5479e4763b..2c3f390727 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -2361,6 +2361,8 @@ #define unusedFlexFuelSensor_offset_hex c1c #define unusedHere_offset 761 #define unusedHere_offset_hex 2f9 +#define unusedHereWeHave_offset 1464 +#define unusedHereWeHave_offset_hex 5b8 #define unusedOldBiquad_offset 2332 #define unusedOldBiquad_offset_hex 91c #define unusedSomethingWasHere_offset 2417 @@ -2479,8 +2481,6 @@ #define vvt_mode_e_enum "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7" #define vvtCamSensorUseRise_offset 744 #define vvtCamSensorUseRise_offset_hex 2e8 -#define vvtDisplayInverted_offset 1464 -#define vvtDisplayInverted_offset_hex 5b8 #define vvtMode_offset 2328 #define vvtMode_offset_hex 918 #define vvtOffset_offset 2052 diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 542fb3745d..c80274d869 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -179,7 +179,7 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ vvtPosition -= tdcPosition(); fixAngle(vvtPosition, "vvtPosition", CUSTOM_ERR_6558); - tc->vvtPosition = (engineConfiguration->vvtDisplayInverted ? -vvtPosition : vvtPosition) + engineConfiguration->vvtOffset; + tc->vvtPosition = engineConfiguration->vvtOffset - vvtPosition; switch (engineConfiguration->vvtMode) { default: @@ -704,8 +704,7 @@ void onConfigurationChangeTriggerCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { isConfigurationChanged(triggerInputPins[2]) || isConfigurationChanged(vvtMode) || isConfigurationChanged(vvtCamSensorUseRise) || - isConfigurationChanged(vvtOffset) || - isConfigurationChanged(vvtDisplayInverted); + isConfigurationChanged(vvtOffset); if (changed) { assertEngineReference(); diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 06051a6485..124368bab4 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -887,7 +887,7 @@ custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:7], @@maf_sensor_type_e_enum@ int[68] unusedAtOldBoardConfigurationEnd; - bit vvtDisplayInverted + bit unusedHereWeHave bit fuelClosedLoopCorrectionEnabled;+Enables lambda sensor closed loop feedback for fuelling. bit isVerboseIAC;+Print details into rusEfi console bit isVerboseETB;+Prints ETB details to rusEFI console diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 7d7b71fe55..7fd5f3bc69 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1657,7 +1657,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT mode", vvtMode, {trigger_type != 80} field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset - field = "VVT display inverted", vvtDisplayInverted field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == @@TRIGGER_TYPE_60_2@@ || trigger_type == @@TRIGGER_TYPE_36_1@@} From a52952c6683fd3a49b76542dd18e31968e8d8fdb Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 01:55:23 -0400 Subject: [PATCH 18/39] Fresh generated - auto --- firmware/tunerstudio/rusefi.ini | 5 ++--- firmware/tunerstudio/rusefi_frankenso.ini | 5 ++--- firmware/tunerstudio/rusefi_kinetis.ini | 5 ++--- firmware/tunerstudio/rusefi_microrusefi.ini | 5 ++--- firmware/tunerstudio/rusefi_prometheus.ini | 5 ++--- firmware/tunerstudio/rusefi_proteus.ini | 5 ++--- .../models/src/com/rusefi/config/generated/Fields.java | 8 ++++---- 7 files changed, 16 insertions(+), 22 deletions(-) diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 7453cbbba4..771de7f8a7 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 00:25:55 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:52:33 EDT 2020 pageSize = 20000 page = 1 @@ -637,7 +637,7 @@ page = 1 engineCode = string, ASCII, 1128, 32 vehicleName = string, ASCII, 1160, 32 ;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1192 - vvtDisplayInverted = bits, U32, 1464, [0:0], "false", "true" + unusedHereWeHave = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" isVerboseETB = bits, U32, 1464, [3:3], "false", "true" @@ -2925,7 +2925,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT mode", vvtMode, {trigger_type != 80} field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset - field = "VVT display inverted", vvtDisplayInverted field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index 4b3274a0af..a3a1bbcf23 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 00:26:00 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:53:58 EDT 2020 pageSize = 20000 page = 1 @@ -637,7 +637,7 @@ page = 1 engineCode = string, ASCII, 1128, 32 vehicleName = string, ASCII, 1160, 32 ;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1192 - vvtDisplayInverted = bits, U32, 1464, [0:0], "false", "true" + unusedHereWeHave = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" isVerboseETB = bits, U32, 1464, [3:3], "false", "true" @@ -2925,7 +2925,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT mode", vvtMode, {trigger_type != 80} field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset - field = "VVT display inverted", vvtDisplayInverted field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} diff --git a/firmware/tunerstudio/rusefi_kinetis.ini b/firmware/tunerstudio/rusefi_kinetis.ini index b1f3b7fed1..eeee888018 100644 --- a/firmware/tunerstudio/rusefi_kinetis.ini +++ b/firmware/tunerstudio/rusefi_kinetis.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun May 10 00:26:06 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun May 10 01:54:15 EDT 2020 pageSize = 20000 page = 1 @@ -637,7 +637,7 @@ page = 1 engineCode = string, ASCII, 1128, 32 vehicleName = string, ASCII, 1160, 32 ;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1192 - vvtDisplayInverted = bits, U32, 1464, [0:0], "false", "true" + unusedHereWeHave = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" isVerboseETB = bits, U32, 1464, [3:3], "false", "true" @@ -2925,7 +2925,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT mode", vvtMode, {trigger_type != 80} field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset - field = "VVT display inverted", vvtDisplayInverted field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index 9b895193e1..ce9a83d00b 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 00:25:58 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:53:53 EDT 2020 pageSize = 20000 page = 1 @@ -637,7 +637,7 @@ page = 1 engineCode = string, ASCII, 1128, 32 vehicleName = string, ASCII, 1160, 32 ;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1192 - vvtDisplayInverted = bits, U32, 1464, [0:0], "false", "true" + unusedHereWeHave = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" isVerboseETB = bits, U32, 1464, [3:3], "false", "true" @@ -2916,7 +2916,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT mode", vvtMode, {trigger_type != 80} field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset - field = "VVT display inverted", vvtDisplayInverted field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index 1601ee2a37..b964adef88 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 00:26:03 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:54:10 EDT 2020 pageSize = 20000 page = 1 @@ -637,7 +637,7 @@ page = 1 engineCode = string, ASCII, 1128, 32 vehicleName = string, ASCII, 1160, 32 ;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1192 - vvtDisplayInverted = bits, U32, 1464, [0:0], "false", "true" + unusedHereWeHave = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" isVerboseETB = bits, U32, 1464, [3:3], "false", "true" @@ -2921,7 +2921,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT mode", vvtMode, {trigger_type != 80} field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset - field = "VVT display inverted", vvtDisplayInverted field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} diff --git a/firmware/tunerstudio/rusefi_proteus.ini b/firmware/tunerstudio/rusefi_proteus.ini index 4f7bc0925a..a43575d077 100644 --- a/firmware/tunerstudio/rusefi_proteus.ini +++ b/firmware/tunerstudio/rusefi_proteus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 00:26:05 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:54:12 EDT 2020 pageSize = 20000 page = 1 @@ -637,7 +637,7 @@ page = 1 engineCode = string, ASCII, 1128, 32 vehicleName = string, ASCII, 1160, 32 ;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1192 - vvtDisplayInverted = bits, U32, 1464, [0:0], "false", "true" + unusedHereWeHave = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" isVerboseETB = bits, U32, 1464, [3:3], "false", "true" @@ -2916,7 +2916,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT mode", vvtMode, {trigger_type != 80} field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset - field = "VVT display inverted", vvtDisplayInverted field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} diff --git a/java_console/models/src/com/rusefi/config/generated/Fields.java b/java_console/models/src/com/rusefi/config/generated/Fields.java index 24cc96a661..59ccc4e4ec 100644 --- a/java_console/models/src/com/rusefi/config/generated/Fields.java +++ b/java_console/models/src/com/rusefi/config/generated/Fields.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 00:25:55 EDT 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:52:33 EDT 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; @@ -1582,6 +1582,7 @@ public class Fields { public static final int unusedConsoleSerialTxPin_offset = 1818; public static final int unusedFlexFuelSensor_offset = 3100; public static final int unusedHere_offset = 761; + public static final int unusedHereWeHave_offset = 1464; public static final int unusedOldBiquad_offset = 2332; public static final int unusedSomethingWasHere_offset = 2417; public static final int unusedSomethingWasHere_offset_hex = 971; @@ -1647,7 +1648,6 @@ public class Fields { public static final int veTable_offset_hex = 4420; public static final int vRefAdcChannel_offset = 1470; public static final int vvtCamSensorUseRise_offset = 744; - public static final int vvtDisplayInverted_offset = 1464; public static final int vvtMode_offset = 2328; public static final int vvtMode_offset_hex = 918; public static final int vvtOffset_offset = 2052; @@ -2201,7 +2201,7 @@ public class Fields { public static final Field ENGINEMAKE = Field.create("ENGINEMAKE", 1096, FieldType.INT); public static final Field ENGINECODE = Field.create("ENGINECODE", 1128, FieldType.INT); public static final Field VEHICLENAME = Field.create("VEHICLENAME", 1160, FieldType.INT); - public static final Field VVTDISPLAYINVERTED = Field.create("VVTDISPLAYINVERTED", 1464, FieldType.BIT, 0); + public static final Field UNUSEDHEREWEHAVE = Field.create("UNUSEDHEREWEHAVE", 1464, FieldType.BIT, 0); public static final Field FUELCLOSEDLOOPCORRECTIONENABLED = Field.create("FUELCLOSEDLOOPCORRECTIONENABLED", 1464, FieldType.BIT, 1); public static final Field ISVERBOSEIAC = Field.create("ISVERBOSEIAC", 1464, FieldType.BIT, 2); public static final Field ISVERBOSEETB = Field.create("ISVERBOSEETB", 1464, FieldType.BIT, 3); @@ -3172,7 +3172,7 @@ public class Fields { ENGINEMAKE, ENGINECODE, VEHICLENAME, - VVTDISPLAYINVERTED, + UNUSEDHEREWEHAVE, FUELCLOSEDLOOPCORRECTIONENABLED, ISVERBOSEIAC, ISVERBOSEETB, From 3f7ca9224180f547ec0d488126c3b806ccdc4204 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 02:06:15 -0400 Subject: [PATCH 19/39] removing some unneeded flexibility --- unit_tests/tests/trigger/test_cam_vvt_input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unit_tests/tests/trigger/test_cam_vvt_input.cpp b/unit_tests/tests/trigger/test_cam_vvt_input.cpp index c1fe6f55da..7e945c1ffc 100644 --- a/unit_tests/tests/trigger/test_cam_vvt_input.cpp +++ b/unit_tests/tests/trigger/test_cam_vvt_input.cpp @@ -112,7 +112,7 @@ TEST(sensors, testCamInput) { // asserting that error code has cleared ASSERT_EQ(0, unitTestWarningCodeState.recentWarnings.getCount()) << "warningCounter#testCamInput #3"; - ASSERT_NEAR(181, engine->triggerCentral.getVVTPosition(), EPS3D); + ASSERT_NEAR(-181, engine->triggerCentral.getVVTPosition(), EPS3D); } TEST(sensors, testNB2CamInput) { From bb8a8149f8d8d1626761ec5b8a220d24d6befbc2 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 02:12:47 -0400 Subject: [PATCH 20/39] 34-2 3 cam Toyota wheel progress --- firmware/config/engines/toyota_jzs147.cpp | 2 -- firmware/tunerstudio/rusefi.input | 29 ++++++++++++----------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/firmware/config/engines/toyota_jzs147.cpp b/firmware/config/engines/toyota_jzs147.cpp index ffcc67ec27..b978594adc 100644 --- a/firmware/config/engines/toyota_jzs147.cpp +++ b/firmware/config/engines/toyota_jzs147.cpp @@ -103,8 +103,6 @@ void setToyota_jzs147EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void setToyota_2jz_vics(DECLARE_CONFIG_PARAMETER_SIGNATURE) { common2jz(PASS_CONFIG_PARAMETER_SIGNATURE); - engineConfiguration->isSdCardEnabled = true; - setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_36_2; diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 7fd5f3bc69..dde6bea4a1 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -389,20 +389,21 @@ enable2ndByteCanID = false ; wall of debug mode :) ; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "Event Position","", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "Ratio", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "Sync Counter", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" [ConstantsExtensions] ; defaultValue is used to provide TunerStudio with a value to use in the case of From e2b57893248673e48ee752c80666dc10e40df37f Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 02:23:28 -0400 Subject: [PATCH 21/39] Fresh generated - auto --- firmware/tunerstudio/rusefi.ini | 31 +++++++++++---------- firmware/tunerstudio/rusefi_frankenso.ini | 31 +++++++++++---------- firmware/tunerstudio/rusefi_microrusefi.ini | 31 +++++++++++---------- firmware/tunerstudio/rusefi_prometheus.ini | 31 +++++++++++---------- firmware/tunerstudio/rusefi_proteus.ini | 31 +++++++++++---------- 5 files changed, 80 insertions(+), 75 deletions(-) diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 771de7f8a7..05f85e31a5 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:52:33 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 02:23:09 EDT 2020 pageSize = 20000 page = 1 @@ -1646,20 +1646,21 @@ page = 1 ; wall of debug mode :) ; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "Event Position","", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "Ratio", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "Sync Counter", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" [ConstantsExtensions] ; defaultValue is used to provide TunerStudio with a value to use in the case of diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index a3a1bbcf23..e748c7c03f 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:53:58 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 02:23:15 EDT 2020 pageSize = 20000 page = 1 @@ -1646,20 +1646,21 @@ page = 1 ; wall of debug mode :) ; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "Event Position","", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "Ratio", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "Sync Counter", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" [ConstantsExtensions] ; defaultValue is used to provide TunerStudio with a value to use in the case of diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index ce9a83d00b..df61b2480c 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:53:53 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 02:23:13 EDT 2020 pageSize = 20000 page = 1 @@ -1646,20 +1646,21 @@ page = 1 ; wall of debug mode :) ; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "Event Position","", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "Ratio", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "Sync Counter", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" [ConstantsExtensions] ; defaultValue is used to provide TunerStudio with a value to use in the case of diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index b964adef88..3e99253591 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:54:10 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 02:23:18 EDT 2020 pageSize = 20000 page = 1 @@ -1646,20 +1646,21 @@ page = 1 ; wall of debug mode :) ; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "Event Position","", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "Ratio", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "Sync Counter", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" [ConstantsExtensions] ; defaultValue is used to provide TunerStudio with a value to use in the case of diff --git a/firmware/tunerstudio/rusefi_proteus.ini b/firmware/tunerstudio/rusefi_proteus.ini index a43575d077..beb697fc30 100644 --- a/firmware/tunerstudio/rusefi_proteus.ini +++ b/firmware/tunerstudio/rusefi_proteus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:54:12 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 02:23:20 EDT 2020 pageSize = 20000 page = 1 @@ -1646,20 +1646,21 @@ page = 1 ; wall of debug mode :) ; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "Event Position","", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "Ratio", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "Sync Counter", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" [ConstantsExtensions] ; defaultValue is used to provide TunerStudio with a value to use in the case of From a9b15e3ceee8a8d1d9dde185ad1a64274562c607 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 02:36:01 -0400 Subject: [PATCH 22/39] that's embarrassing --- .../controllers/algo/auto_generated_enums.cpp | 4 ++-- firmware/config/engines/toyota_jzs147.cpp | 2 +- firmware/controllers/algo/auto_generated_enums.cpp | 4 ++-- firmware/controllers/algo/rusefi_enums.h | 14 +++++++++++++- firmware/controllers/trigger/trigger_central.h | 4 ++++ 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp index 4d71158447..e1d6ab9059 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp +++ b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp @@ -1101,8 +1101,8 @@ case Force_4_bytes_size_vvt_mode: return "Force_4_bytes_size_vvt_mode"; case MIATA_NB2: return "MIATA_NB2"; -case VVT_2GZ: - return "VVT_2GZ"; +case VVT_2JZ: + return "VVT_2JZ"; case VVT_FIRST_HALF: return "VVT_FIRST_HALF"; case VVT_SECOND_HALF: diff --git a/firmware/config/engines/toyota_jzs147.cpp b/firmware/config/engines/toyota_jzs147.cpp index b978594adc..b6547caf39 100644 --- a/firmware/config/engines/toyota_jzs147.cpp +++ b/firmware/config/engines/toyota_jzs147.cpp @@ -110,7 +110,7 @@ void setToyota_2jz_vics(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; // cam sensor will he handled by custom vtti code engineConfiguration->camInputs[0] = GPIOC_6; - engineConfiguration->vvtMode = VVT_2GZ; + engineConfiguration->vvtMode = VVT_2JZ; // set global_trigger_offset_angle 155 engineConfiguration->globalTriggerAngleOffset = 155; // todo diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index 7f9ffb07a1..451fedf6bb 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -1245,8 +1245,8 @@ case Force_4_bytes_size_vvt_mode: return "Force_4_bytes_size_vvt_mode"; case MIATA_NB2: return "MIATA_NB2"; -case VVT_2GZ: - return "VVT_2GZ"; +case VVT_2JZ: + return "VVT_2JZ"; case VVT_FIRST_HALF: return "VVT_FIRST_HALF"; case VVT_SECOND_HALF: diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index f0655084a3..69b48ea11c 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -388,9 +388,21 @@ typedef enum { } trigger_event_e; typedef enum { + /** + * Single-tooth cam sensor mode where TDC and cam signal happen in the same 360 degree of 720 degree engine cycle + */ VVT_FIRST_HALF = 0, + /** + * Single-tooth cam sensor mode where TDC and cam signal happen in opposite 360 degree of 720 degree engine cycle + */ VVT_SECOND_HALF = 1, - VVT_2GZ = 2, + /** + * Toyota 2JZ has three cam tooth. We pick one of these three tooth to synchronize based on the expected angle position of the event + */ + VVT_2JZ = 2, + /** + * Mazda NB2 has three cam tooth. We synchronize based on gap ratio. + */ MIATA_NB2 = 3, Force_4_bytes_size_vvt_mode = ENUM_32_BITS, } vvt_mode_e; diff --git a/firmware/controllers/trigger/trigger_central.h b/firmware/controllers/trigger/trigger_central.h index d076f3c83d..07a169d7a8 100644 --- a/firmware/controllers/trigger/trigger_central.h +++ b/firmware/controllers/trigger/trigger_central.h @@ -50,7 +50,11 @@ public: angle_t getVVTPosition(); + // latest VVT event position (could be not synchronization event) + angle_t currentVVTEventPosition = 0; + // synchronization event position angle_t vvtPosition = 0; + /** * this is similar to TriggerState#startOfCycleNt but with the crank-only sensor magic */ From 36a742aa506d79244abf6ad07a566149e4ca67b1 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Sun, 10 May 2020 06:19:01 -0700 Subject: [PATCH 23/39] updates for proteus v0.3 (#1418) * updates for v0.3 * board config too * oops --- firmware/config/boards/proteus/board.mk | 11 +++++++---- .../config/boards/proteus/board_configuration.cpp | 4 +++- firmware/config/boards/proteus/mapping.yaml | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/firmware/config/boards/proteus/board.mk b/firmware/config/boards/proteus/board.mk index b849cc4150..a8c51c7ff0 100644 --- a/firmware/config/boards/proteus/board.mk +++ b/firmware/config/boards/proteus/board.mk @@ -18,10 +18,13 @@ else BOARDINC += $(PROJECT_DIR)/config/stm32f7ems # efifeatures/halconf/chconf.h LDSCRIPT= $(BOARDS_DIR)/nucleo_f767/STM32F76xxI.ld CONFDIR=config/stm32f4ems + PROTEUS_LEGACY=TRUE endif - - - # Override DEFAULT_ENGINE_TYPE -DDEFS += $(MCU_DEFS) -DEFI_USE_OSC=TRUE -DEFI_FATAL_ERROR_PIN=GPIOE_3 -DFIRMWARE_ID=\"proteus\" -DDEFAULT_ENGINE_TYPE=PROTEUS -DUSE_ADC3_VBATT_HACK -DSTM32_ADC_USE_ADC3=TRUE -DEFI_INCLUDE_ENGINE_PRESETS=FALSE -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE -DEFI_VEHICLE_SPEED=FALSE -DEFI_LOGIC_ANALYZER=FALSE +DDEFS += $(MCU_DEFS) -DEFI_USE_OSC=TRUE -DEFI_FATAL_ERROR_PIN=GPIOE_3 -DFIRMWARE_ID=\"proteus\" -DDEFAULT_ENGINE_TYPE=PROTEUS -DSTM32_ADC_USE_ADC3=TRUE -DEFI_INCLUDE_ENGINE_PRESETS=FALSE -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE -DEFI_VEHICLE_SPEED=FALSE -DEFI_LOGIC_ANALYZER=FALSE + +# Proteus <=v0.2 needs ADC hack - vbatt is on ADC3 +ifeq ($(PROTEUS_LEGACY),TRUE) + DDEFS += -DUSE_ADC3_VBATT_HACK +endif diff --git a/firmware/config/boards/proteus/board_configuration.cpp b/firmware/config/boards/proteus/board_configuration.cpp index ea9708dcee..ef97f66b8b 100644 --- a/firmware/config/boards/proteus/board_configuration.cpp +++ b/firmware/config/boards/proteus/board_configuration.cpp @@ -78,7 +78,9 @@ static void setupVbatt() { // 82k high side/10k low side = 9.2 engineConfiguration->vbattDividerCoeff = (92.0f / 10.0f); - //engineConfiguration->vbattAdcChannel = TODO; + + // Battery sense on PA7 + engineConfiguration->vbattAdcChannel = EFI_ADC_7; engineConfiguration->adcVcc = 3.3f; } diff --git a/firmware/config/boards/proteus/mapping.yaml b/firmware/config/boards/proteus/mapping.yaml index 212eef7031..ff9c6b33b7 100644 --- a/firmware/config/boards/proteus/mapping.yaml +++ b/firmware/config/boards/proteus/mapping.yaml @@ -73,7 +73,7 @@ analog_inputs: # PA6 - pin #18 EFI_ADC_6: "Analog Volt 11" # PA7 - EFI_ADC_7: "Analog Volt 12" + EFI_ADC_7: "Battery Sense" # CLT = Analog Temp 3 = PB0 EFI_ADC_8: "Analog Temp 3" # PB1 From 89d66ad1eb6c6a24f19c3151dff04aa017ebe62e Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 09:19:29 -0400 Subject: [PATCH 24/39] Fresh generated - auto --- firmware/tunerstudio/rusefi_proteus.ini | 66 ++++++++++++------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/firmware/tunerstudio/rusefi_proteus.ini b/firmware/tunerstudio/rusefi_proteus.ini index beb697fc30..c9293c9af9 100644 --- a/firmware/tunerstudio/rusefi_proteus.ini +++ b/firmware/tunerstudio/rusefi_proteus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 02:23:20 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 09:19:26 EDT 2020 pageSize = 20000 page = 1 @@ -147,7 +147,7 @@ page = 1 map_sensor_lowValue = scalar, F32, 236, "kpa", 1, 0, -400, 800, 2 map_sensor_highValue = scalar, F32, 240, "kpa", 1, 0, -400, 800, 2 map_sensor_type = bits, U32, 244, [0:7] "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "Bosch 2.5", "type11", "type12", "type13" - map_sensor_hwChannel = bits, U08, 248, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + map_sensor_hwChannel = bits, U08, 248, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping map_sensor_align offset 249 clt_tempC_1 = scalar, F32, 252, "*C", 1, 0, -40, 200, 1 clt_tempC_2 = scalar, F32, 256, "*C", 1, 0, -40, 200, 1 @@ -156,7 +156,7 @@ page = 1 clt_resistance_2 = scalar, F32, 268, "Ohm", 1, 0, 0, 200000, 1 clt_resistance_3 = scalar, F32, 272, "Ohm", 1, 0, 0, 200000, 1 clt_bias_resistor = scalar, F32, 276, "Ohm", 1, 0, 0, 200000, 1 - clt_adcChannel = bits, U08, 280, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + clt_adcChannel = bits, U08, 280, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping clt_alignmentFill_at_29 offset 281 iat_tempC_1 = scalar, F32, 284, "*C", 1, 0, -40, 200, 1 iat_tempC_2 = scalar, F32, 288, "*C", 1, 0, -40, 200, 1 @@ -165,7 +165,7 @@ page = 1 iat_resistance_2 = scalar, F32, 300, "Ohm", 1, 0, 0, 200000, 1 iat_resistance_3 = scalar, F32, 304, "Ohm", 1, 0, 0, 200000, 1 iat_bias_resistor = scalar, F32, 308, "Ohm", 1, 0, 0, 200000, 1 - iat_adcChannel = bits, U08, 312, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + iat_adcChannel = bits, U08, 312, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping iat_alignmentFill_at_29 offset 313 launchRpm = scalar, S32, 316, "rpm", 1, 0, 0, 20000.0, 2 launchTimingRetard = scalar, S32, 320, "deg", 1, 0, -180, 180, 2 @@ -202,10 +202,10 @@ page = 1 byFirmwareVersion = scalar, S32, 500, "index", 1, 0, 0, 300, 0 HD44780width = scalar, S32, 504, "index", 1, 0, 0, 300, 0 HD44780height = scalar, S32, 508, "index", 1, 0, 0, 300, 0 - tps1_1AdcChannel = bits, U08, 512, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - vbattAdcChannel = bits, U08, 513, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - fuelLevelSensor = bits, U08, 514, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - tps2_1AdcChannel = bits, U08, 515, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + tps1_1AdcChannel = bits, U08, 512, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + vbattAdcChannel = bits, U08, 513, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + fuelLevelSensor = bits, U08, 514, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + tps2_1AdcChannel = bits, U08, 515, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping overrideCrankingIgnition offset 516 sensorChartFrequency = scalar, S32, 520, "index", 1, 0, 0, 300, 0 ; size 4 trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "36/2", "trg49", "trg50", "INVALID" @@ -244,9 +244,9 @@ page = 1 trigger_customTotalToothCount = scalar, S32, 532, "number", 1, 0.0, 0, 500.0, 0 trigger_customSkippedToothCount = scalar, S32, 536, "number", 1, 0.0, 0, 500.0, 0 hip9011SpiDevice = bits,U32, 540, [0:7], "Off", "SPI1", "SPI2", "SPI3", "SPI4" - high_fuel_pressure_sensor_1 = bits, U08, 541, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - high_fuel_pressure_sensor_2 = bits, U08, 542, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - mafAdcChannel = bits, U08, 543, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + high_fuel_pressure_sensor_1 = bits, U08, 541, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + high_fuel_pressure_sensor_2 = bits, U08, 542, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + mafAdcChannel = bits, U08, 543, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" globalFuelCorrection = scalar, F32, 544, "coef", 1, 0.0, 0, 1000.0, 2 adcVcc = scalar, F32, 548, "volts", 1, 0.0, 0, 6.0, 3 maxKnockSubDeg = scalar, F32, 552, "Deg", 1, 0, 0, 100, 0 @@ -254,20 +254,20 @@ page = 1 camInputs2 = bits, U08, 557, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Digital 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","VR 1","VR 2","INVALID","INVALID","Digital 2","Digital 3","Digital 4","Digital 5","Digital 6","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" camInputs3 = bits, U08, 558, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Digital 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","VR 1","VR 2","INVALID","INVALID","Digital 2","Digital 3","Digital 4","Digital 5","Digital 6","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" camInputs4 = bits, U08, 559, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Digital 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","VR 1","VR 2","INVALID","INVALID","Digital 2","Digital 3","Digital 4","Digital 5","Digital 6","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" - afr_hwChannel = bits, U08, 560, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + afr_hwChannel = bits, U08, 560, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping afr_alignAf offset 561 afr_v1 = scalar, F32, 564, "volts", 1, 0.0, 0, 10.0, 2 afr_value1 = scalar, F32, 568, "AFR", 1, 0.0, 0, 1000.0, 2 afr_v2 = scalar, F32, 572, "volts", 1, 0.0, 0, 10.0, 2 afr_value2 = scalar, F32, 576, "AFR", 1, 0.0, 0, 1000.0, 2 - throttlePedalPositionAdcChannel = bits, U08, 580, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + throttlePedalPositionAdcChannel = bits, U08, 580, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" tle6240_cs = bits, U08, 581, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" tle6240_csPinMode = bits, U08, 582, [0:7], "default", "default inverted", "open collector", "open collector inverted" throttlePedalUpPin = bits, U08, 583, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Digital 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Digital 2","Digital 3","Digital 4","Digital 5","Digital 6","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" baroSensor_lowValue = scalar, F32, 584, "kpa", 1, 0, -400, 800, 2 baroSensor_highValue = scalar, F32, 588, "kpa", 1, 0, -400, 800, 2 baroSensor_type = bits, U32, 592, [0:7] "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "Bosch 2.5", "type11", "type12", "type13" - baroSensor_hwChannel = bits, U08, 596, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + baroSensor_hwChannel = bits, U08, 596, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping baroSensor_align offset 597 idle_solenoidFrequency = scalar, S32, 600, "Hz", 1, 0, 0, 3000, 0 idle_solenoidPin = bits, U08, 604, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 2","Highside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Lowside 8","Lowside 9","Lowside 10","Lowside 11","Lowside 12","Lowside 13","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 5","Ign 4","Ign 3","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 2","Ign 1","INVALID","INVALID","Lowside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 4","Highside 3","Lowside 14","Lowside 15","Lowside 16","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 12","Ign 11","Ign 10","Ign 9","Ign 8","Ign 7","Ign 6","Lowside 2","Lowside 3","Lowside 4","Lowside 5","Lowside 6","Lowside 7","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" @@ -334,10 +334,10 @@ page = 1 digitalPotentiometerSpiDevice = bits,U32, 677, [0:7], "Off", "SPI1", "SPI2", "SPI3", "SPI4" mc33972_cs = bits, U08, 678, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" mc33972_csPinMode = bits, U08, 679, [0:7], "default", "default inverted", "open collector", "open collector inverted" - auxFastSensor1_adcChannel = bits, U08, 680, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - tps1_2AdcChannel = bits, U08, 681, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - tps2_2AdcChannel = bits, U08, 682, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - throttlePedalPositionSecondAdcChannel = bits, U08, 683, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + auxFastSensor1_adcChannel = bits, U08, 680, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + tps1_2AdcChannel = bits, U08, 681, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + tps2_2AdcChannel = bits, U08, 682, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + throttlePedalPositionSecondAdcChannel = bits, U08, 683, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" fuelLevelEmptyTankVoltage = scalar, F32, 684, "V", 1, 0, 0,10, 2 fuelLevelFullTankVoltage = scalar, F32, 688, "V", 1, 0, 0,10, 2 afr_type = bits, S32, 692, [0:7], "BPSX", "Innovate", "14Point7", "Narrow", "PLX", "Custom" @@ -669,9 +669,9 @@ page = 1 useFSIO12ForIdleOffset = bits, U32, 1464, [29:29], "false", "true" useFSIO13ForIdleMinValue= bits, U32, 1464, [30:30], "false", "true" useFSIO6ForRevLimiter = bits, U32, 1464, [31:31], "false", "true" - hipOutputChannel = bits, U08, 1468, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - acSwitchAdc = bits, U08, 1469, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - vRefAdcChannel = bits, U08, 1470, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + hipOutputChannel = bits, U08, 1468, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + acSwitchAdc = bits, U08, 1469, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + vRefAdcChannel = bits, U08, 1470, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" etbNeutralPosition = scalar, U08, 1471, "%", 1, 0, 0, 100, 0 idleMode = bits, U32, 1472, [0:0], "Automatic", "Manual" isInjectionEnabled = bits, U32, 1476, [0:0], "false", "true" @@ -823,10 +823,10 @@ page = 1 boostCutPressure = scalar, F32, 2132, "kPa", 1, 0, 0, 500, 0 mapAccelTaperBins = array, F32, 2136, [8], "counter", 1, 0, 0.0, 300, 0 mapAccelTaperMult = array, F32, 2168, [8], "mult", 1, 0, 0.0, 300, 2 - fsioAdc1 = bits, U08, 2200, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - fsioAdc2 = bits, U08, 2201, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - fsioAdc3 = bits, U08, 2202, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - fsioAdc4 = bits, U08, 2203, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + fsioAdc1 = bits, U08, 2200, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + fsioAdc2 = bits, U08, 2201, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + fsioAdc3 = bits, U08, 2202, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + fsioAdc4 = bits, U08, 2203, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" fixedTiming = scalar, F32, 2204, "deg", 1, 0, -720, 720, 2 mapLowValueVoltage = scalar, F32, 2208, "v", 1, 0, 0.0, 10, 2 mapHighValueVoltage = scalar, F32, 2212, "v", 1, 0, 0.0, 10, 2 @@ -871,7 +871,7 @@ page = 1 auxTempSensor1_resistance_2 = scalar, F32, 2460, "Ohm", 1, 0, 0, 200000, 1 auxTempSensor1_resistance_3 = scalar, F32, 2464, "Ohm", 1, 0, 0, 200000, 1 auxTempSensor1_bias_resistor = scalar, F32, 2468, "Ohm", 1, 0, 0, 200000, 1 - auxTempSensor1_adcChannel = bits, U08, 2472, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + auxTempSensor1_adcChannel = bits, U08, 2472, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping auxTempSensor1_alignmentFill_at_29 offset 2473 auxTempSensor2_tempC_1 = scalar, F32, 2476, "*C", 1, 0, -40, 200, 1 auxTempSensor2_tempC_2 = scalar, F32, 2480, "*C", 1, 0, -40, 200, 1 @@ -880,7 +880,7 @@ page = 1 auxTempSensor2_resistance_2 = scalar, F32, 2492, "Ohm", 1, 0, 0, 200000, 1 auxTempSensor2_resistance_3 = scalar, F32, 2496, "Ohm", 1, 0, 0, 200000, 1 auxTempSensor2_bias_resistor = scalar, F32, 2500, "Ohm", 1, 0, 0, 200000, 1 - auxTempSensor2_adcChannel = bits, U08, 2504, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + auxTempSensor2_adcChannel = bits, U08, 2504, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping auxTempSensor2_alignmentFill_at_29 offset 2505 fuelClosedLoopCltThreshold = scalar, S16, 2508, "C", 1, 0, 0, 100, 0 fuelClosedLoopTpsThreshold = scalar, S16, 2510, "%", 1, 0, 0, 100, 0 @@ -922,8 +922,8 @@ page = 1 mc33816_rstb = bits, U08, 2606, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" mc33816_driven = bits, U08, 2607, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" brakePedalPin = bits, U08, 2608, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Digital 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Digital 2","Digital 3","Digital 4","Digital 5","Digital 6","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" - cj125ua = bits, U08, 2609, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - cj125ur = bits, U08, 2610, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + cj125ua = bits, U08, 2609, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + cj125ur = bits, U08, 2610, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" brakePedalPinMode = scalar, U08, 2611, "todo", 1, 0, 0, 20, 1 auxPid1_pFactor = scalar, F32, 2612, "", 1, 0, -10000, 10000, 4 auxPid1_iFactor = scalar, F32, 2616, "", 1, 0, -10000, 10000, 4 @@ -953,15 +953,15 @@ page = 1 auxPid4_periodMs = scalar, S16, 2686, "ms", 1, 0, 0, 3000, 0 auxPid4_minValue = scalar, S16, 2688, "", 1, 0, -30000, 30000.0, 0 auxPid4_maxValue = scalar, S16, 2690, "", 1, 0, -30000, 30000.0, 0 - oilPressure_hwChannel = bits, U08, 2692, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + oilPressure_hwChannel = bits, U08, 2692, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping oilPressure_align offset 2693 oilPressure_v1 = scalar, F32, 2696, "volts", 1, 0.0, 0, 10.0, 2 oilPressure_value1 = scalar, F32, 2700, "kPa", 1, 0.0, 0, 1000.0, 2 oilPressure_v2 = scalar, F32, 2704, "volts", 1, 0.0, 0, 10.0, 2 oilPressure_value2 = scalar, F32, 2708, "kPa", 1, 0.0, 0, 1000.0, 2 accelerometerSpiDevice = bits,U32, 2712, [0:7], "Off", "SPI1", "SPI2", "SPI3", "SPI4" - auxVoltage1 = bits, U08, 2713, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" - auxVoltage2 = bits, U08, 2714, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + auxVoltage1 = bits, U08, 2713, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + auxVoltage2 = bits, U08, 2714, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping unusedSpiPadding5 offset 2715 fsioCurve1Bins = array, F32, 2716, [16], "x", 1, 0, -999, 1000.0, 3 fsioCurve1 = array, F32, 2780, [16], "y", 1, 0, -999, 1000.0, 3 @@ -974,7 +974,7 @@ page = 1 ;no TS info - skipping unusedFlexFuelSensor offset 3100 test557pin = bits, U08, 3101, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" stepperDirectionPinMode = bits, U08, 3102, [0:7], "default", "default inverted", "open collector", "open collector inverted" - externalKnockSenseAdc = bits, U08, 3103, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" + externalKnockSenseAdc = bits, U08, 3103, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Battery Sense","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" stepperEnablePin = bits, U08, 3104, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" tle8888_cs = bits, U08, 3105, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" tle8888_csPinMode = bits, U08, 3106, [0:7], "default", "default inverted", "open collector", "open collector inverted" From ec38cdac95c26c34288ff54fe9f41f8f4f954a7d Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 10:11:51 -0400 Subject: [PATCH 25/39] mck1117:secondary-tps-config progress --- ...ngine_configuration_generated_structures.h | 30 ++++++++++++++----- firmware/controllers/algo/launch_control.cpp | 1 - ...ngine_configuration_generated_structures.h | 30 ++++++++++++++----- firmware/integration/rusefi_config.txt | 14 +++++---- 4 files changed, 53 insertions(+), 22 deletions(-) diff --git a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h index b17c617612..5c2f953207 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun May 10 01:32:43 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun May 10 10:09:06 EDT 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -762,12 +762,14 @@ struct engine_configuration_s { */ int16_t tpsMax; /** - * TPS error detection, what TPS % value is unrealistically low + * TPS error detection: what throttle % is unrealistically low? + * Also used for accelerator pedal error detection if so equiped. * offset 84 */ int16_t tpsErrorDetectionTooLow; /** - * TPS error detection, what TPS % value is unrealistically high + * TPS error detection: what throttle % is unrealistically high? + * Also used for accelerator pedal error detection if so equiped. * offset 86 */ int16_t tpsErrorDetectionTooHigh; @@ -1561,7 +1563,11 @@ struct engine_configuration_s { /** * offset 820 */ - float unusedAntilagTimeout; + uint16_t tps1SecondaryMin; + /** + * offset 822 + */ + uint16_t tps1SecondaryMax; /** * offset 824 */ @@ -1799,10 +1805,10 @@ struct engine_configuration_s { bool unusedBit_251_29 : 1; /** offset 976 bit 30 */ - bool unusedBit_282_30 : 1; + bool unusedBit_283_30 : 1; /** offset 976 bit 31 */ - bool unusedBit_282_31 : 1; + bool unusedBit_283_31 : 1; /** * offset 980 */ @@ -1915,7 +1921,15 @@ struct engine_configuration_s { /** * offset 1192 */ - int unusedAtOldBoardConfigurationEnd[68]; + int unusedAtOldBoardConfigurationEnd[67]; + /** + * offset 1460 + */ + uint16_t tps2SecondaryMin; + /** + * offset 1462 + */ + uint16_t tps2SecondaryMax; /** offset 1464 bit 0 */ bool unusedHereWeHave : 1; @@ -3455,4 +3469,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun May 10 01:32:43 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun May 10 10:09:06 EDT 2020 diff --git a/firmware/controllers/algo/launch_control.cpp b/firmware/controllers/algo/launch_control.cpp index 3d3921807d..75cdbc8608 100644 --- a/firmware/controllers/algo/launch_control.cpp +++ b/firmware/controllers/algo/launch_control.cpp @@ -135,7 +135,6 @@ void setDefaultLaunchParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->enableLaunchRetard = true; engineConfiguration->enableLaunchBoost = true; engineConfiguration->launchSmoothRetard = true; //interpolates the advance linear from launchrpm to fully retarded at launchtimingrpmrange - engineConfiguration->unusedAntilagTimeout = 3; engineConfiguration->antiLagRpmTreshold = 3000; } diff --git a/firmware/controllers/generated/engine_configuration_generated_structures.h b/firmware/controllers/generated/engine_configuration_generated_structures.h index fdcc29b47b..733e12c7f8 100644 --- a/firmware/controllers/generated/engine_configuration_generated_structures.h +++ b/firmware/controllers/generated/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:32:34 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 10:08:58 EDT 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -762,12 +762,14 @@ struct engine_configuration_s { */ int16_t tpsMax; /** - * TPS error detection, what TPS % value is unrealistically low + * TPS error detection: what throttle % is unrealistically low? + * Also used for accelerator pedal error detection if so equiped. * offset 84 */ int16_t tpsErrorDetectionTooLow; /** - * TPS error detection, what TPS % value is unrealistically high + * TPS error detection: what throttle % is unrealistically high? + * Also used for accelerator pedal error detection if so equiped. * offset 86 */ int16_t tpsErrorDetectionTooHigh; @@ -1561,7 +1563,11 @@ struct engine_configuration_s { /** * offset 820 */ - float unusedAntilagTimeout; + uint16_t tps1SecondaryMin; + /** + * offset 822 + */ + uint16_t tps1SecondaryMax; /** * offset 824 */ @@ -1799,10 +1805,10 @@ struct engine_configuration_s { bool unusedBit_251_29 : 1; /** offset 976 bit 30 */ - bool unusedBit_282_30 : 1; + bool unusedBit_283_30 : 1; /** offset 976 bit 31 */ - bool unusedBit_282_31 : 1; + bool unusedBit_283_31 : 1; /** * offset 980 */ @@ -1915,7 +1921,15 @@ struct engine_configuration_s { /** * offset 1192 */ - int unusedAtOldBoardConfigurationEnd[68]; + int unusedAtOldBoardConfigurationEnd[67]; + /** + * offset 1460 + */ + uint16_t tps2SecondaryMin; + /** + * offset 1462 + */ + uint16_t tps2SecondaryMax; /** offset 1464 bit 0 */ bool unusedHereWeHave : 1; @@ -3455,4 +3469,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:32:34 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 10:08:58 EDT 2020 diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 124368bab4..8f7bcae5ca 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -411,8 +411,8 @@ bit issue_294_31,si_example,nada_example; int16_t tpsMin;Closed throttle. todo: extract these two fields into a structure\nSee also tps1_1AdcChannel\nset tps_min X;"ADC", 1, 0, 0, 1023, 0 int16_t tpsMax;Full throttle. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps_max X;"ADC", 1, 0, 0, 1023, 0 -int16_t tpsErrorDetectionTooLow;+TPS error detection, what TPS % value is unrealistically low;"%", 1, 0, -40, 200, 0 -int16_t tpsErrorDetectionTooHigh;+TPS error detection, what TPS % value is unrealistically high;"%", 1, 0, -40, 200, 0 +int16_t tpsErrorDetectionTooLow;+TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, -10, 0, 0 +int16_t tpsErrorDetectionTooHigh;+TPS error detection: what throttle % is unrealistically high?\nAlso used for accelerator pedal error detection if so equiped.;"%", 1, 0, 100, 110, 0 cranking_parameters_s cranking float primingSquirtDurationMs;;"*C", 1, 0, -40, 200, 1 @@ -748,7 +748,8 @@ custom uart_device_e 1 bits,U32, @OFFSET@, [0:7], "Off", "UART1", "UART2", "UA int mapMinBufferLength;;"count", 1, 0, 0, 24, 0 int16_t idlePidDeactivationTpsThreshold;;"%", 1, 0, 0, 100.0, 0 int16_t stepperParkingExtraSteps;;"%", 1, 0, 0, 3000.0, 0 - float unusedAntilagTimeout; + uint16_t tps1SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps1SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 int16_t antiLagRpmTreshold; int16_t startCrankingDuration;Maximum time to crank starter;"Seconds", 1, 0, 0, 30, 0 @@ -884,8 +885,11 @@ custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:7], @@maf_sensor_type_e_enum@ vehicle_info_t engineMake;+For example, BMW, GM or Chevrolet\nREQUIRED for rusEFI Online vehicle_info_t engineCode;+For example, LS1 or NB2\nREQUIRED for rusEFI Online vehicle_info_t vehicleName;+For example, Hunchback or Orange Miata\nVehicle name has to be unique between your vehicles.\nREQUIRED for rusEFI Online - - int[68] unusedAtOldBoardConfigurationEnd; + + int[67] unusedAtOldBoardConfigurationEnd; + + uint16_t tps2SecondaryMin;;"ADC", 1, 0, 0, 1000, 0 + uint16_t tps2SecondaryMax;;"ADC", 1, 0, 0, 1000, 0 bit unusedHereWeHave bit fuelClosedLoopCorrectionEnabled;+Enables lambda sensor closed loop feedback for fuelling. From 43e2ffd27aac9c42dba595ec3facd2396cf8ffe5 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 10:32:49 -0400 Subject: [PATCH 26/39] Fresh generated - auto --- .../controllers/algo/rusefi_generated.h | 18 ++++--- .../controllers/generated/rusefi_generated.h | 18 ++++--- firmware/tunerstudio/rusefi.ini | 19 ++++---- firmware/tunerstudio/rusefi_frankenso.ini | 19 ++++---- firmware/tunerstudio/rusefi_kinetis.ini | 48 ++++++++++--------- firmware/tunerstudio/rusefi_microrusefi.ini | 19 ++++---- firmware/tunerstudio/rusefi_prometheus.ini | 19 ++++---- firmware/tunerstudio/rusefi_proteus.ini | 19 ++++---- .../com/rusefi/config/generated/Fields.java | 32 ++++++++----- 9 files changed, 126 insertions(+), 85 deletions(-) diff --git a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h index dee51ca550..068ab5777a 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -2101,6 +2101,10 @@ #define tps1_1AdcChannel_offset_hex 200 #define tps1_2AdcChannel_offset 681 #define tps1_2AdcChannel_offset_hex 2a9 +#define tps1SecondaryMax_offset 822 +#define tps1SecondaryMax_offset_hex 336 +#define tps1SecondaryMin_offset 820 +#define tps1SecondaryMin_offset_hex 334 #define tps2_1AdcChannel_offset 515 #define tps2_1AdcChannel_offset_hex 203 #define tps2_2AdcChannel_offset 682 @@ -2109,6 +2113,10 @@ #define tps2Max_offset_hex 6ea #define tps2Min_offset 1768 #define tps2Min_offset_hex 6e8 +#define tps2SecondaryMax_offset 1462 +#define tps2SecondaryMax_offset_hex 5b6 +#define tps2SecondaryMin_offset 1460 +#define tps2SecondaryMin_offset_hex 5b4 #define TPS_1_BYTE_PACKING_MULT 2 #define TPS_TPS_ACCEL_TABLE 8 #define tpsAccelEnrichmentThreshold_offset 2048 @@ -2303,8 +2311,6 @@ #define unused_1484_bit_31_offset_hex 5c4 #define unused_former_warmup_target_afr_offset 2100 #define unused_former_warmup_target_afr_offset_hex 834 -#define unusedAntilagTimeout_offset 820 -#define unusedAntilagTimeout_offset_hex 334 #define unusedAtOldBoardConfigurationEnd_offset 1192 #define unusedAtOldBoardConfigurationEnd_offset_hex 4a8 #define unusedBit4_1476_offset 1476 @@ -2347,10 +2353,10 @@ #define unusedBit_251_28_offset_hex 3d0 #define unusedBit_251_29_offset 976 #define unusedBit_251_29_offset_hex 3d0 -#define unusedBit_282_30_offset 976 -#define unusedBit_282_30_offset_hex 3d0 -#define unusedBit_282_31_offset 976 -#define unusedBit_282_31_offset_hex 3d0 +#define unusedBit_283_30_offset 976 +#define unusedBit_283_30_offset_hex 3d0 +#define unusedBit_283_31_offset 976 +#define unusedBit_283_31_offset_hex 3d0 #define unusedBit_34_31_offset 76 #define unusedBit_34_31_offset_hex 4c #define unusedConsoleSerialRxPin_offset 1819 diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index 2c3f390727..4be9c8b497 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -2101,6 +2101,10 @@ #define tps1_1AdcChannel_offset_hex 200 #define tps1_2AdcChannel_offset 681 #define tps1_2AdcChannel_offset_hex 2a9 +#define tps1SecondaryMax_offset 822 +#define tps1SecondaryMax_offset_hex 336 +#define tps1SecondaryMin_offset 820 +#define tps1SecondaryMin_offset_hex 334 #define tps2_1AdcChannel_offset 515 #define tps2_1AdcChannel_offset_hex 203 #define tps2_2AdcChannel_offset 682 @@ -2109,6 +2113,10 @@ #define tps2Max_offset_hex 6ea #define tps2Min_offset 1768 #define tps2Min_offset_hex 6e8 +#define tps2SecondaryMax_offset 1462 +#define tps2SecondaryMax_offset_hex 5b6 +#define tps2SecondaryMin_offset 1460 +#define tps2SecondaryMin_offset_hex 5b4 #define TPS_1_BYTE_PACKING_MULT 2 #define TPS_TPS_ACCEL_TABLE 8 #define tpsAccelEnrichmentThreshold_offset 2048 @@ -2303,8 +2311,6 @@ #define unused_1484_bit_31_offset_hex 5c4 #define unused_former_warmup_target_afr_offset 2100 #define unused_former_warmup_target_afr_offset_hex 834 -#define unusedAntilagTimeout_offset 820 -#define unusedAntilagTimeout_offset_hex 334 #define unusedAtOldBoardConfigurationEnd_offset 1192 #define unusedAtOldBoardConfigurationEnd_offset_hex 4a8 #define unusedBit4_1476_offset 1476 @@ -2347,10 +2353,10 @@ #define unusedBit_251_28_offset_hex 3d0 #define unusedBit_251_29_offset 976 #define unusedBit_251_29_offset_hex 3d0 -#define unusedBit_282_30_offset 976 -#define unusedBit_282_30_offset_hex 3d0 -#define unusedBit_282_31_offset 976 -#define unusedBit_282_31_offset_hex 3d0 +#define unusedBit_283_30_offset 976 +#define unusedBit_283_30_offset_hex 3d0 +#define unusedBit_283_31_offset 976 +#define unusedBit_283_31_offset_hex 3d0 #define unusedBit_34_31_offset 76 #define unusedBit_34_31_offset_hex 4c #define unusedConsoleSerialRxPin_offset 1819 diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 05f85e31a5..84a6910c41 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 02:23:09 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 10:32:15 EDT 2020 pageSize = 20000 page = 1 @@ -132,8 +132,8 @@ page = 1 unusedBit_34_31 = bits, U32, 76, [31:31], "false", "true" tpsMin = scalar, S16, 80, "ADC", 1, 0, 0, 1023, 0 tpsMax = scalar, S16, 82, "ADC", 1, 0, 0, 1023, 0 - tpsErrorDetectionTooLow = scalar, S16, 84, "%", 1, 0, -40, 200, 0 - tpsErrorDetectionTooHigh = scalar, S16, 86, "%", 1, 0, -40, 200, 0 + tpsErrorDetectionTooLow = scalar, S16, 84, "%", 1, 0, -10, 0, 0 + tpsErrorDetectionTooHigh = scalar, S16, 86, "%", 1, 0, 100, 110, 0 cranking_baseFuel = scalar, F32, 88, "ms", 1, 0, 0, 200, 1 cranking_rpm = scalar, S16, 92, "RPM", 1, 0, 0, 3000, 0 ;no TS info - skipping cranking_alignmentFill_at_6 offset 94 @@ -461,7 +461,8 @@ page = 1 mapMinBufferLength = scalar, S32, 812, "count", 1, 0, 0, 24, 0 idlePidDeactivationTpsThreshold = scalar, S16, 816, "%", 1, 0, 0, 100.0, 0 stepperParkingExtraSteps = scalar, S16, 818, "%", 1, 0, 0, 3000.0, 0 -;no TS info - skipping unusedAntilagTimeout offset 820 + tps1SecondaryMin = scalar, U16, 820, "ADC", 1, 0, 0, 1000, 0 + tps1SecondaryMax = scalar, U16, 822, "ADC", 1, 0, 0, 1000, 0 ;no TS info - skipping antiLagRpmTreshold offset 824 startCrankingDuration = scalar, S16, 826, "Seconds", 1, 0, 0, 30, 0 triggerErrorPin = bits, U08, 828, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -571,8 +572,8 @@ page = 1 unusedBit_251_27 = bits, U32, 976, [27:27], "false", "true" unusedBit_251_28 = bits, U32, 976, [28:28], "false", "true" unusedBit_251_29 = bits, U32, 976, [29:29], "false", "true" - unusedBit_282_30 = bits, U32, 976, [30:30], "false", "true" - unusedBit_282_31 = bits, U32, 976, [31:31], "false", "true" + unusedBit_283_30 = bits, U32, 976, [30:30], "false", "true" + unusedBit_283_31 = bits, U32, 976, [31:31], "false", "true" etbIo1_directionPin1 = bits, U08, 980, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_directionPin2 = bits, U08, 981, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_controlPin1 = bits, U08, 982, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -637,6 +638,8 @@ page = 1 engineCode = string, ASCII, 1128, 32 vehicleName = string, ASCII, 1160, 32 ;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1192 + tps2SecondaryMin = scalar, U16, 1460, "ADC", 1, 0, 0, 1000, 0 + tps2SecondaryMax = scalar, U16, 1462, "ADC", 1, 0, 0, 1000, 0 unusedHereWeHave = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" @@ -1181,8 +1184,8 @@ page = 1 etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" - tpsErrorDetectionTooLow = "TPS error detection, what TPS % value is unrealistically low" - tpsErrorDetectionTooHigh = "TPS error detection, what TPS % value is unrealistically high" + tpsErrorDetectionTooLow = "TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped." + tpsErrorDetectionTooHigh = "TPS error detection: what throttle % is unrealistically high?\nAlso used for accelerator pedal error detection if so equiped." cranking_baseFuel = "Base duration of the fuel injection during cranking, this is modified by the multipliers for CLT, IAT, TPS ect, to give the final cranking pulse width." cranking_rpm = "This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X" crankingChargeAngle = "While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.\nset cranking_charge_angle X" diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index e748c7c03f..a1c186d0b8 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 02:23:15 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 10:32:26 EDT 2020 pageSize = 20000 page = 1 @@ -132,8 +132,8 @@ page = 1 unusedBit_34_31 = bits, U32, 76, [31:31], "false", "true" tpsMin = scalar, S16, 80, "ADC", 1, 0, 0, 1023, 0 tpsMax = scalar, S16, 82, "ADC", 1, 0, 0, 1023, 0 - tpsErrorDetectionTooLow = scalar, S16, 84, "%", 1, 0, -40, 200, 0 - tpsErrorDetectionTooHigh = scalar, S16, 86, "%", 1, 0, -40, 200, 0 + tpsErrorDetectionTooLow = scalar, S16, 84, "%", 1, 0, -10, 0, 0 + tpsErrorDetectionTooHigh = scalar, S16, 86, "%", 1, 0, 100, 110, 0 cranking_baseFuel = scalar, F32, 88, "ms", 1, 0, 0, 200, 1 cranking_rpm = scalar, S16, 92, "RPM", 1, 0, 0, 3000, 0 ;no TS info - skipping cranking_alignmentFill_at_6 offset 94 @@ -461,7 +461,8 @@ page = 1 mapMinBufferLength = scalar, S32, 812, "count", 1, 0, 0, 24, 0 idlePidDeactivationTpsThreshold = scalar, S16, 816, "%", 1, 0, 0, 100.0, 0 stepperParkingExtraSteps = scalar, S16, 818, "%", 1, 0, 0, 3000.0, 0 -;no TS info - skipping unusedAntilagTimeout offset 820 + tps1SecondaryMin = scalar, U16, 820, "ADC", 1, 0, 0, 1000, 0 + tps1SecondaryMax = scalar, U16, 822, "ADC", 1, 0, 0, 1000, 0 ;no TS info - skipping antiLagRpmTreshold offset 824 startCrankingDuration = scalar, S16, 826, "Seconds", 1, 0, 0, 30, 0 triggerErrorPin = bits, U08, 828, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -571,8 +572,8 @@ page = 1 unusedBit_251_27 = bits, U32, 976, [27:27], "false", "true" unusedBit_251_28 = bits, U32, 976, [28:28], "false", "true" unusedBit_251_29 = bits, U32, 976, [29:29], "false", "true" - unusedBit_282_30 = bits, U32, 976, [30:30], "false", "true" - unusedBit_282_31 = bits, U32, 976, [31:31], "false", "true" + unusedBit_283_30 = bits, U32, 976, [30:30], "false", "true" + unusedBit_283_31 = bits, U32, 976, [31:31], "false", "true" etbIo1_directionPin1 = bits, U08, 980, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_directionPin2 = bits, U08, 981, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_controlPin1 = bits, U08, 982, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -637,6 +638,8 @@ page = 1 engineCode = string, ASCII, 1128, 32 vehicleName = string, ASCII, 1160, 32 ;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1192 + tps2SecondaryMin = scalar, U16, 1460, "ADC", 1, 0, 0, 1000, 0 + tps2SecondaryMax = scalar, U16, 1462, "ADC", 1, 0, 0, 1000, 0 unusedHereWeHave = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" @@ -1181,8 +1184,8 @@ page = 1 etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" - tpsErrorDetectionTooLow = "TPS error detection, what TPS % value is unrealistically low" - tpsErrorDetectionTooHigh = "TPS error detection, what TPS % value is unrealistically high" + tpsErrorDetectionTooLow = "TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped." + tpsErrorDetectionTooHigh = "TPS error detection: what throttle % is unrealistically high?\nAlso used for accelerator pedal error detection if so equiped." cranking_baseFuel = "Base duration of the fuel injection during cranking, this is modified by the multipliers for CLT, IAT, TPS ect, to give the final cranking pulse width." cranking_rpm = "This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X" crankingChargeAngle = "While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.\nset cranking_charge_angle X" diff --git a/firmware/tunerstudio/rusefi_kinetis.ini b/firmware/tunerstudio/rusefi_kinetis.ini index eeee888018..c29c77fa91 100644 --- a/firmware/tunerstudio/rusefi_kinetis.ini +++ b/firmware/tunerstudio/rusefi_kinetis.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun May 10 01:54:15 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun May 10 10:32:30 EDT 2020 pageSize = 20000 page = 1 @@ -132,8 +132,8 @@ page = 1 unusedBit_34_31 = bits, U32, 76, [31:31], "false", "true" tpsMin = scalar, S16, 80, "ADC", 1, 0, 0, 1023, 0 tpsMax = scalar, S16, 82, "ADC", 1, 0, 0, 1023, 0 - tpsErrorDetectionTooLow = scalar, S16, 84, "%", 1, 0, -40, 200, 0 - tpsErrorDetectionTooHigh = scalar, S16, 86, "%", 1, 0, -40, 200, 0 + tpsErrorDetectionTooLow = scalar, S16, 84, "%", 1, 0, -10, 0, 0 + tpsErrorDetectionTooHigh = scalar, S16, 86, "%", 1, 0, 100, 110, 0 cranking_baseFuel = scalar, F32, 88, "ms", 1, 0, 0, 200, 1 cranking_rpm = scalar, S16, 92, "RPM", 1, 0, 0, 3000, 0 ;no TS info - skipping cranking_alignmentFill_at_6 offset 94 @@ -461,7 +461,8 @@ page = 1 mapMinBufferLength = scalar, S32, 812, "count", 1, 0, 0, 24, 0 idlePidDeactivationTpsThreshold = scalar, S16, 816, "%", 1, 0, 0, 100.0, 0 stepperParkingExtraSteps = scalar, S16, 818, "%", 1, 0, 0, 3000.0, 0 -;no TS info - skipping unusedAntilagTimeout offset 820 + tps1SecondaryMin = scalar, U16, 820, "ADC", 1, 0, 0, 1000, 0 + tps1SecondaryMax = scalar, U16, 822, "ADC", 1, 0, 0, 1000, 0 ;no TS info - skipping antiLagRpmTreshold offset 824 startCrankingDuration = scalar, S16, 826, "Seconds", 1, 0, 0, 30, 0 triggerErrorPin = bits, U08, 828, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" @@ -571,8 +572,8 @@ page = 1 unusedBit_251_27 = bits, U32, 976, [27:27], "false", "true" unusedBit_251_28 = bits, U32, 976, [28:28], "false", "true" unusedBit_251_29 = bits, U32, 976, [29:29], "false", "true" - unusedBit_282_30 = bits, U32, 976, [30:30], "false", "true" - unusedBit_282_31 = bits, U32, 976, [31:31], "false", "true" + unusedBit_283_30 = bits, U32, 976, [30:30], "false", "true" + unusedBit_283_31 = bits, U32, 976, [31:31], "false", "true" etbIo1_directionPin1 = bits, U08, 980, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" etbIo1_directionPin2 = bits, U08, 981, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" etbIo1_controlPin1 = bits, U08, 982, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" @@ -637,6 +638,8 @@ page = 1 engineCode = string, ASCII, 1128, 32 vehicleName = string, ASCII, 1160, 32 ;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1192 + tps2SecondaryMin = scalar, U16, 1460, "ADC", 1, 0, 0, 1000, 0 + tps2SecondaryMax = scalar, U16, 1462, "ADC", 1, 0, 0, 1000, 0 unusedHereWeHave = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" @@ -1181,8 +1184,8 @@ page = 1 etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" - tpsErrorDetectionTooLow = "TPS error detection, what TPS % value is unrealistically low" - tpsErrorDetectionTooHigh = "TPS error detection, what TPS % value is unrealistically high" + tpsErrorDetectionTooLow = "TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped." + tpsErrorDetectionTooHigh = "TPS error detection: what throttle % is unrealistically high?\nAlso used for accelerator pedal error detection if so equiped." cranking_baseFuel = "Base duration of the fuel injection during cranking, this is modified by the multipliers for CLT, IAT, TPS ect, to give the final cranking pulse width." cranking_rpm = "This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X" crankingChargeAngle = "While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.\nset cranking_charge_angle X" @@ -1646,20 +1649,21 @@ page = 1 ; wall of debug mode :) ; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "Event Position","", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "Ratio", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "Sync Counter", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" [ConstantsExtensions] ; defaultValue is used to provide TunerStudio with a value to use in the case of diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index df61b2480c..817add7f5d 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 02:23:13 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 10:32:25 EDT 2020 pageSize = 20000 page = 1 @@ -132,8 +132,8 @@ page = 1 unusedBit_34_31 = bits, U32, 76, [31:31], "false", "true" tpsMin = scalar, S16, 80, "ADC", 1, 0, 0, 1023, 0 tpsMax = scalar, S16, 82, "ADC", 1, 0, 0, 1023, 0 - tpsErrorDetectionTooLow = scalar, S16, 84, "%", 1, 0, -40, 200, 0 - tpsErrorDetectionTooHigh = scalar, S16, 86, "%", 1, 0, -40, 200, 0 + tpsErrorDetectionTooLow = scalar, S16, 84, "%", 1, 0, -10, 0, 0 + tpsErrorDetectionTooHigh = scalar, S16, 86, "%", 1, 0, 100, 110, 0 cranking_baseFuel = scalar, F32, 88, "ms", 1, 0, 0, 200, 1 cranking_rpm = scalar, S16, 92, "RPM", 1, 0, 0, 3000, 0 ;no TS info - skipping cranking_alignmentFill_at_6 offset 94 @@ -461,7 +461,8 @@ page = 1 mapMinBufferLength = scalar, S32, 812, "count", 1, 0, 0, 24, 0 idlePidDeactivationTpsThreshold = scalar, S16, 816, "%", 1, 0, 0, 100.0, 0 stepperParkingExtraSteps = scalar, S16, 818, "%", 1, 0, 0, 3000.0, 0 -;no TS info - skipping unusedAntilagTimeout offset 820 + tps1SecondaryMin = scalar, U16, 820, "ADC", 1, 0, 0, 1000, 0 + tps1SecondaryMax = scalar, U16, 822, "ADC", 1, 0, 0, 1000, 0 ;no TS info - skipping antiLagRpmTreshold offset 824 startCrankingDuration = scalar, S16, 826, "Seconds", 1, 0, 0, 30, 0 triggerErrorPin = bits, U08, 828, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -571,8 +572,8 @@ page = 1 unusedBit_251_27 = bits, U32, 976, [27:27], "false", "true" unusedBit_251_28 = bits, U32, 976, [28:28], "false", "true" unusedBit_251_29 = bits, U32, 976, [29:29], "false", "true" - unusedBit_282_30 = bits, U32, 976, [30:30], "false", "true" - unusedBit_282_31 = bits, U32, 976, [31:31], "false", "true" + unusedBit_283_30 = bits, U32, 976, [30:30], "false", "true" + unusedBit_283_31 = bits, U32, 976, [31:31], "false", "true" etbIo1_directionPin1 = bits, U08, 980, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_directionPin2 = bits, U08, 981, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_controlPin1 = bits, U08, 982, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -637,6 +638,8 @@ page = 1 engineCode = string, ASCII, 1128, 32 vehicleName = string, ASCII, 1160, 32 ;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1192 + tps2SecondaryMin = scalar, U16, 1460, "ADC", 1, 0, 0, 1000, 0 + tps2SecondaryMax = scalar, U16, 1462, "ADC", 1, 0, 0, 1000, 0 unusedHereWeHave = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" @@ -1181,8 +1184,8 @@ page = 1 etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" - tpsErrorDetectionTooLow = "TPS error detection, what TPS % value is unrealistically low" - tpsErrorDetectionTooHigh = "TPS error detection, what TPS % value is unrealistically high" + tpsErrorDetectionTooLow = "TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped." + tpsErrorDetectionTooHigh = "TPS error detection: what throttle % is unrealistically high?\nAlso used for accelerator pedal error detection if so equiped." cranking_baseFuel = "Base duration of the fuel injection during cranking, this is modified by the multipliers for CLT, IAT, TPS ect, to give the final cranking pulse width." cranking_rpm = "This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X" crankingChargeAngle = "While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.\nset cranking_charge_angle X" diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index 3e99253591..5d30333039 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 02:23:18 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 10:32:27 EDT 2020 pageSize = 20000 page = 1 @@ -132,8 +132,8 @@ page = 1 unusedBit_34_31 = bits, U32, 76, [31:31], "false", "true" tpsMin = scalar, S16, 80, "ADC", 1, 0, 0, 1023, 0 tpsMax = scalar, S16, 82, "ADC", 1, 0, 0, 1023, 0 - tpsErrorDetectionTooLow = scalar, S16, 84, "%", 1, 0, -40, 200, 0 - tpsErrorDetectionTooHigh = scalar, S16, 86, "%", 1, 0, -40, 200, 0 + tpsErrorDetectionTooLow = scalar, S16, 84, "%", 1, 0, -10, 0, 0 + tpsErrorDetectionTooHigh = scalar, S16, 86, "%", 1, 0, 100, 110, 0 cranking_baseFuel = scalar, F32, 88, "ms", 1, 0, 0, 200, 1 cranking_rpm = scalar, S16, 92, "RPM", 1, 0, 0, 3000, 0 ;no TS info - skipping cranking_alignmentFill_at_6 offset 94 @@ -461,7 +461,8 @@ page = 1 mapMinBufferLength = scalar, S32, 812, "count", 1, 0, 0, 24, 0 idlePidDeactivationTpsThreshold = scalar, S16, 816, "%", 1, 0, 0, 100.0, 0 stepperParkingExtraSteps = scalar, S16, 818, "%", 1, 0, 0, 3000.0, 0 -;no TS info - skipping unusedAntilagTimeout offset 820 + tps1SecondaryMin = scalar, U16, 820, "ADC", 1, 0, 0, 1000, 0 + tps1SecondaryMax = scalar, U16, 822, "ADC", 1, 0, 0, 1000, 0 ;no TS info - skipping antiLagRpmTreshold offset 824 startCrankingDuration = scalar, S16, 826, "Seconds", 1, 0, 0, 30, 0 triggerErrorPin = bits, U08, 828, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -571,8 +572,8 @@ page = 1 unusedBit_251_27 = bits, U32, 976, [27:27], "false", "true" unusedBit_251_28 = bits, U32, 976, [28:28], "false", "true" unusedBit_251_29 = bits, U32, 976, [29:29], "false", "true" - unusedBit_282_30 = bits, U32, 976, [30:30], "false", "true" - unusedBit_282_31 = bits, U32, 976, [31:31], "false", "true" + unusedBit_283_30 = bits, U32, 976, [30:30], "false", "true" + unusedBit_283_31 = bits, U32, 976, [31:31], "false", "true" etbIo1_directionPin1 = bits, U08, 980, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_directionPin2 = bits, U08, 981, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_controlPin1 = bits, U08, 982, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -637,6 +638,8 @@ page = 1 engineCode = string, ASCII, 1128, 32 vehicleName = string, ASCII, 1160, 32 ;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1192 + tps2SecondaryMin = scalar, U16, 1460, "ADC", 1, 0, 0, 1000, 0 + tps2SecondaryMax = scalar, U16, 1462, "ADC", 1, 0, 0, 1000, 0 unusedHereWeHave = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" @@ -1181,8 +1184,8 @@ page = 1 etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" - tpsErrorDetectionTooLow = "TPS error detection, what TPS % value is unrealistically low" - tpsErrorDetectionTooHigh = "TPS error detection, what TPS % value is unrealistically high" + tpsErrorDetectionTooLow = "TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped." + tpsErrorDetectionTooHigh = "TPS error detection: what throttle % is unrealistically high?\nAlso used for accelerator pedal error detection if so equiped." cranking_baseFuel = "Base duration of the fuel injection during cranking, this is modified by the multipliers for CLT, IAT, TPS ect, to give the final cranking pulse width." cranking_rpm = "This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X" crankingChargeAngle = "While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.\nset cranking_charge_angle X" diff --git a/firmware/tunerstudio/rusefi_proteus.ini b/firmware/tunerstudio/rusefi_proteus.ini index c9293c9af9..9152b4af25 100644 --- a/firmware/tunerstudio/rusefi_proteus.ini +++ b/firmware/tunerstudio/rusefi_proteus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 09:19:26 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 10:32:28 EDT 2020 pageSize = 20000 page = 1 @@ -132,8 +132,8 @@ page = 1 unusedBit_34_31 = bits, U32, 76, [31:31], "false", "true" tpsMin = scalar, S16, 80, "ADC", 1, 0, 0, 1023, 0 tpsMax = scalar, S16, 82, "ADC", 1, 0, 0, 1023, 0 - tpsErrorDetectionTooLow = scalar, S16, 84, "%", 1, 0, -40, 200, 0 - tpsErrorDetectionTooHigh = scalar, S16, 86, "%", 1, 0, -40, 200, 0 + tpsErrorDetectionTooLow = scalar, S16, 84, "%", 1, 0, -10, 0, 0 + tpsErrorDetectionTooHigh = scalar, S16, 86, "%", 1, 0, 100, 110, 0 cranking_baseFuel = scalar, F32, 88, "ms", 1, 0, 0, 200, 1 cranking_rpm = scalar, S16, 92, "RPM", 1, 0, 0, 3000, 0 ;no TS info - skipping cranking_alignmentFill_at_6 offset 94 @@ -461,7 +461,8 @@ page = 1 mapMinBufferLength = scalar, S32, 812, "count", 1, 0, 0, 24, 0 idlePidDeactivationTpsThreshold = scalar, S16, 816, "%", 1, 0, 0, 100.0, 0 stepperParkingExtraSteps = scalar, S16, 818, "%", 1, 0, 0, 3000.0, 0 -;no TS info - skipping unusedAntilagTimeout offset 820 + tps1SecondaryMin = scalar, U16, 820, "ADC", 1, 0, 0, 1000, 0 + tps1SecondaryMax = scalar, U16, 822, "ADC", 1, 0, 0, 1000, 0 ;no TS info - skipping antiLagRpmTreshold offset 824 startCrankingDuration = scalar, S16, 826, "Seconds", 1, 0, 0, 30, 0 triggerErrorPin = bits, U08, 828, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -571,8 +572,8 @@ page = 1 unusedBit_251_27 = bits, U32, 976, [27:27], "false", "true" unusedBit_251_28 = bits, U32, 976, [28:28], "false", "true" unusedBit_251_29 = bits, U32, 976, [29:29], "false", "true" - unusedBit_282_30 = bits, U32, 976, [30:30], "false", "true" - unusedBit_282_31 = bits, U32, 976, [31:31], "false", "true" + unusedBit_283_30 = bits, U32, 976, [30:30], "false", "true" + unusedBit_283_31 = bits, U32, 976, [31:31], "false", "true" etbIo1_directionPin1 = bits, U08, 980, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_directionPin2 = bits, U08, 981, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_controlPin1 = bits, U08, 982, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -637,6 +638,8 @@ page = 1 engineCode = string, ASCII, 1128, 32 vehicleName = string, ASCII, 1160, 32 ;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1192 + tps2SecondaryMin = scalar, U16, 1460, "ADC", 1, 0, 0, 1000, 0 + tps2SecondaryMax = scalar, U16, 1462, "ADC", 1, 0, 0, 1000, 0 unusedHereWeHave = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" @@ -1181,8 +1184,8 @@ page = 1 etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" - tpsErrorDetectionTooLow = "TPS error detection, what TPS % value is unrealistically low" - tpsErrorDetectionTooHigh = "TPS error detection, what TPS % value is unrealistically high" + tpsErrorDetectionTooLow = "TPS error detection: what throttle % is unrealistically low?\nAlso used for accelerator pedal error detection if so equiped." + tpsErrorDetectionTooHigh = "TPS error detection: what throttle % is unrealistically high?\nAlso used for accelerator pedal error detection if so equiped." cranking_baseFuel = "Base duration of the fuel injection during cranking, this is modified by the multipliers for CLT, IAT, TPS ect, to give the final cranking pulse width." cranking_rpm = "This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X" crankingChargeAngle = "While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.\nset cranking_charge_angle X" diff --git a/java_console/models/src/com/rusefi/config/generated/Fields.java b/java_console/models/src/com/rusefi/config/generated/Fields.java index 59ccc4e4ec..9d08eef102 100644 --- a/java_console/models/src/com/rusefi/config/generated/Fields.java +++ b/java_console/models/src/com/rusefi/config/generated/Fields.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 01:52:33 EDT 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 10:32:15 EDT 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; @@ -1410,11 +1410,17 @@ public class Fields { public static final int tps1_1AdcChannel_offset = 512; public static final int tps1_1AdcChannel_offset_hex = 200; public static final int tps1_2AdcChannel_offset = 681; + public static final int tps1SecondaryMax_offset = 822; + public static final int tps1SecondaryMax_offset_hex = 336; + public static final int tps1SecondaryMin_offset = 820; + public static final int tps1SecondaryMin_offset_hex = 334; public static final int tps2_1AdcChannel_offset = 515; public static final int tps2_1AdcChannel_offset_hex = 203; public static final int tps2_2AdcChannel_offset = 682; public static final int tps2Max_offset = 1770; public static final int tps2Min_offset = 1768; + public static final int tps2SecondaryMax_offset = 1462; + public static final int tps2SecondaryMin_offset = 1460; public static final int TPS_1_BYTE_PACKING_MULT = 2; public static final int TPS_TPS_ACCEL_TABLE = 8; public static final int tpsAccelEnrichmentThreshold_offset = 2048; @@ -1552,8 +1558,6 @@ public class Fields { public static final int unused_1484_bit_31_offset = 1476; public static final int unused_former_warmup_target_afr_offset = 2100; public static final int unused_former_warmup_target_afr_offset_hex = 834; - public static final int unusedAntilagTimeout_offset = 820; - public static final int unusedAntilagTimeout_offset_hex = 334; public static final int unusedAtOldBoardConfigurationEnd_offset = 1192; public static final int unusedBit4_1476_offset = 1476; public static final int unusedBit_251_11_offset = 976; @@ -1575,8 +1579,8 @@ public class Fields { public static final int unusedBit_251_27_offset = 976; public static final int unusedBit_251_28_offset = 976; public static final int unusedBit_251_29_offset = 976; - public static final int unusedBit_282_30_offset = 976; - public static final int unusedBit_282_31_offset = 976; + public static final int unusedBit_283_30_offset = 976; + public static final int unusedBit_283_31_offset = 976; public static final int unusedBit_34_31_offset = 76; public static final int unusedConsoleSerialRxPin_offset = 1819; public static final int unusedConsoleSerialTxPin_offset = 1818; @@ -2022,7 +2026,8 @@ public class Fields { public static final Field MAPMINBUFFERLENGTH = Field.create("MAPMINBUFFERLENGTH", 812, FieldType.INT); public static final Field IDLEPIDDEACTIVATIONTPSTHRESHOLD = Field.create("IDLEPIDDEACTIVATIONTPSTHRESHOLD", 816, FieldType.INT16); public static final Field STEPPERPARKINGEXTRASTEPS = Field.create("STEPPERPARKINGEXTRASTEPS", 818, FieldType.INT16); - public static final Field UNUSEDANTILAGTIMEOUT = Field.create("UNUSEDANTILAGTIMEOUT", 820, FieldType.FLOAT); + public static final Field TPS1SECONDARYMIN = Field.create("TPS1SECONDARYMIN", 820, FieldType.INT16); + public static final Field TPS1SECONDARYMAX = Field.create("TPS1SECONDARYMAX", 822, FieldType.INT16); public static final Field ANTILAGRPMTRESHOLD = Field.create("ANTILAGRPMTRESHOLD", 824, FieldType.INT16); public static final Field STARTCRANKINGDURATION = Field.create("STARTCRANKINGDURATION", 826, FieldType.INT16); public static final Field TRIGGERERRORPIN = Field.create("TRIGGERERRORPIN", 828, FieldType.INT8, brain_pin_e); @@ -2134,8 +2139,8 @@ public class Fields { public static final Field UNUSEDBIT_251_27 = Field.create("UNUSEDBIT_251_27", 976, FieldType.BIT, 27); public static final Field UNUSEDBIT_251_28 = Field.create("UNUSEDBIT_251_28", 976, FieldType.BIT, 28); public static final Field UNUSEDBIT_251_29 = Field.create("UNUSEDBIT_251_29", 976, FieldType.BIT, 29); - public static final Field UNUSEDBIT_282_30 = Field.create("UNUSEDBIT_282_30", 976, FieldType.BIT, 30); - public static final Field UNUSEDBIT_282_31 = Field.create("UNUSEDBIT_282_31", 976, FieldType.BIT, 31); + public static final Field UNUSEDBIT_283_30 = Field.create("UNUSEDBIT_283_30", 976, FieldType.BIT, 30); + public static final Field UNUSEDBIT_283_31 = Field.create("UNUSEDBIT_283_31", 976, FieldType.BIT, 31); public static final Field ETBIO1_DIRECTIONPIN1 = Field.create("ETBIO1_DIRECTIONPIN1", 980, FieldType.INT8, brain_pin_e); public static final Field ETBIO1_DIRECTIONPIN2 = Field.create("ETBIO1_DIRECTIONPIN2", 981, FieldType.INT8, brain_pin_e); public static final Field ETBIO1_CONTROLPIN1 = Field.create("ETBIO1_CONTROLPIN1", 982, FieldType.INT8, brain_pin_e); @@ -2201,6 +2206,8 @@ public class Fields { public static final Field ENGINEMAKE = Field.create("ENGINEMAKE", 1096, FieldType.INT); public static final Field ENGINECODE = Field.create("ENGINECODE", 1128, FieldType.INT); public static final Field VEHICLENAME = Field.create("VEHICLENAME", 1160, FieldType.INT); + public static final Field TPS2SECONDARYMIN = Field.create("TPS2SECONDARYMIN", 1460, FieldType.INT16); + public static final Field TPS2SECONDARYMAX = Field.create("TPS2SECONDARYMAX", 1462, FieldType.INT16); public static final Field UNUSEDHEREWEHAVE = Field.create("UNUSEDHEREWEHAVE", 1464, FieldType.BIT, 0); public static final Field FUELCLOSEDLOOPCORRECTIONENABLED = Field.create("FUELCLOSEDLOOPCORRECTIONENABLED", 1464, FieldType.BIT, 1); public static final Field ISVERBOSEIAC = Field.create("ISVERBOSEIAC", 1464, FieldType.BIT, 2); @@ -2997,7 +3004,8 @@ public class Fields { MAPMINBUFFERLENGTH, IDLEPIDDEACTIVATIONTPSTHRESHOLD, STEPPERPARKINGEXTRASTEPS, - UNUSEDANTILAGTIMEOUT, + TPS1SECONDARYMIN, + TPS1SECONDARYMAX, ANTILAGRPMTRESHOLD, STARTCRANKINGDURATION, TRIGGERERRORPIN, @@ -3107,8 +3115,8 @@ public class Fields { UNUSEDBIT_251_27, UNUSEDBIT_251_28, UNUSEDBIT_251_29, - UNUSEDBIT_282_30, - UNUSEDBIT_282_31, + UNUSEDBIT_283_30, + UNUSEDBIT_283_31, ETBIO1_DIRECTIONPIN1, ETBIO1_DIRECTIONPIN2, ETBIO1_CONTROLPIN1, @@ -3172,6 +3180,8 @@ public class Fields { ENGINEMAKE, ENGINECODE, VEHICLENAME, + TPS2SECONDARYMIN, + TPS2SECONDARYMAX, UNUSEDHEREWEHAVE, FUELCLOSEDLOOPCORRECTIONENABLED, ISVERBOSEIAC, From 7071d63cad2232724efda3db645fc76af3c37b70 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 11:54:04 -0400 Subject: [PATCH 27/39] 34-2 3 cam Toyota wheel progress --- firmware/controllers/trigger/trigger_central.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index c80274d869..810b590eff 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -145,7 +145,9 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ tc->vvtCamCounter++; - if (engineConfiguration->vvtMode == MIATA_NB2) { + switch(engineConfiguration->vvtMode) { + case MIATA_NB2: + { uint32_t currentDuration = nowNt - tc->previousVvtCamTime; float ratio = ((float) currentDuration) / tc->previousVvtCamDuration; @@ -168,18 +170,19 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ #endif /* EFI_TUNER_STUDIO */ } } + } tc->vvtSyncTimeNt = nowNt; efitick_t offsetNt = nowNt - tc->timeAtVirtualZeroNt; - angle_t vvtPosition = NT2US(offsetNt) / oneDegreeUs; + angle_t currentPosition = NT2US(offsetNt) / oneDegreeUs; // convert engine cycle angle into trigger cycle angle - vvtPosition -= tdcPosition(); - fixAngle(vvtPosition, "vvtPosition", CUSTOM_ERR_6558); + currentPosition -= tdcPosition(); + fixAngle(currentPosition, "currentPosition", CUSTOM_ERR_6558); - tc->vvtPosition = engineConfiguration->vvtOffset - vvtPosition; + tc->vvtPosition = engineConfiguration->vvtOffset - currentPosition; switch (engineConfiguration->vvtMode) { default: From 342a331e1c7b3d52962f3624a7fa57a287ee4cc3 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 11:54:21 -0400 Subject: [PATCH 28/39] 34-2 3 cam Toyota wheel progress --- firmware/controllers/trigger/trigger_central.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 810b590eff..285499cce5 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -145,6 +145,13 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ tc->vvtCamCounter++; + efitick_t offsetNt = nowNt - tc->timeAtVirtualZeroNt; + angle_t currentPosition = NT2US(offsetNt) / oneDegreeUs; + // convert engine cycle angle into trigger cycle angle + currentPosition -= tdcPosition(); + fixAngle(currentPosition, "currentPosition", CUSTOM_ERR_6558); + + switch(engineConfiguration->vvtMode) { case MIATA_NB2: { @@ -159,6 +166,7 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ scheduleMsg(logger, "vvt ratio %.2f", ratio); } if (ratio < miataNb2VVTRatioFrom || ratio > miataNb2VVTRatioTo) { + // this is not NB2 sync tooth - exiting return; } if (engineConfiguration->verboseTriggerSynchDetails) { @@ -174,14 +182,6 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ tc->vvtSyncTimeNt = nowNt; - efitick_t offsetNt = nowNt - tc->timeAtVirtualZeroNt; - - angle_t currentPosition = NT2US(offsetNt) / oneDegreeUs; - - // convert engine cycle angle into trigger cycle angle - currentPosition -= tdcPosition(); - fixAngle(currentPosition, "currentPosition", CUSTOM_ERR_6558); - tc->vvtPosition = engineConfiguration->vvtOffset - currentPosition; switch (engineConfiguration->vvtMode) { From 3e506a674afc715e436cae252b6760a06d71caa0 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 15:22:50 -0400 Subject: [PATCH 29/39] 34-2 3 cam Toyota wheel progress --- firmware/controllers/trigger/trigger_central.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 285499cce5..7e835944b3 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -178,6 +178,9 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ #endif /* EFI_TUNER_STUDIO */ } } + default: + // else, do nothing + break; } tc->vvtSyncTimeNt = nowNt; From c7fadd475f8415a79052ec946c31fa083774f5a3 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Sun, 10 May 2020 13:13:15 -0700 Subject: [PATCH 30/39] configuration for secondary (redundant) TPS sensors (#1419) * add new fields * add tps 2 secondary * sensible error detection limits * UI mods * grey out as appropriate * defaults * either it's unused or its not --- .../controllers/algo/engine_configuration.cpp | 10 ++++-- firmware/tunerstudio/rusefi.input | 33 ++++++++++++++----- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index d48a50a024..eeffe45f3d 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -960,8 +960,14 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engineConfiguration->fanOnTemperature = 95; engineConfiguration->fanOffTemperature = 91; - engineConfiguration->tpsMin = convertVoltageTo10bitADC(1.250); - engineConfiguration->tpsMax = convertVoltageTo10bitADC(4.538); + engineConfiguration->tpsMin = convertVoltageTo10bitADC(0); + engineConfiguration->tpsMax = convertVoltageTo10bitADC(5); + engineConfiguration->tps1SecondaryMin = convertVoltageTo10bitADC(0); + engineConfiguration->tps1SecondaryMax = convertVoltageTo10bitADC(5); + engineConfiguration->tps2Min = convertVoltageTo10bitADC(0); + engineConfiguration->tps2Max = convertVoltageTo10bitADC(5); + engineConfiguration->tps2SecondaryMin = convertVoltageTo10bitADC(0); + engineConfiguration->tps2SecondaryMax = convertVoltageTo10bitADC(5); engineConfiguration->tpsErrorDetectionTooLow = -10; // -10% open engineConfiguration->tpsErrorDetectionTooHigh = 110; // 110% open diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index dde6bea4a1..bba0d5cd7e 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1778,16 +1778,31 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Highest temperature", auxTempSensor2_tempC_3, {auxTempSensor2_adcChannel != 16} field = "Resistance @ HT", auxTempSensor2_resistance_3, {auxTempSensor2_adcChannel != 16} - dialog = tpsSensor, "TPS" + dialog = tpsNum1, "Throttle #1" field = "!See Tools>Calibrate TPS" - field = "Throttle1 position sensor", tps1_1AdcChannel - field = "Throttle1 2nd position sensor", tps1_2AdcChannel - field = "Throttle2 position sensor", tps2_1AdcChannel - field = "Throttle2 2nd position sensor", tps2_2AdcChannel - field = "Throttle2 min value", tps2Min - field = "Throttle2 max value", tps2Max - field = "TPS low value detection threshold", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} - field = "TPS high value detection threshold", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} + field = "Primary sensor", tps1_1AdcChannel + field = "Primary min", tpsMin, {tps1_1AdcChannel != 16} + field = "Primary max", tpsMax, {tps1_1AdcChannel != 16} + field = "Secondary sensor", tps1_2AdcChannel + field = "Secondary min", tps1SecondaryMin, {tps1_2AdcChannel != 16} + field = "Secondary max", tps1SecondaryMax, {tps1_2AdcChannel != 16} + + dialog = tpsNum2, "Throttle #2" + field = "Primary sensor", tps2_1AdcChannel + field = "Primary min", tps2Min, {tps2_1AdcChannel != 16} + field = "Primary max", tps2Max, {tps2_1AdcChannel != 16} + field = "Secondary sensor", tps2_2AdcChannel + field = "Secondary min", tps2SecondaryMin, {tps2_2AdcChannel != 16} + field = "Secondary max", tps2SecondaryMax, {tps2_2AdcChannel != 16} + + dialog = tpsLimits, "TPS Limits" + field = "TPS minimum valid value", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} + field = "TPS maximum valid value", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} + + dialog = tpsSensor, "TPS" + panel = tpsLimits + panel = tpsNum1 + panel = tpsNum2 dialog = pedalSensorLeft, "Accelerator pedal" field = "Accelerator position sensor", throttlePedalPositionAdcChannel From 3b774976e409a5d24086cbc75abb65cd593433bb Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 16:50:29 -0400 Subject: [PATCH 31/39] Fresh generated - auto --- firmware/tunerstudio/rusefi.ini | 35 +++++++++++++++------ firmware/tunerstudio/rusefi_frankenso.ini | 35 +++++++++++++++------ firmware/tunerstudio/rusefi_microrusefi.ini | 35 +++++++++++++++------ firmware/tunerstudio/rusefi_prometheus.ini | 35 +++++++++++++++------ firmware/tunerstudio/rusefi_proteus.ini | 35 +++++++++++++++------ 5 files changed, 125 insertions(+), 50 deletions(-) diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 84a6910c41..e6bafedb9f 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 10:32:15 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 16:50:13 EDT 2020 pageSize = 20000 page = 1 @@ -3048,16 +3048,31 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Highest temperature", auxTempSensor2_tempC_3, {auxTempSensor2_adcChannel != 16} field = "Resistance @ HT", auxTempSensor2_resistance_3, {auxTempSensor2_adcChannel != 16} - dialog = tpsSensor, "TPS" + dialog = tpsNum1, "Throttle #1" field = "!See Tools>Calibrate TPS" - field = "Throttle1 position sensor", tps1_1AdcChannel - field = "Throttle1 2nd position sensor", tps1_2AdcChannel - field = "Throttle2 position sensor", tps2_1AdcChannel - field = "Throttle2 2nd position sensor", tps2_2AdcChannel - field = "Throttle2 min value", tps2Min - field = "Throttle2 max value", tps2Max - field = "TPS low value detection threshold", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} - field = "TPS high value detection threshold", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} + field = "Primary sensor", tps1_1AdcChannel + field = "Primary min", tpsMin, {tps1_1AdcChannel != 16} + field = "Primary max", tpsMax, {tps1_1AdcChannel != 16} + field = "Secondary sensor", tps1_2AdcChannel + field = "Secondary min", tps1SecondaryMin, {tps1_2AdcChannel != 16} + field = "Secondary max", tps1SecondaryMax, {tps1_2AdcChannel != 16} + + dialog = tpsNum2, "Throttle #2" + field = "Primary sensor", tps2_1AdcChannel + field = "Primary min", tps2Min, {tps2_1AdcChannel != 16} + field = "Primary max", tps2Max, {tps2_1AdcChannel != 16} + field = "Secondary sensor", tps2_2AdcChannel + field = "Secondary min", tps2SecondaryMin, {tps2_2AdcChannel != 16} + field = "Secondary max", tps2SecondaryMax, {tps2_2AdcChannel != 16} + + dialog = tpsLimits, "TPS Limits" + field = "TPS minimum valid value", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} + field = "TPS maximum valid value", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} + + dialog = tpsSensor, "TPS" + panel = tpsLimits + panel = tpsNum1 + panel = tpsNum2 dialog = pedalSensorLeft, "Accelerator pedal" field = "Accelerator position sensor", throttlePedalPositionAdcChannel diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index a1c186d0b8..811bda453d 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 10:32:26 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 16:50:18 EDT 2020 pageSize = 20000 page = 1 @@ -3048,16 +3048,31 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Highest temperature", auxTempSensor2_tempC_3, {auxTempSensor2_adcChannel != 16} field = "Resistance @ HT", auxTempSensor2_resistance_3, {auxTempSensor2_adcChannel != 16} - dialog = tpsSensor, "TPS" + dialog = tpsNum1, "Throttle #1" field = "!See Tools>Calibrate TPS" - field = "Throttle1 position sensor", tps1_1AdcChannel - field = "Throttle1 2nd position sensor", tps1_2AdcChannel - field = "Throttle2 position sensor", tps2_1AdcChannel - field = "Throttle2 2nd position sensor", tps2_2AdcChannel - field = "Throttle2 min value", tps2Min - field = "Throttle2 max value", tps2Max - field = "TPS low value detection threshold", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} - field = "TPS high value detection threshold", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} + field = "Primary sensor", tps1_1AdcChannel + field = "Primary min", tpsMin, {tps1_1AdcChannel != 16} + field = "Primary max", tpsMax, {tps1_1AdcChannel != 16} + field = "Secondary sensor", tps1_2AdcChannel + field = "Secondary min", tps1SecondaryMin, {tps1_2AdcChannel != 16} + field = "Secondary max", tps1SecondaryMax, {tps1_2AdcChannel != 16} + + dialog = tpsNum2, "Throttle #2" + field = "Primary sensor", tps2_1AdcChannel + field = "Primary min", tps2Min, {tps2_1AdcChannel != 16} + field = "Primary max", tps2Max, {tps2_1AdcChannel != 16} + field = "Secondary sensor", tps2_2AdcChannel + field = "Secondary min", tps2SecondaryMin, {tps2_2AdcChannel != 16} + field = "Secondary max", tps2SecondaryMax, {tps2_2AdcChannel != 16} + + dialog = tpsLimits, "TPS Limits" + field = "TPS minimum valid value", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} + field = "TPS maximum valid value", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} + + dialog = tpsSensor, "TPS" + panel = tpsLimits + panel = tpsNum1 + panel = tpsNum2 dialog = pedalSensorLeft, "Accelerator pedal" field = "Accelerator position sensor", throttlePedalPositionAdcChannel diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index 817add7f5d..3927241eca 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 10:32:25 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 16:50:16 EDT 2020 pageSize = 20000 page = 1 @@ -3039,16 +3039,31 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Highest temperature", auxTempSensor2_tempC_3, {auxTempSensor2_adcChannel != 16} field = "Resistance @ HT", auxTempSensor2_resistance_3, {auxTempSensor2_adcChannel != 16} - dialog = tpsSensor, "TPS" + dialog = tpsNum1, "Throttle #1" field = "!See Tools>Calibrate TPS" - field = "Throttle1 position sensor", tps1_1AdcChannel - field = "Throttle1 2nd position sensor", tps1_2AdcChannel - field = "Throttle2 position sensor", tps2_1AdcChannel - field = "Throttle2 2nd position sensor", tps2_2AdcChannel - field = "Throttle2 min value", tps2Min - field = "Throttle2 max value", tps2Max - field = "TPS low value detection threshold", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} - field = "TPS high value detection threshold", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} + field = "Primary sensor", tps1_1AdcChannel + field = "Primary min", tpsMin, {tps1_1AdcChannel != 16} + field = "Primary max", tpsMax, {tps1_1AdcChannel != 16} + field = "Secondary sensor", tps1_2AdcChannel + field = "Secondary min", tps1SecondaryMin, {tps1_2AdcChannel != 16} + field = "Secondary max", tps1SecondaryMax, {tps1_2AdcChannel != 16} + + dialog = tpsNum2, "Throttle #2" + field = "Primary sensor", tps2_1AdcChannel + field = "Primary min", tps2Min, {tps2_1AdcChannel != 16} + field = "Primary max", tps2Max, {tps2_1AdcChannel != 16} + field = "Secondary sensor", tps2_2AdcChannel + field = "Secondary min", tps2SecondaryMin, {tps2_2AdcChannel != 16} + field = "Secondary max", tps2SecondaryMax, {tps2_2AdcChannel != 16} + + dialog = tpsLimits, "TPS Limits" + field = "TPS minimum valid value", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} + field = "TPS maximum valid value", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} + + dialog = tpsSensor, "TPS" + panel = tpsLimits + panel = tpsNum1 + panel = tpsNum2 dialog = pedalSensorLeft, "Accelerator pedal" field = "Accelerator position sensor", throttlePedalPositionAdcChannel diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index 5d30333039..78a5744c22 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 10:32:27 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 16:50:20 EDT 2020 pageSize = 20000 page = 1 @@ -3044,16 +3044,31 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Highest temperature", auxTempSensor2_tempC_3, {auxTempSensor2_adcChannel != 16} field = "Resistance @ HT", auxTempSensor2_resistance_3, {auxTempSensor2_adcChannel != 16} - dialog = tpsSensor, "TPS" + dialog = tpsNum1, "Throttle #1" field = "!See Tools>Calibrate TPS" - field = "Throttle1 position sensor", tps1_1AdcChannel - field = "Throttle1 2nd position sensor", tps1_2AdcChannel - field = "Throttle2 position sensor", tps2_1AdcChannel - field = "Throttle2 2nd position sensor", tps2_2AdcChannel - field = "Throttle2 min value", tps2Min - field = "Throttle2 max value", tps2Max - field = "TPS low value detection threshold", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} - field = "TPS high value detection threshold", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} + field = "Primary sensor", tps1_1AdcChannel + field = "Primary min", tpsMin, {tps1_1AdcChannel != 16} + field = "Primary max", tpsMax, {tps1_1AdcChannel != 16} + field = "Secondary sensor", tps1_2AdcChannel + field = "Secondary min", tps1SecondaryMin, {tps1_2AdcChannel != 16} + field = "Secondary max", tps1SecondaryMax, {tps1_2AdcChannel != 16} + + dialog = tpsNum2, "Throttle #2" + field = "Primary sensor", tps2_1AdcChannel + field = "Primary min", tps2Min, {tps2_1AdcChannel != 16} + field = "Primary max", tps2Max, {tps2_1AdcChannel != 16} + field = "Secondary sensor", tps2_2AdcChannel + field = "Secondary min", tps2SecondaryMin, {tps2_2AdcChannel != 16} + field = "Secondary max", tps2SecondaryMax, {tps2_2AdcChannel != 16} + + dialog = tpsLimits, "TPS Limits" + field = "TPS minimum valid value", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} + field = "TPS maximum valid value", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} + + dialog = tpsSensor, "TPS" + panel = tpsLimits + panel = tpsNum1 + panel = tpsNum2 dialog = pedalSensorLeft, "Accelerator pedal" field = "Accelerator position sensor", throttlePedalPositionAdcChannel diff --git a/firmware/tunerstudio/rusefi_proteus.ini b/firmware/tunerstudio/rusefi_proteus.ini index 9152b4af25..3b50f9157d 100644 --- a/firmware/tunerstudio/rusefi_proteus.ini +++ b/firmware/tunerstudio/rusefi_proteus.ini @@ -89,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 10:32:28 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 10 16:50:22 EDT 2020 pageSize = 20000 page = 1 @@ -3039,16 +3039,31 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Highest temperature", auxTempSensor2_tempC_3, {auxTempSensor2_adcChannel != 16} field = "Resistance @ HT", auxTempSensor2_resistance_3, {auxTempSensor2_adcChannel != 16} - dialog = tpsSensor, "TPS" + dialog = tpsNum1, "Throttle #1" field = "!See Tools>Calibrate TPS" - field = "Throttle1 position sensor", tps1_1AdcChannel - field = "Throttle1 2nd position sensor", tps1_2AdcChannel - field = "Throttle2 position sensor", tps2_1AdcChannel - field = "Throttle2 2nd position sensor", tps2_2AdcChannel - field = "Throttle2 min value", tps2Min - field = "Throttle2 max value", tps2Max - field = "TPS low value detection threshold", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} - field = "TPS high value detection threshold", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} + field = "Primary sensor", tps1_1AdcChannel + field = "Primary min", tpsMin, {tps1_1AdcChannel != 16} + field = "Primary max", tpsMax, {tps1_1AdcChannel != 16} + field = "Secondary sensor", tps1_2AdcChannel + field = "Secondary min", tps1SecondaryMin, {tps1_2AdcChannel != 16} + field = "Secondary max", tps1SecondaryMax, {tps1_2AdcChannel != 16} + + dialog = tpsNum2, "Throttle #2" + field = "Primary sensor", tps2_1AdcChannel + field = "Primary min", tps2Min, {tps2_1AdcChannel != 16} + field = "Primary max", tps2Max, {tps2_1AdcChannel != 16} + field = "Secondary sensor", tps2_2AdcChannel + field = "Secondary min", tps2SecondaryMin, {tps2_2AdcChannel != 16} + field = "Secondary max", tps2SecondaryMax, {tps2_2AdcChannel != 16} + + dialog = tpsLimits, "TPS Limits" + field = "TPS minimum valid value", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} + field = "TPS maximum valid value", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} + + dialog = tpsSensor, "TPS" + panel = tpsLimits + panel = tpsNum1 + panel = tpsNum2 dialog = pedalSensorLeft, "Accelerator pedal" field = "Accelerator position sensor", throttlePedalPositionAdcChannel From 1f692c4a9b0a3f55a5fdaa2a41116efdcb9356b6 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 18:03:11 -0400 Subject: [PATCH 32/39] 34-2 3 cam Toyota wheel progress --- firmware/config/engines/toyota_jzs147.cpp | 2 ++ firmware/controllers/engine_controller.cpp | 2 +- .../controllers/trigger/trigger_central.cpp | 17 +++++++++++++++++ unit_tests/tests/trigger/test_2jz_vvt.cpp | 3 +++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/firmware/config/engines/toyota_jzs147.cpp b/firmware/config/engines/toyota_jzs147.cpp index b6547caf39..39bd4aa2dd 100644 --- a/firmware/config/engines/toyota_jzs147.cpp +++ b/firmware/config/engines/toyota_jzs147.cpp @@ -125,6 +125,8 @@ void setToyota_2jz_vics(DECLARE_CONFIG_PARAMETER_SIGNATURE) { strcpy(CONFIG(vehicleName), "VVT example"); + engineConfiguration->debugMode = DBG_VVT; + // todo: these magic values would be hardcoded once we find out proper magic values engineConfiguration->fsio_setting[14] = -90; engineConfiguration->fsio_setting[15] = +90; diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index dd6d9ac4cf..a2c9d2fb2f 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -717,6 +717,6 @@ int getRusEfiVersion(void) { if (initBootloader() != 0) return 123; #endif /* EFI_BOOTLOADER_INCLUDE_CODE */ - return 20200509; + return 20200510; } #endif /* EFI_UNIT_TEST */ diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 7e835944b3..d39c2d3854 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -151,13 +151,30 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ currentPosition -= tdcPosition(); fixAngle(currentPosition, "currentPosition", CUSTOM_ERR_6558); + tc->currentVVTEventPosition = currentPosition; + if (engineConfiguration->debugMode == DBG_VVT) { +#if EFI_TUNER_STUDIO + tsOutputChannels.debugFloatField1 = currentPosition; +#endif /* EFI_TUNER_STUDIO */ + } switch(engineConfiguration->vvtMode) { + case VVT_2JZ: + if (currentPosition < engineConfiguration->fsio_setting[14] || currentPosition > engineConfiguration->fsio_setting[15]) { + // outside of the expected range + return; + } case MIATA_NB2: { uint32_t currentDuration = nowNt - tc->previousVvtCamTime; float ratio = ((float) currentDuration) / tc->previousVvtCamDuration; + if (engineConfiguration->debugMode == DBG_VVT) { +#if EFI_TUNER_STUDIO + tsOutputChannels.debugFloatField2 = ratio; +#endif /* EFI_TUNER_STUDIO */ + } + tc->previousVvtCamDuration = currentDuration; tc->previousVvtCamTime = nowNt; diff --git a/unit_tests/tests/trigger/test_2jz_vvt.cpp b/unit_tests/tests/trigger/test_2jz_vvt.cpp index 9e7ce6355c..323da9346e 100644 --- a/unit_tests/tests/trigger/test_2jz_vvt.cpp +++ b/unit_tests/tests/trigger/test_2jz_vvt.cpp @@ -29,5 +29,8 @@ TEST(sensors, test2jz) { eth.moveTimeForwardUs(MS2US(3)); // shifting VVT phase a few angles hwHandleVvtCamSignal(TV_FALL, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX); + hwHandleVvtCamSignal(TV_RISE, getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX); + // currentPosition + ASSERT_NEAR(608.2, engine->triggerCentral.currentVVTEventPosition, EPS3D); } From 8bc2c403d6e17431a07b5eb20eee54ce3e8b92a2 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 18:10:50 -0400 Subject: [PATCH 33/39] 34-2 3 cam Toyota wheel progress --- firmware/controllers/trigger/trigger_central.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index d39c2d3854..a9556f699c 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -164,6 +164,7 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ // outside of the expected range return; } + break; case MIATA_NB2: { uint32_t currentDuration = nowNt - tc->previousVvtCamTime; From 5c4943db633abda2e23585200e1c8a8bd8db34a0 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 20:14:49 -0400 Subject: [PATCH 34/39] dreams --- hardware/microRusEFI_test_board/readme.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 hardware/microRusEFI_test_board/readme.md diff --git a/hardware/microRusEFI_test_board/readme.md b/hardware/microRusEFI_test_board/readme.md new file mode 100644 index 0000000000..e69de29bb2 From 1b68b94e5d314237c2e4271d8210b770e7c4097d Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 21:23:45 -0400 Subject: [PATCH 35/39] project fix --- java_console/inifile/inifile.iml | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/java_console/inifile/inifile.iml b/java_console/inifile/inifile.iml index a91a847c47..5bba28f2c0 100644 --- a/java_console/inifile/inifile.iml +++ b/java_console/inifile/inifile.iml @@ -7,25 +7,7 @@ - - - - - - - - - - - - - - - - - - - + \ No newline at end of file From 39aa667c6232a65aaaaf530485c24409cd45d4cb Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 May 2020 22:50:45 -0400 Subject: [PATCH 36/39] wow that's old! also not working maybe? --- misc/jenkins/build_working_folder.bat | 8 -------- 1 file changed, 8 deletions(-) diff --git a/misc/jenkins/build_working_folder.bat b/misc/jenkins/build_working_folder.bat index 97a094ce29..a56fc1957e 100644 --- a/misc/jenkins/build_working_folder.bat +++ b/misc/jenkins/build_working_folder.bat @@ -63,15 +63,7 @@ if not exist firmware/deliver/rusefi.bin echo %script_name%: rusefi.bin not foun if not exist firmware/deliver/rusefi.bin exit -1 cd temp -echo "Please copy find.exe to findcyg.exe in cygwin folder" -findcyg . -name '.svn' > folders_to_delete.txt -IF NOT ERRORLEVEL 0 echo %script_name%: ERROR INVOKING findcyg -IF NOT ERRORLEVEL 0 EXIT /B 1 -echo "Deleting .svn" -xargs rm -rf < folders_to_delete.txt -echo "%script_name%: Deleted .svn" -rm -rf folders_to_delete.txt echo "Building bundle" pwd From 75781f1262f1fa17ae8cdb439be9c13de2cda7cd Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 11 May 2020 00:53:50 -0400 Subject: [PATCH 37/39] hiding diag code which was messing with GP2/GP3 i.e. TLE8888_PIN_22 TLE8888_PIN_23 --- firmware/hw_layer/drivers/gpio/tle8888.c | 78 ++++++++++++------------ 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/firmware/hw_layer/drivers/gpio/tle8888.c b/firmware/hw_layer/drivers/gpio/tle8888.c index 998052f871..40e394c4f3 100644 --- a/firmware/hw_layer/drivers/gpio/tle8888.c +++ b/firmware/hw_layer/drivers/gpio/tle8888.c @@ -362,49 +362,49 @@ static int tle8888_update_status_and_diag(struct tle8888_priv *chip) /* this is quite expensive to call tle8888_spi_rw on each register read * TODO: implement tle8888_spi_rw_array ? */ - /* request OutDiad0, ignore received */ - if ((ret = tle8888_spi_rw(chip, CMD_OUTDIAG(0), NULL))) - return ret; - - /* request OutDiad1, receive OutDiag0 */ - if ((ret = tle8888_spi_rw(chip, CMD_OUTDIAG(1), &rx))) - return ret; - chip->OutDiag[0] = getDataFromResponse(rx); - - /* request OutDiad2, receive OutDiag1 */ - if ((ret = tle8888_spi_rw(chip, CMD_OUTDIAG(2), &rx))) - return ret; - chip->OutDiag[1] = getDataFromResponse(rx); - - /* request OutDiad3, receive OutDiag2 */ - if ((ret = tle8888_spi_rw(chip, CMD_OUTDIAG(3), &rx))) - return ret; - chip->OutDiag[2] = getDataFromResponse(rx); - - /* request OutDiad4, receive OutDiag3 */ - if ((ret = tle8888_spi_rw(chip, CMD_OUTDIAG(4), &rx))) - return ret; - chip->OutDiag[3] = getDataFromResponse(rx); - - /* request BriDiag0, receive OutDiag4 */ - if ((ret = tle8888_spi_rw(chip, CMD_BRIDIAG(0), &rx))) - return ret; - chip->OutDiag[4] = getDataFromResponse(rx); - - /* request BriDiag1, receive BriDiag0 */ - if ((ret = tle8888_spi_rw(chip, CMD_BRIDIAG(1), &rx))) - return ret; - chip->BriDiag[0] = getDataFromResponse(rx); - - /* request IgnDiag, receive BriDiag1 */ - if ((ret = tle8888_spi_rw(chip, CMD_IGNDIAG, &rx))) - return ret; - chip->BriDiag[1] = getDataFromResponse(rx); +// /* request OutDiad0, ignore received */ +// if ((ret = tle8888_spi_rw(chip, CMD_OUTDIAG(0), NULL))) +// return ret; +// +// /* request OutDiad1, receive OutDiag0 */ +// if ((ret = tle8888_spi_rw(chip, CMD_OUTDIAG(1), &rx))) +// return ret; +// chip->OutDiag[0] = getDataFromResponse(rx); +// +// /* request OutDiad2, receive OutDiag1 */ +// if ((ret = tle8888_spi_rw(chip, CMD_OUTDIAG(2), &rx))) +// return ret; +// chip->OutDiag[1] = getDataFromResponse(rx); +// +// /* request OutDiad3, receive OutDiag2 */ +// if ((ret = tle8888_spi_rw(chip, CMD_OUTDIAG(3), &rx))) +// return ret; +// chip->OutDiag[2] = getDataFromResponse(rx); +// +// /* request OutDiad4, receive OutDiag3 */ +// if ((ret = tle8888_spi_rw(chip, CMD_OUTDIAG(4), &rx))) +// return ret; +// chip->OutDiag[3] = getDataFromResponse(rx); +// +// /* request BriDiag0, receive OutDiag4 */ +// if ((ret = tle8888_spi_rw(chip, CMD_BRIDIAG(0), &rx))) +// return ret; +// chip->OutDiag[4] = getDataFromResponse(rx); +// +// /* request BriDiag1, receive BriDiag0 */ +// if ((ret = tle8888_spi_rw(chip, CMD_BRIDIAG(1), &rx))) +// return ret; +// chip->BriDiag[0] = getDataFromResponse(rx); +// +// /* request IgnDiag, receive BriDiag1 */ +// if ((ret = tle8888_spi_rw(chip, CMD_IGNDIAG, &rx))) +// return ret; +// chip->BriDiag[1] = getDataFromResponse(rx); /* request OpStat0, receive IgnDiag */ if ((ret = tle8888_spi_rw(chip, CMD_OPSTAT(0), &rx))) return ret; - chip->IgnDiag = getDataFromResponse(rx); +// chip->IgnDiag = getDataFromResponse(rx); /* request OpStat1, receive OpStat0 */ if ((ret = tle8888_spi_rw(chip, CMD_OPSTAT(1), &rx))) From 0e8282995e501a18290a1fd36acb741d14846ff6 Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 11 May 2020 00:59:55 -0400 Subject: [PATCH 38/39] date --- firmware/controllers/engine_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index a2c9d2fb2f..bf45da611e 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -717,6 +717,6 @@ int getRusEfiVersion(void) { if (initBootloader() != 0) return 123; #endif /* EFI_BOOTLOADER_INCLUDE_CODE */ - return 20200510; + return 20200511; } #endif /* EFI_UNIT_TEST */ From 7513b8ea5a8946160769a9dc5f9d0d11ea195468 Mon Sep 17 00:00:00 2001 From: NOx-z <50815960+NOx-z@users.noreply.github.com> Date: Sun, 10 May 2020 22:52:20 -0700 Subject: [PATCH 39/39] Mc33 undervolt (#1421) * mc33 flash check * DI sanity checks for setting HV config * mc33 under voltage check * mc33 under voltage check Co-authored-by: Christopher W. Anderson --- firmware/hw_layer/mc33816.cpp | 45 +++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/firmware/hw_layer/mc33816.cpp b/firmware/hw_layer/mc33816.cpp index 24e49e82a7..096bb9a6cd 100644 --- a/firmware/hw_layer/mc33816.cpp +++ b/firmware/hw_layer/mc33816.cpp @@ -33,6 +33,7 @@ static bool flag0before = false; static bool flag0after = false; static unsigned short mcChipId; +static unsigned short mcDriverStatus; static Logging* logger; static SPIConfig spiCfg = { .circular = false, @@ -54,7 +55,7 @@ static bool validateChipId() { static void showStats() { // x9D is product code or something, and 43 is the revision? - scheduleMsg(logger, "MC %x %s", mcChipId, validateChipId() ? "hooray!" : "not hooray :("); + scheduleMsg(logger, "MC 0x%x %s", mcChipId, validateChipId() ? "hooray!" : "not hooray :("); if (CONFIG(mc33816_flag0) != GPIO_UNASSIGNED) { scheduleMsg(logger, "flag0 before %d after %d", flag0before, flag0after); @@ -65,6 +66,7 @@ static void showStats() { scheduleMsg(logger, "No flag0 pin selected"); } scheduleMsg(logger, "MC voltage %d", CONFIG(mc33_hvolt)); + scheduleMsg(logger, "MC driver status 0x%x", mcDriverStatus); } static void mcRestart(); @@ -189,6 +191,32 @@ static bool check_flash() { return true; } +static unsigned short readDriverStatus(){ + // Note: There is a config at 0x1CE & 1 that can reset this status reg on read + // otherwise the reload/recheck occurs with a write + // resetting it is necessary to reload - if the interrupt condition has been resolved + + unsigned short driverStatus; + setup_spi(); // ensure on common page? + spiSelect(driver); + spi_writew((0x8000 | 0x1D2 << 5) + 1); + driverStatus = recv_16bit_spi(); + spiUnselect(driver); + return driverStatus; +} + +static bool checkUndervoltV5(unsigned short driverStatus){ + return (driverStatus & (1<<1)); +} + +static bool checkOverTemp(unsigned short driverStatus){ + return (driverStatus & (1<<3)); +} + +static bool checkDrivenEnabled(unsigned short driverStatus){ + return (driverStatus & (1<<4)); +} + static void enable_flash() { spiSelect(driver); spi_writew(0x2001); //ch1 @@ -422,8 +450,14 @@ static void mcRestart() { setup_spi(); - mcChipId = readId(); + mcDriverStatus = readDriverStatus(); + if(checkUndervoltV5(mcDriverStatus)){ + firmwareError(OBD_PCM_Processor_Fault, "MC33 5V Under-Voltage!"); + return; + } + + mcChipId = readId(); if (!validateChipId()) { firmwareError(OBD_PCM_Processor_Fault, "No comm with MC33"); return; @@ -458,6 +492,13 @@ static void mcRestart() { } setBoostVoltage(CONFIG(mc33_hvolt)); driven.setValue(1); // driven = HV + + mcDriverStatus = readDriverStatus(); + if(!checkDrivenEnabled(mcDriverStatus)){ + firmwareError(OBD_PCM_Processor_Fault, "MC33 Driven did not stick!"); + return; + } + } #endif /* EFI_MC33816 */