I successfully made an adapter cable that connects iCE40HX1K-EVB to a 'FT2232H MINI MODULE' that works with the "Diamond Programmer" utility.
- UART RX and TX is not connected, since I do not use that in my test project (They should connect to BDBUS0 and BDBUS1)
- "Scan SPI Flash Device" command for some unknown reason
I used the following documentations:
- https://www.ftdichip.com/Support/Documents/DataSheets/Modules/DS_FT2232H_Mini_Module.p
df
- EB82-iCEstick_User_Manual.pdf
- https://github.com/OLIMEX/iCE40HX1K-EVB/blob/master/iCE40HX1K-EVB_Rev_B.pdf
The naming scheme for MOSI and MISO in some documentation use SO and SI but mixing if it is in relation to master or slave.
The FT2232H module needs a jumper connecting VBUS (power from USB) to VCC (input for the voltage generators).
The FT2232H module needs to connect VIO to V3V3 in order to define the target voltage.
When connecting a flat ribbon cable to the FT2232H module, the connector is on the reverse side causing the pin order to be a bit messed up: 2, 1, 4, 3, 6, 5, 8, 7 and so on"
iCE40HX1K-EVB_Rev_B:
********
(NO, 3.3V) * 1 2 * GND GND
(NO, RXD) * 3 4 * (NO, TXD)
ADBUS6 iCE40-CDONE * 5 6 * iCE40-CRESET ADBUS7
ADBUS2 iCE40-SDI * 7 8 * iCE40-SDO ADBUS1
ADBUS0 iCE40-SCK * 9 10 * iCE40-SS_B ADBUS4
********
FT2232H Mini Module:
CN2
*********
/--V3V3 V3V3 * 1 2 * GND GND
| V3V3 * 3 4 * GND
| V3V3 * 5 6 * GND
| iCE40-SCK AD0 * 7 8 * RESET#
| iCE40-SDI AD2 * 9 10 * AD1 iCE40-SDO
\--V3V3 VIO * 11 12 * AD3
AD5 * 13 14 * AD4 iCE40-SS_B
iCE40-CRESET AD7 * 15 16 * AD6 iCE40-CDONE
AC1 * 17 18 * AC0
AC3 * 19 20 * AC2
VIO * 21 22 * AC4
AC6 * 23 24 * AC5
SUSPEND# * 25 26 * AC7
*********
CN1
*********
/--JUMPER VBUS * 1 2 * GND
\--JUMPER VCC * 3 4 * GND
CS * 5 6 * CLK
DATA * 7 8 * PWREN#
BC7 * 9 10 * BC6
BC5 * 11 12 * VIO
BC4 * 13 14 * BC3
BC2 * 15 16 * BC1
BC0 * 17 18 * BD7
BD6 * 19 20 * BD5
BD4 * 21 22 * VIO
BD3 * 23 24 * BD2
BD1 * 25 26 * BD0
*********
Hey mywave82 thanks for this tutorial. (I'm newbie to the world of FPGA)
I am trying to follow it, my components are:
- Olimex ICE40HX1K-EVB
(Note: CN3 instead CN1)
- Lattice FT2232H-56Q MINI MDL
I have connected pins as on your diagram:
WIRE | ICE40HX1Kz-EVB | FT2232H-56Q MINI MDL
---------------------------------------------------------
BROWN | GND | CN2 GND
ORANGE | CDONE | CN2 AD6
YELLOW | CRESET | CN2 AD7
WHITE | SDI | CN2 AD2
PURPLE | SDO | CN2 AD1
BLUE | SCK | CN2 AD0
GREEN | SS_B | CN2 AD4
BLACK | --- | CN3 VBUS to CN3 VCC
RED | --- | CN3 V3V to CN3 VIO
When trying to execute:
iceprog -t
or even
iceprog -t -s
it says:
init..
cdone: low
reset..
cdone: low
Extended Device String Length is 0xFF, this is likely a read error. Ignoring...
flash ID: 0xFF 0xFF 0xFF 0xFF
cdone: low
(that is, when i hold Olimex reset button, if reset button is not pressed, then cdone is: high)
I also read somewhere that longer cables might be the issue. Mine are around 20cm.
I wonder if my cable connections are wrong or perhaps perhaps something else going on?
Thanks for clues.
(https://i.ibb.co/DHp1FJQY/FT2232-H-56-Q.jpg) (https://ibb.co/fzvXWgH9)
(https://i.ibb.co/dwLhrjTW/ICE40-HX1-K-EVB.jpg) (https://ibb.co/G4th0n6x)
I believe the UEXT orientation is wrong. I mean the brown wire that should be connected to UEXT pin 2 is in fact connected to UEXT pin 9. Refer to this picture, pay attention to the UEXT connector cut (opening) in the picture:
https://www.olimex.com/Products/Modules/UEXT/images/UEXT-PINS.jpg
Hey LubOlimex,
Great, thanks! That worked, once I "rotated" all my cable connections I got the propper response:
init..
cdone: high
reset..
cdone: low
flash ID: 0x1C 0x70 0x15 0x1C 0x70 0x15 0x1C 0x70 0x15 0x1C 0x70 0x15 0x1C 0x70 0x15 0x1C 0x70 0x15 0x1C 0x70 0x15 0x1C 0x70 0x15 0x1C 0x70 0x15 0x1C 0x70 0x15 0x1C 0x70
cdone: high
Bye.