4 Replies Latest reply on Jun 25, 2020 4:35 PM by grwh_4681056

    24 bit GPIF II interface?

      I'm planning a project using an FX3 communicating with an FPGA on the GPIF II interface.  I need to have the SPI port, so I can't use 32 bit mode.  The project parameters recently changed, so I'm looking to get as much throughput as possible, so I'd like to use 24 bit mode for a slave fifo like interface.  GPIF II designer and some documentation allow 24 bit interfaces, but the documentation on actually using a 24 bit interface is incomplete.  Are there an firmware examples available for initializing a 24 bit interface?

         

       

         

      Also, if I'm using a Bulk IN, how will the 24 bit data transfer to the PC?

         

       

         

      Thanks,

         

      James

        • 1. Re: 24 bit GPIF II interface?

          Hi James,

             

          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)
           

             

          Regards,

             

          - Madhu Sudhan

          • 2. Re: 24 bit GPIF II interface?

            Hello,
            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?

               

            Regards
            Boris

            • 3. Re: 24 bit GPIF II interface?
              KaS_3578976

              Hi Madhu,

               

              I have two questions regarding the 24 bit GPIF

               

              1. 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  5.11.2.2] [section 5.11.3.1]
              2. 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 ?
              • 4. Re: 24 bit GPIF II interface?
                grwh_4681056

                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.