Post Go back to editing

SPORT clocks out a unnecessary clocks before first word, why?

I'm using a ADSP-SC573. I setup an SPORT.

Why does the SPORT send unnecessary clocks before sending the actual first byte. This is a waste of time (see figure below, red marking).

I setup my SPORT like this:

    /* open the SPORT driver */

     * Use the driver API's to configure SPORT
     * adi_sport_ConfigData();
     * adi_sport_ConfigClock();
     * adi_sport_ConfigFrameSync();
    /* configure the sport for data length, LSB first etc */
    eResult = adi_sport_ConfigData(hDeviceTx, // hDevice
        ADI_SPORT_DTYPE_ZERO_FILL, // eDataType
        7, // nWordLength (7 = 8 bits)
        false, // bLSBFirst (false : MSB first (Big endian) )
        false, // bEnablePack (false : Disable DMA packing)
        false); // bRightJustifiedMode (only for I2S mode)

    /*configure the clock for the SPORT. This API set the whether use the internal clock, SPORT clock etc */
    eResult = adi_sport_ConfigClock(hDeviceTx, // hDevice
        100, // nClockRatio
        true, // bUseIntlClock (true : Device configured to use Internal clock)
        true, // bFallingEdge (true : Use falling edge of the clock)
        false); // bGatedClk (false : Disable gated clock mode)

    /* Configure the frame sync. This API configure the SPORT whether to use frame sync or not , external or internal framesync etc */
    eResult = adi_sport_ConfigFrameSync(hDeviceTx, // hDevice
        8, // nFsDivisor  (8 clk slots where FS is not active)
        true, // bFSRequired (true : Device requires a frame sync for its operation)
        true, // bInternalFS (true : Use internal frame sync)
        false, // bDataFS (false : Use data-dependent frame sync)
        false, // bActiveHighFS (true : Use active high frame sync)
        false, // bLateFS (false : Use Early frame sync)
        false); // bEdgeSensitiveFS

    /* Enable the DMA mode */
    eResult = adi_sport_EnableDMAMode(hDeviceTx, true);

    /* Register a callback for the DMA */
    eResult = adi_sport_RegisterCallback(hDeviceTx, SportCallback, NULL);

The data I'm sending is:

uint8_t data[] = {0x81, 0x00, 0xF0, 0xF0, 0xBA, 0xAD, 0xC0, 0xFE, 0xEA, 0x31, 0xC0, 0x00, 0x12, 0x34, 0x56, 0x78};

Am I doing something in my setup to cause this behaviour?

Had to change a comment in the inserted code.
[edited by: masip at 7:41 AM (GMT -4) on 24 May 2021]