diff --git a/dp32g030.cfg b/dp32g030.cfg index 820d9f8..05e441c 100644 --- a/dp32g030.cfg +++ b/dp32g030.cfg @@ -91,7 +91,7 @@ proc write_image {filename address} { return } } - uv_clear_sectors [expr {2*($fs+$_SECTOR_SIZE-1)/$_SECTOR_SIZE}] + uv_clear_sectors [expr {(($fs+$_SECTOR_SIZE-1)&(0x10000000-$_SECTOR_SIZE))/($_SECTOR_SIZE/2)}] uv_flash_unlock set addr $address