Open andrew-palamar opened 4 months ago
Is it's possible you share the board's schematic? I observe a timeout, I suspect is it related to write enable command. This may happen if some glitches appears during the WEN send operation.
Thank you for fast reply. Please look at attached SPI flash connection schematic.
It additionally has 100 nF capacitor at VCC. Only thing I could observe is that CS lacks PullUp resistor. Could this be the problem?
Using Gowin programmer this flash writes just fine
Info: Target Cable: Gowin USB Cable(FT2CH)/0/0/null
Info: Operation "exFlash Erase,Program,Verify thru GAO-Bridge" is starting on device-1...
Info: Loading GAO-Bridge...
Info: spi flash Winbond W25Q64BV found!
Info: Erasing 221 sectors from address 0x000000 to 0x0dd000...
Info: Program and Verify flash successfully.
Info: Cost 28.99 second(s)
Could it be that W25Q64BV needs special treatment?
Could I just Increase Timeout delay in the code? If so, please kindly tell where it should be done.
Is the board is publicly available? If the spiflash is known by openFPGALoader this mean it has already used with another board: spiFlash driver is not related to gowin but it's a independant piece of code using FPGA's driver as lowlevel.
In fact it's hard to say without the hardware because gowin provides documentation with a really poor quality, so maybe something it's not enough stable in your specific case....
No. This board is not available publicly. I see. Still could I somehow increase timeout delay to check if it helps somehow?
Well I could try to inspect flashing process of the same bitstream on Gowin programmer and openFPGALoader using Logic Analyzer to see the difference. Will post information if will find something interesting.
One more question. Could I set different JTAG Frequency instead of 10MHz to match Gowin Programmer`s frequency?
Nevermind. Found --freq
argument. Will try to lower frequency first to check if it helps somehow.
UPD: Lowering frequency didn’t help.
P.S. Datasheet says that W25Q64BV could be used @ 80MHz.
Frequency for Gowin's FPGAs is fixed at constructor time: it's something I have to modify to adapt/check requested frequency. I have tested with two sipeed boards (nano20k and primer20k) without issues. I suspect an issue related to the hardware (but maybe I'm wrong).
Hello. Trying to use your program to flash / dump external flash 25Q64 on custom board with GW2A-LV18EQ144C8 FPGA part in LQ144 package. The reading seems to work fine at first look. But I`m unable to flash correctly. What can I do to debug and / or fix this issue? Could you point me in right direction? Thanks in advance!
Writing
Results
Reading
Results
Had no chance to compare dumped binary with bitstream file because it needs to be converted first.