Open denis2342 opened 1 year ago
Hi,
With your commit i can't compile : "FTDI_CTS" unable to resolve identifier "FTDI_CTS" on spi.c file.
it is defined in hardwarev3.h line 104 and 105:
Hi,
Indeed, the issue is with BUSPIRATEV4 board. Could you add
...
...
to exclude your patch for BUSPIRATEV4 board.
small explanation how this patch is 30 seconds faster on a 4MB flash.
the flashrom software reads the flash in chunks of 2kb blocks. the FTDI chip sends the data in even smaller chunks over the USB interface. But the last chunk of the 2KB does not fill the buffer so the FTDI chip waits up to 16ms before it sends a not completely full buffer. Toggling the CTS line flushes the buffer immediately. 4MB flash divided by 2KB are 2048 transfers where we can save 16ms which is (in theory) 32.768 seconds.
for further reading: https://ftdichip.com/wp-content/uploads/2020/08/AN232B-04_DataLatencyFlow.pdf
with this patch I could cut down the time to read a 4MB spi flash from 1min to 30sec.