From 235505c660f94a83ce448f8fb4661b228324d476 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Mon, 12 Oct 2020 15:34:50 +0200 Subject: [PATCH] gowin: - increase delay before checking CRC - fix message --- src/gowin.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gowin.cpp b/src/gowin.cpp index 2e8e336..0cf6ba6 100644 --- a/src/gowin.cpp +++ b/src/gowin.cpp @@ -139,15 +139,15 @@ void Gowin::programFlash() wr_rd(NOOP, NULL, 0, NULL, 0); /* wait for reload */ - usleep(150*1000); + usleep(2*150*1000); /* check if file checksum == checksum in FPGA */ status = readUserCode(); if (_fs->checksum() != status) { - printError("SRAM Flash: FAIL"); + printError("CRC check : FAIL"); printf("%04x %04x\n", _fs->checksum(), status); } else - printSuccess("SRAM Flash: Success"); + printSuccess("CRC check: Success"); if (_verbose) displayReadReg(readStatusReg()); @@ -376,7 +376,7 @@ bool Gowin::flashFLASH(uint8_t *data, int length) memcpy(buffer+6*4, data, byte_length); - ProgressBar progress("Flash SRAM", buffer_length, 50); + ProgressBar progress("write Flash", buffer_length, 50); for (int i=0, xpage=0; xpage < nb_xpage; i+=(nb_iter*4), xpage++) { wr_rd(CONFIG_ENABLE, NULL, 0, NULL, 0);