aboutsummaryrefslogtreecommitdiff
path: root/iceprog/iceprog.c
diff options
context:
space:
mode:
Diffstat (limited to 'iceprog/iceprog.c')
-rw-r--r--iceprog/iceprog.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/iceprog/iceprog.c b/iceprog/iceprog.c
index 8ee6443..3ad202a 100644
--- a/iceprog/iceprog.c
+++ b/iceprog/iceprog.c
@@ -1048,6 +1048,10 @@ int main(int argc, char **argv)
flash_read(rw_offset + addr, buffer_flash, rc);
if (memcmp(buffer_file, buffer_flash, rc)) {
fprintf(stderr, "Found difference between flash and file!\n");
+ if (!disable_powerdown)
+ flash_power_down();
+ flash_release_reset();
+ usleep(250000);
mpsse_error(3);
}
}
@@ -1064,7 +1068,7 @@ int main(int argc, char **argv)
if (!disable_powerdown)
flash_power_down();
- set_cs_creset(1, 1);
+ flash_release_reset();
usleep(250000);
fprintf(stderr, "cdone: %s\n", get_cdone() ? "high" : "low");