Working with FTDI library for accessing FPGA memory

Discussion in 'Embedded Systems and Microcontrollers' started by gpuguy, May 15, 2013.

  1. gpuguy

    Thread Starter New Member

    May 15, 2013

    I am a bit new in embedded programming. I am having MACHX02 1200 ZE breakout board.
    I am using FTDI Library FTCSPI to access Lattice FPGA UFM through FTDI chip FT2232H. I configured the FPGA in SPI slave by using IPExpress. I am confident that teh FPGA is now configured well as the following code is giving me correct value of device Id.
    This prints:

    I wrote
    WriteControlBuffer[0]=224; //0xe0
    because the Lattice FPGA UFM programming guide on page no. 17-61 says that the command for reading device Id is E0 or 224 in decimal.
    Now the next problem I am facing is regarding the usage of the code for verifying device ID i.e 0xE2 00 00 00 01 2B 20 43. Below is a screen shot of the page I am talking about:
    Now I am unable to understand which function from FTDI library I have to use for this purpose. SPI_ReadHiSpeedDevice is used for reading some data. But here I have to verify, so wondering if the library has any other function for such purpose.
    If not then what could be the other way to pass the command E2 with the inputs 01 2B 20 43 as is shown in the Lattice programming guide and screenshot above.