diff options
Diffstat (limited to 'iceprog')
-rw-r--r-- | iceprog/iceprog.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/iceprog/iceprog.c b/iceprog/iceprog.c index da54d59..b04fe65 100644 --- a/iceprog/iceprog.c +++ b/iceprog/iceprog.c @@ -470,6 +470,7 @@ static void help(const char *progname) fprintf(stderr, " (append 'k' to the argument for size in kilobytes,\n"); fprintf(stderr, " or 'M' for size in megabytes)\n"); fprintf(stderr, " -s slow SPI (50 kHz instead of 6 MHz)\n"); + fprintf(stderr, " -k keep flash in powered up state (i.e. skip power down command)\n"); fprintf(stderr, " -v verbose output\n"); fprintf(stderr, " -i [4,32,64] select erase block size [default: 64k]\n"); fprintf(stderr, "\n"); @@ -546,6 +547,7 @@ int main(int argc, char **argv) bool slow_clock = false; bool disable_protect = false; bool disable_verify = false; + bool disable_powerdown = false; const char *filename = NULL; const char *devstr = NULL; int ifnum = 0; @@ -563,7 +565,7 @@ int main(int argc, char **argv) /* Decode command line parameters */ int opt; char *endptr; - while ((opt = getopt_long(argc, argv, "d:i:I:rR:e:o:cbnStvspX", long_options, NULL)) != -1) { + while ((opt = getopt_long(argc, argv, "d:i:I:rR:e:o:cbnStvspXk", long_options, NULL)) != -1) { switch (opt) { case 'd': /* device string */ devstr = optarg; @@ -665,6 +667,9 @@ int main(int argc, char **argv) case 'X': /* disable verification */ disable_verify = true; break; + case 'k': /* disable power down command */ + disable_powerdown = true; + break; case -2: help(argv[0]); return EXIT_SUCCESS; @@ -1004,7 +1009,8 @@ int main(int argc, char **argv) // Reset // --------------------------------------------------------- - flash_power_down(); + if (!disable_powerdown) + flash_power_down(); set_cs_creset(1, 1); usleep(250000); |