I've started a new thread for this, as it's not related to dfu-util.
I'm having some weird problems reliably loading certain Ice40 .bin files from FLASH (0x0801F000) on the new BlackIce II board. But the same .bin files work when loaded over USB.
If I program the alternating LEDs .bin file into FLASH, it loads from FLASH 100% of the time.
If I program the Beeb FPGA .bin file into FLASH, it loads very occasionally, but normally generates an error.
The specific error I'm seeing is
Mystorm version 0.35 Ice40Beeb Bootloader version 10
Programming from flash
CDONE not set
Yet if I then send the same .bin file over USB, it works 90% of the time (the other 10% I see the same error).
I've confirmed with a scope that CDONE really doesn't go high in the failure cases.
In an attempt to debug this, I wanted to observe the SPI programming interface on my Logic Analyzer. So I made a couple of changes to IceBoot to enable the mux during programming, with the direction set towards the RPI header. Specifically, in two places I changed:
This let me successfully observe the SPI signals used for programming,
But somewhat to my surprise, it has also completely resolved the original issue. And now the same Beeb FPGA .bin file that was almost never loading before is now loading 100% of the time.
I've been back and too between the two versions of IceBoot a couple of times, just to make really sure nothing else was changing.
All I can think is there is a signal integrity issue with the SPI signals, and turning on the Mux adds a bit more load, maybe dampening a ringing clock. But that's just a guess...