mirror of https://github.com/rusefi/rusefi.git
this button isn't useful as it just bricks the ECU
This commit is contained in:
parent
8f0ff58ee7
commit
c7a183db49
|
@ -22,7 +22,6 @@
|
|||
#define show_Frankenso_presets false
|
||||
#define show_microRusEFI_presets false
|
||||
#define show_Proteus_presets true
|
||||
#define ts_show_f7_presets true
|
||||
|
||||
#define LUA_SCRIPT_SIZE 12000
|
||||
|
||||
|
|
|
@ -400,19 +400,6 @@ static void handleCommandX14(uint16_t index) {
|
|||
widebandUpdatePending = true;
|
||||
benchSemaphore.signal();
|
||||
return;
|
||||
case 0x14:
|
||||
#ifdef STM32F7
|
||||
void sys_dual_bank(void);
|
||||
/**
|
||||
* yes, this would instantly cause a hard fault as a random sequence of bytes is decoded as instructions
|
||||
* and that's the intended behavious - the point is to set flash properly and to re-flash once in proper configuration
|
||||
*/
|
||||
sys_dual_bank();
|
||||
rebootNow();
|
||||
#else
|
||||
criticalError("Unexpected dbank command", index);
|
||||
#endif
|
||||
return;
|
||||
case 0x15:
|
||||
#if EFI_PROD_CODE
|
||||
extern bool burnWithoutFlash;
|
||||
|
|
|
@ -147,33 +147,6 @@ static void stm32f7_flash_mass_erase_dual_block()
|
|||
FLASH_CR &= ~(FLASH_CR_MER1 | FLASH_CR_MER2);
|
||||
}
|
||||
|
||||
// todo: at the moment this does not work :(
|
||||
// https://github.com/rusefi/rusefi/issues/2996
|
||||
void sys_dual_bank(void) {
|
||||
uint32_t reg;
|
||||
efiPrintf("FLASH->SR before %x", FLASH->SR);
|
||||
|
||||
/* Unlock OPTCR */
|
||||
FLASH_OPTKEYR = FLASH_OPTKEY1;
|
||||
FLASH_OPTKEYR = FLASH_OPTKEY2;
|
||||
flash_wait_complete();
|
||||
|
||||
/* Disable protection + Switch to dual bank */
|
||||
reg = FLASH_OPTCR;
|
||||
reg &= ~0x000FF00;
|
||||
reg |= 0x0000AA00;
|
||||
reg &= ~(FLASH_OPTCR_nDBANK);
|
||||
FLASH_OPTCR = reg;
|
||||
__DSB();
|
||||
FLASH_OPTCR |= FLASH_OPTCR_STRT;
|
||||
flash_wait_complete();
|
||||
efiPrintf("FLASH->SR after %x", FLASH->SR);
|
||||
/*
|
||||
* see https://github.com/danielinux/stm32f7-dualbank-tool/issues/1
|
||||
stm32f7_flash_mass_erase_dual_block();
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
STOP mode for F7 is needed for wakeup from multiple EXTI pins. For example PD0, which is CAN rx.
|
||||
However, for F40X & F42X this may be useless. STOP in itself eats more current than standby.
|
||||
|
|
|
@ -183,11 +183,6 @@ void runRusEfi() {
|
|||
checkLastBootError();
|
||||
#endif
|
||||
|
||||
#ifdef STM32F7
|
||||
void sys_dual_bank(void);
|
||||
addConsoleAction("dual_bank", sys_dual_bank);
|
||||
#endif
|
||||
|
||||
#if defined(STM32F4) || defined(STM32F7)
|
||||
// addConsoleAction("stm32_stop", stm32_stop);
|
||||
addConsoleAction("stm32_standby", stm32_standby);
|
||||
|
|
|
@ -2115,7 +2115,6 @@ cmd_etb_autotune_stop = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_X14_16_he
|
|||
cmd_etb_auto_calibrate_2 = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_X14_16_hex@@\x00\x11"
|
||||
cmd_wideband_firmare_update = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_X14_16_hex@@\x00\x12"
|
||||
cmd_enable_ext_stim = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_X14_16_hex@@\x00\x13"
|
||||
cmd_nDBANK = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_X14_16_hex@@\x00\x14"@@if_ts_show_f7_presets
|
||||
cmd_burn_without_flash = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_X14_16_hex@@\x00\x15"
|
||||
|
||||
cmd_set_wideband_idx_0 = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_WIDEBAND_16_hex@@\x00\x00"
|
||||
|
@ -4282,7 +4281,6 @@ dialog = tcuControls, "Transmission Settings"
|
|||
commandButton = "Reset ECU", cmd_reset_controller
|
||||
commandButton = "Reset to DFU", cmd_dfu
|
||||
commandButton = "Reset to OpenBLT", cmd_openblt
|
||||
commandButton = "F7 nDBANK fix", cmd_nDBANK@@if_ts_show_f7_presets
|
||||
commandButton = "No flash Burn mode", cmd_burn_without_flash
|
||||
|
||||
; bench test
|
||||
|
|
Loading…
Reference in New Issue