From 3498872289483a36081ab87aec286b6a4148324f Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 13 Dec 2016 19:07:46 +0700 Subject: [PATCH] testing out dfu timing --- tools/nrfutil-0.5.2/nordicsemi/dfu/dfu_transport_serial.py | 5 ++++- 1 file changed, 4 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 dc0fdb06..b5b01b57 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 @@ -80,6 +80,8 @@ class DfuTransportSerial(DfuTransport): except Exception, e: raise NordicSemiException("Serial port could not be opened on {0}. Reason: {1}".format(self.com_port, e.message)) + time.sleep(DfuTransportSerial.SERIAL_PORT_OPEN_WAIT_TIME) + # Toggle DTR to reset the board and enter DFU mode self.serial_port.setDTR(False) time.sleep(0.05) @@ -87,7 +89,8 @@ class DfuTransportSerial(DfuTransport): time.sleep(0.05) self.serial_port.setDTR(False) - time.sleep(DfuTransportSerial.SERIAL_PORT_OPEN_WAIT_TIME) + # A bit of delay to allow device to boot up + time.sleep(0.1) def close(self): super(DfuTransportSerial, self).close()