Codechanged - noritan/SlaveFifoSyncNtan011 GitHub Wiki

Codes Changed

Following codes are changed from the example project SlaveFifoSync.

Table of Contents

cyfxslfifosync.c

This is the main program file of this application.

GPIF II configuration file

The example project SlaveFifoSync is using the original GPIF II configuration file "cyfxgpif_syncsf.h" for the Slave FIFO interface. This project includes "consumer.cydsn/cyfxgpif2config.h" to use a dedicated source/sink GPIF II hardware.

Burst length configuration for endpoints

The burst length parameter for all endpoints are modified in SuperSpeed mode.

    epCfg.burstLen = (usbSpeed == CY_U3P_SUPER_SPEED) ?
        (CY_FX_EP_BURST_LENGTH) : 1;
The actual burst length value is described in the header file. In this project, the burst length value for both bulk-in and -out endpoints is set to same value.

Buffer size configuration for DMA Channels

The buffer size of all DMA Channels are modified.

    CyU3PMemSet ((uint8_t *)&dmaCfg, 0, sizeof (dmaCfg));
    /* The buffer size will be same as packet size for the
     * full speed, high speed and super speed non-burst modes.
     * For super speed burst mode of operation, the buffers will be
     * 1024 * burst length so that a full burst can be completed.
     * This will mean that a buffer will be available only after it
     * has been filled or when a short packet is received. */
    dmaCfg.size  = (size * CY_FX_EP_BURST_LENGTH);
    /* Multiply the buffer size with the multiplier
     * for performance improvement. */
    dmaCfg.size *= CY_FX_DMA_SIZE_MULTIPLIER;
The buffer size is multiplied by the burst length and the multiplier parameter declared in the header file.
⚠️ **GitHub.com Fallback** ⚠️