Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib_dfu/src/dfu.xc
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,10 @@ static enum dfu_status getstatus_from_dnload(bool &busy)

case DNLOAD_ERASING_SECTOR:
if (!flash_is_busy()) {
if (!flash_is_sector_erased(dnload.next_page_address))
return ERR_CHECK_ERASED;
// See https://github.com/xmos/lib_dfu/issues/44
// This works around a problem seen where I2C clock stretching for 5ms breaks the DFU process
// if (!flash_is_sector_erased(dnload.next_page_address))
// return ERR_CHECK_ERASED;

if (!is_address_in_an_upgrade_slot(dnload.next_page_address))
return ERR_ADDRESS;
Expand Down