- increase delay before checking CRC
- fix message
This commit is contained in:
Gwenhael Goavec-Merou 2020-10-12 15:34:50 +02:00
parent adb6efca39
commit 235505c660
1 changed files with 4 additions and 4 deletions

View File

@ -139,15 +139,15 @@ void Gowin::programFlash()
wr_rd(NOOP, NULL, 0, NULL, 0); wr_rd(NOOP, NULL, 0, NULL, 0);
/* wait for reload */ /* wait for reload */
usleep(150*1000); usleep(2*150*1000);
/* check if file checksum == checksum in FPGA */ /* check if file checksum == checksum in FPGA */
status = readUserCode(); status = readUserCode();
if (_fs->checksum() != status) { if (_fs->checksum() != status) {
printError("SRAM Flash: FAIL"); printError("CRC check : FAIL");
printf("%04x %04x\n", _fs->checksum(), status); printf("%04x %04x\n", _fs->checksum(), status);
} else } else
printSuccess("SRAM Flash: Success"); printSuccess("CRC check: Success");
if (_verbose) if (_verbose)
displayReadReg(readStatusReg()); displayReadReg(readStatusReg());
@ -376,7 +376,7 @@ bool Gowin::flashFLASH(uint8_t *data, int length)
memcpy(buffer+6*4, data, byte_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++) { for (int i=0, xpage=0; xpage < nb_xpage; i+=(nb_iter*4), xpage++) {
wr_rd(CONFIG_ENABLE, NULL, 0, NULL, 0); wr_rd(CONFIG_ENABLE, NULL, 0, NULL, 0);