From bd917d51efb574aa64ea5ec12ea89d60b7e0c5e8 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Sun, 10 Dec 2023 08:14:06 +0100 Subject: [PATCH] gowin: try second eraseSRAM before writeSRAM. Not always working but better... --- src/gowin.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gowin.cpp b/src/gowin.cpp index 1e5f52a..81d603a 100644 --- a/src/gowin.cpp +++ b/src/gowin.cpp @@ -353,6 +353,13 @@ void Gowin::programSRAM() if (!eraseSRAM()) return; + /* GW5AST-138k WA. Temporary until found correct solution/sequence */ + if (is_gw5a && _idcode == 0x0001081b) { + printf("double eraseSRAM\n"); + if (!eraseSRAM()) + return; + } + /* load bitstream in SRAM */ if (!writeSRAM(_fs->getData(), _fs->getLength())) return;