Cannot Program Olimex ICE40HX1K-EVB Development Board with HW-USBN-2B cable.

Started by rkirstein, November 18, 2021, 01:39:00 am

Previous topic - Next topic

rkirstein

I have spent about 10 hours now trying to figure out how to program the WinBond W25Q16 SPI configuration flash on an Olimex ICE40HX1K-EVB development board. The design was done using ICECube2 2020.12 and Modelsim for simulation. I downloaded and installed the latest version of the Diamond programmer and updated the firmware in the HW-USBN-2B on Sunday 11/15/2021.

I can program the ICE40HX1K CRAM with the programmer and it works perfectly, but when I set up to program the serial flash I get an error reading the device ID: ERROR - FunctionCHECK_ID Data Expected h14, Actual: hFF. I read through all the programming/configuration information I could find on the ICE40 but still could not get this to work.

Taking a look at this with a scope, it appears that the cable is driving ispEN and TRST (SPI_SS and CRESET_N) high at the same time, causing the ICE40HX1 to come up as an SPI master, which collides with the programming cable as it tries to program the flash. I tried just about every setting I could find but was unable to get the ispEN signal to delay relative to CRESET as required in App Note TN02001-3-3. Any help is greatly appreciated! Bob

rkirstein

OK, I figured out the problem - The ICE40HX1K-EVB Development Board requires the TDI/SI and TDO/SO leads from the  HW-USBN-2B programming cable to be swapped between FPGA CRAM and SPI Flash programming. Unfortunately, this wasn't wasn't mentioned in any of the documentation so I had to figure it out with a scope.