From 7a327fdeac63343d8aa4c778b015d735cdba50bc Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 18 Oct 2018 21:48:24 +0700 Subject: [PATCH] update the flash page write delay --- nordicsemi/dfu/dfu_transport_serial.py | 5 ++++- nordicsemi/version.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nordicsemi/dfu/dfu_transport_serial.py b/nordicsemi/dfu/dfu_transport_serial.py index 61a34aa..589abad 100644 --- a/nordicsemi/dfu/dfu_transport_serial.py +++ b/nordicsemi/dfu/dfu_transport_serial.py @@ -219,7 +219,10 @@ def progress_percentage(part, whole): # After 8 frames (4096 Bytes), nrf5x will erase and write to flash. While erasing/writing to flash # nrf5x's CPU is blocked. We better wait a few ms, just to be safe if count%8 == 0: - time.sleep(0.010) + time.sleep(DfuTransportSerial.FLASH_PAGE_WRITE_TIME) + + # Wait for last page to write + time.sleep(DfuTransportSerial.FLASH_PAGE_WRITE_TIME) # Send data stop packet frame = int32_to_bytes(DFU_STOP_DATA_PACKET) diff --git a/nordicsemi/version.py b/nordicsemi/version.py index d353bae..d0d077a 100644 --- a/nordicsemi/version.py +++ b/nordicsemi/version.py @@ -30,4 +30,4 @@ """ Version definition for nrfutil. """ -NRFUTIL_VERSION = "0.5.3.post11" +NRFUTIL_VERSION = "0.5.3.post12"