diff --git a/dediprog.c b/dediprog.c index df8af6155..cdd27b099 100644 --- a/dediprog.c +++ b/dediprog.c @@ -131,6 +131,10 @@ static int dediprog_set_spi_voltage(int millivolt) msg_pdbg("Setting SPI voltage to %u.%03u V\n", millivolt / 1000, millivolt % 1000); + if (voltage_selector == 0) { + /* Wait some time as the original driver does. */ + programmer_delay(200 * 1000); + } ret = usb_control_msg(dediprog_handle, 0x42, 0x9, voltage_selector, 0xff, NULL, 0x0, DEFAULT_TIMEOUT); if (ret != 0x0) { @@ -138,6 +142,10 @@ static int dediprog_set_spi_voltage(int millivolt) voltage_selector); return 1; } + if (voltage_selector != 0) { + /* Wait some time as the original driver does. */ + programmer_delay(200 * 1000); + } return 0; }