1) Both 24 Bit and 32 Bit GPIF Configuration is not available with SPI. You have to either go to 8 Bit or 16 Bit GPIF Interface. If you want to use 32 Bit or 16 Bit, you cannot have FX3's default SPI Block. But you can create a SPI interface by firmware by bit banging few GPIOs. For SPI through Bit Banging, please refer our example project in "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbspigpiomode" in FX3 SDK.
2) If you are using SPI Interface only for booting the FX3 (loading FX3's firmware), then you can use 32 Bit or 24 Bit GPIF after booting, when SPI is not used.
3) For using 24 Bit interface, we do not have any example projects, but it is simple and same as 32 Bit interface. For creating a 24 Bit interface, make sure that in your firmware:
The CyU3PDeviceConfigureIOMatrix API, the use32bit field is set as CyTrue. (This field is set to true if you are using
Also, in the GPIF II designer, you need to select the bus width as 24.
4) If you want to use both 24 Bit GPIF and SPI after booting, if possible, you can keep one enabled at a time.
For example, initially if you want to use SPI, Initally call CyU3PDeviceConfigureIOMatrix API with use32bit fields set as CyFalse and useSpi field as CyTrue.
Once you have finished using the SPI, you can call the CyU3PDeviceConfigureIOMatrix API with use32bit fields set as CyTrue and useSpi field as CyFalse. (Before calling this, make sure that the GPIF, PIB, SPI Blocks are de-initialized using the corresponding APIs)
- Madhu Sudhan
I am looking into the same topic.
The GPIF II Designer suggests that you can enable SPI and 24bit (it only greys out the 32 bit option, also an error is displayed only with 32bit and not 24bit).
Similarly, the CX3's internal GPIF can be configured to 24bit while maintaining the SPI block functionality.
So the question is, what is the CX3's fixed GPIF config set to to achieve this?
I have two questions regarding the 24 bit GPIF
- From the FX3 API Guide provided , it has mentioned that all of the SPI, UART and I2S interfaces can be used in 8, 16 and 24 bits wide GPIF Interfaces. [section 220.127.116.11] [section 18.104.22.168]
- Even after the use32bit field is set as CyFalse in CyU3PDeviceConfigureIOMatrix API am still able to receive data through the FPGA through the 24 bit GPIF. Can u please rectify this ?
Just to add some context for others who found this page looking for 24-bit support and not finding it, especially when using Linux or MacOS.
If you download the GPIF II Designer directly from the Cypress website it does not support setting 24-bit mode. The version number is 1.0.837.1 and was updated in 2012.
If you download the Windows FX3 SDK you will find a newer version of GPIF II Designer - build 1.0.1198.2 - from 2014 which does support setting 24-bit mode. In Linux you can simple extract the cygpif2designer.msi from inside the FX3SDKSetup_1.3.4.exe to avoid installing the whole SDK.
This is important to know if you are not developing on Windows. Hope this helps someone else.