5 Replies Latest reply on Jun 11, 2019 11:10 PM by SrinathS_16

    GPIFII for 32bit data transfer using UVC and FX3

    analc_2415406

      Hi,

      For our application, we need GPIF 32 bit for communicating between FX3 and Artix7 FPGA. A design was made in GPIFII designer following AN75779 as we need UVC for streaming video from a camera sensor. In GPIFII designer, interface was changed to 32 bit and LD_DATA_COUNT and LD_ADDR_COUNT was adjusted as per instructions mentioned in the datasheet. We have attached the GPIFII designer project for perusal. It would be great if someone can confirm whether the project and files generated are correct.

      We were getting errors in DMA channel commit. While changing to 32bit implementation, we have modified the following.

      • /* UVC Probe Control Settings for a USB 3.0 connection. */

      uint8_t glProbeCtrl[CY_FX_UVC_MAX_PROBE_SETTING] = { 0x00, 0x00, /* bmHint : no hit */

      0x01, /* Use 1st Video format index */

      0x01, /* Use 1st Video frame index */

      0x0A, 0x8B, 0x02, 0x00, /* Desired frame interval in the unit of 100ns: 60 fps */

      0x00, 0x00, /* Key frame rate in key frame/video frame units: only applicable

      to video streaming with adjustable compression parameters */

      0x00, 0x00, /* PFrame rate in PFrame / key frame units: only applicable to

      video streaming with adjustable compression parameters */

      0x00, 0x00, /* Compression quality control: only applicable to video streaming

      with adjustable compression parameters */

      0x00, 0x00, /* Window size for average bit rate: only applicable to video

      streaming with adjustable compression parameters */

      0x00, 0x00, /* Internal video streaming i/f latency in ms */

      //OPENCV

      0xF0, 0xF9, 0x2C, 0x00, /* Max video frame size in bytes */

      0x00, 0x78, 0x00, 0x00 /* No. of bytes device can rx in single payload = 30 KB */

      };

       

      /* UVC Probe Control Setting for a USB 2.0 connection. */

      uint8_t glProbeCtrl20[CY_FX_UVC_MAX_PROBE_SETTING] = { 0x00, 0x00, /* bmHint : no hit */

      0x01, /* Use 1st Video format index */

      0x01, /* Use 1st Video frame index */

      0x0A, 0x8B, 0x02, 0x00, /* Desired frame interval in the unit of 100ns: 15 fps */

      0x00, 0x00, /* Key frame rate in key frame/video frame units: only applicable

      to video streaming with adjustable compression parameters */

      0x00, 0x00, /* PFrame rate in PFrame / key frame units: only applicable to

      video streaming with adjustable compression parameters */

      0x00, 0x00, /* Compression quality control: only applicable to video streaming

      with adjustable compression parameters */

      0x00, 0x00, /* Window size for average bit rate: only applicable to video

      streaming with adjustable compression parameters */

      0x00, 0x00, /* Internal video streaming i/f latency in ms */

      // OPENCV.

      0xF0, 0xF9, 0x2C, 0x00, /* Max video frame size in bytes */

      0x00, 0x78, 0x00, 0x00 /* No. of bytes device can rx in single payload =30KB */

      };

       

      • /* UVC Video Streaming Endpoint Packet Size */

      #define CY_FX_EP_BULK_VIDEO_PKT_SIZE    (0x400)         /* 1024 Bytes */

      /* UVC Video Streaming Endpoint Packet Count */

      #define CY_FX_EP_BULK_VIDEO_PKTS_COUNT  (0x1E)          /* 16 packets (burst of 16) per DMA buffer. */

      /* DMA buffer size used for video streaming. */

      #define CY_FX_UVC_STREAM_BUF_SIZE      (CY_FX_EP_BULK_VIDEO_PKTS_COUNT * CY_FX_EP_BULK_VIDEO_PKT_SIZE)  /* 16 KB */

      /* Maximum video data that can be accommodated in one DMA buffer. */

      #define CY_FX_UVC_BUF_FULL_SIZE        (CY_FX_UVC_STREAM_BUF_SIZE - 16)

      /* Number of DMA buffers per GPIF DMA thread. */

      #define CY_FX_UVC_STREAM_BUF_COUNT     (4)

       

      • DQ32bit is set to true, SPI is disabled

       

      is there any change we need to make in DMA width or something to get successful transactions or CY_U3P_PIB_GPIF_BUS_CONFIG field