Hello, I'm trying to program the flash via `make ...
# clear
h
Hello, I'm trying to program the flash via
make flash
. However, I get the following error:
Winbond SRAM not found
. Anyone have any experience with this?
Here is the full output:
Copy code
generating hex for [and_gate_LA]
python3 ../util/ftdi_flash.py and_gate_LA.hex
Success: Found one matching FTDI device at <ftdi://ftdi:232>h:1:10/1
 
Resetting Flash...
status = 0xff
 
JEDEC = b'ffffff'
Winbond SRAM not found
make: *** [../common/common_makefile.mk:38: flash] Error 1
m
I think remember running into that error once when I accidently loaded a program that overloaded an FPGA GPIO output to the flash SPI pins. I don't remember how I recovered from it though. I think maybe I held down the reset button while programming again with the basic caravel binky program?
There is the dedicated J7 SPI connector if all else fails
If you are just getting started with CLEAR I would recommend inspecting, building, and loading the "non-LA" samples first as they are simpler in design and operation
h
I can't seem to recover from it, so I'll try to use the J7 SPI header. Thanks!
m
There's a 1 input 2 output mux switch chip between the FT232H and the Caravel vs Flash SPI which according to the stock Caravel board schematic is controlled by ACBUS0 (FTDI BUS C GPIO 0) but I note the comments at https://github.com/efabless/clear/blob/main/firmware/util/ftdi_flash.py#L159-L160 suggest it's flipping ACBUS5/BUS C GPIO 5.
I guess I'll have to pull out my boards and confirm electrically what is going on here, I remember this being a confusing point for me previously
I believe it's more likely to be GPIO 5 in order leave the lower number pins to be (optionally) connected to the caravel UART
h
It took me a while, but I finally found a solution. The trick for me is using
caravel_hkflash.py
instead of the
ftdi_flash.py
. I'm not super familiar with FTDI, but it seems
caravel_hkflash.py
toggles a different set of FTDI gpio pins compared to
ftdi_flash.py
. Previously, I read that
caravel_hkflash.py
didn't work for some people on this channel, while
ftdi_flash.py
did, so while I do find it strange that the opposite was true for me, I'm just glad I'm finally able to program the flash. Thanks for your help!
m
Hmm okay.. glad to hear you figured it out. Only things I can think of is either A) there are different revisions of the caravel core boards (both of mine have "Revision 1B" silkscreened on them) or maybe the EEPROM config in the FT323H chip was set differently from mine/others. Also recently I've been working also with some GOWIN FPGA boards that sometimes requires some manually disabling of the "ftdi_sio" module driver/probing in my Linux installation (uses a BL702 chip pretending to be a FTDI USB to JTAG bridge chip to program) so there is a remote possibility that is somehow skewing my tests/results as well.
Yeah I don't know what to tell you... ftdi_flash.py is what still works for me
FWIW the FTDI chip on my board has no EEPROM, and is set by default to "RS232 UART" mode. Drive current for all pins is 4mA and the CBUS pins are set to "Tristate".
h
My Caravel board says REV 5A, so it could be a revision difference
m
Seems likely to me... FWIW I just ordered another board from store.efabless.com so maybe I'll get a REV 5A one or newer this time and I can confirm. My current two came from the initial GroupGets round - so some differences are probably to be expected.