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?