CyU3PDmaChannelCommitBuffer() and CyU3PDmaChannelSetWrapUp() Returns INVALID_SEQUENCE Errors When Using 32-Bit GPIF™ II Interface - KBA85503

Version 1
    Version: **


    Question: Why does CyU3PDmaChannelCommitBuffer() and CyU3PDmaChannelSetWrapUp() return the CY_U3P_ERROR_INVALID_SEQUENCE error when using 32-bit GPIF™ II interface?



    The default system clock frequency is 384 MHz when using a 19.2-MHz crystal/clock source. However, this frequency setting may cause DMA overflow errors when the GPIF is configured as a 32-bit wide interface and runs at 100 MHz.

    To solve this, the system clock must be set to 403.2 MHz by setting the setSysClk400 parameter in the clock configuration structure of the DeviceInit call (in main()).

    CyU3PSysClockConfig_t clockConfig;
    clockConfig.setSysClk400 = CyTrue;
    clockConfig.cpuClkDiv = 2;
    clockConfig.dmaClkDiv = 2;
    clockConfig.mmioClkDiv = 2;
    clockConfig.useStandbyClk = CyFalse;
    clockConfig.clkSrc = CY_U3P_SYS_CLK;
    status = CyU3PDeviceInit (&clockConfig);