aboutsummaryrefslogtreecommitdiffstats
path: root/iceprog
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-08-15 13:31:53 +0200
committerGitHub <noreply@github.com>2019-08-15 13:31:53 +0200
commit95949315364f8d9b0c693386aefadf44b28e2cf6 (patch)
tree26a3155fd2a7cb198143d51aec79deef9c98b8a8 /iceprog
parentc59638c624d794e845cf00cd90ca6fc1ec5f37b5 (diff)
parenta7c42cd29b6bda83b8f08bba755cd5f20a582de7 (diff)
downloadicestorm-95949315364f8d9b0c693386aefadf44b28e2cf6.tar.gz
icestorm-95949315364f8d9b0c693386aefadf44b28e2cf6.tar.bz2
icestorm-95949315364f8d9b0c693386aefadf44b28e2cf6.zip
Merge pull request #230 from smunaut/fix_flash_reset
iceprog: Better reset of flash
Diffstat (limited to 'iceprog')
-rw-r--r--iceprog/iceprog.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/iceprog/iceprog.c b/iceprog/iceprog.c
index aaba285..f38b133 100644
--- a/iceprog/iceprog.c
+++ b/iceprog/iceprog.c
@@ -200,12 +200,10 @@ static void flash_read_id()
static void flash_reset()
{
- flash_chip_select();
- mpsse_xfer_spi_bits(0xFF, 8);
- flash_chip_deselect();
+ uint8_t data[8] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
flash_chip_select();
- mpsse_xfer_spi_bits(0xFF, 2);
+ mpsse_xfer_spi(data, 8);
flash_chip_deselect();
}