From 8ff9c572b7d1ed0090efb69ae309962d6a1c620e Mon Sep 17 00:00:00 2001 From: microbuilder Date: Tue, 13 Dec 2016 12:37:41 +0100 Subject: [PATCH] Shortened USB enum time due to 1s DFU timeout --- tools/nrfutil-0.5.2/nordicsemi/dfu/dfu_transport_serial.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/nrfutil-0.5.2/nordicsemi/dfu/dfu_transport_serial.py b/tools/nrfutil-0.5.2/nordicsemi/dfu/dfu_transport_serial.py index e873bca0..dc0fdb06 100644 --- a/tools/nrfutil-0.5.2/nordicsemi/dfu/dfu_transport_serial.py +++ b/tools/nrfutil-0.5.2/nordicsemi/dfu/dfu_transport_serial.py @@ -50,7 +50,7 @@ class DfuTransportSerial(DfuTransport): DEFAULT_BAUD_RATE = 115200 DEFAULT_FLOW_CONTROL = False DEFAULT_SERIAL_PORT_TIMEOUT = 1.0 # Timeout time on serial port read - SERIAL_PORT_OPEN_WAIT_TIME = 1.0 + SERIAL_PORT_OPEN_WAIT_TIME = 0.5 ACK_PACKET_TIMEOUT = 1.0 # Timeout time for for ACK packet received before reporting timeout through event system SEND_INIT_PACKET_WAIT_TIME = 0.5 # 1.0 # Time to wait before communicating with bootloader after init packet is sent @@ -84,6 +84,8 @@ class DfuTransportSerial(DfuTransport): self.serial_port.setDTR(False) time.sleep(0.05) self.serial_port.setDTR(True) + time.sleep(0.05) + self.serial_port.setDTR(False) time.sleep(DfuTransportSerial.SERIAL_PORT_OPEN_WAIT_TIME)