This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6747. EDMA3 8 channels muxed data demux

Hello TI' teams.

My c64 device capture the paked data looked as is following:

A0-B0-C0-D0-E0-F0-G0-H0-A1-B1-C1-D1-E1-F1-G1-H1-A2-B2-.... -A511-B511-C511-D511-E511-F511-G511-H511


Where:
A,B,C,D,E,F,G,H - channel' number, and 0,1,..511 - sample number from corresponded channel.
Each sample has 32 bits width - one word size.
In other words: muxed data from 8 channels in size 8x512 words - 16K bytes totally.
I need to demux this packed data and reorder it into single buffer as is following:

A0-A1-A2-...-A511
B0-B1-B2-...-B511
C0-C1-C2-...-C511
D0-D1-D2-...-D511
.................
H0-H1-H2-...-H511

where data looked sequentially:
first 512 samples into target buffer - are samples from channel A, second 512 samples - are samples from channel B, etc...

I use AB-synchronized transfer. Because itsn't possible to demux this data with single trigger event used channel that can be chained to itslef.

EDMA PARAMS are as following:

    VOLATILE UInt32 opt= CSL_EDMA_OPT_MAKE
         (
            CSL_EDMACC_OPT_ITCCHEN_ENABLE,
            CSL_EDMACC_OPT_TCCHEN_DISABLE,
            CSL_EDMACC_OPT_ITCINTEN_DISABLE,
            CSL_EDMACC_OPT_TCINTEN_ENABLE,
            chnlTcc,
            CSL_EDMACC_OPT_TCCMODE_NORMAL,
            CSL_EDMACC_OPT_FWID_8,
            CSL_EDMACC_OPT_STATIC_NORMAL,
            CSL_EDMACC_OPT_SYNCDIM_ABSYNC,
            CSL_EDMACC_OPT_DAM_INCR,
            CSL_EDMACC_OPT_SAM_INCR
         );

    param_channel[0] = opt;
   /* Source buffer ptr                    */
    param_channel[1] = (UInt32)pSrc;
                        /* BCNT = 8             |    ACNT = 4   */
    param_channel[2] = 0x00080004;
   /* Destination buffer ptr               */
    param_channel[3] = (UInt32)pDst;
                        /* DSTBIDX = 2048       | SRCBIDX  = 1  */
    param_channel[4] =  (wordsSizeX << 2) << 16 | 1;
                        /* BCNTRLD = 0          | LINK = 0xFFFF */
    param_channel[5] = 0x0000FFFF;
                        /* DSTCIDX = 4          | SRCCIDX = 32  */
    param_channel[6] = 0x00040020;
                        /*                      | CCNT = 512    */
    param_channel[7] = 512;
 

I mean:

ACNT - size of single sample in bytes = 4

BCNT - number of channels = 8

CCNT - number of samples into single channel = 512

But data in target buffer isn't looks demuxed correctly.

Please help me fix the problem. I guess my problem is invalid SRCCIDX and DSTCIDX.

  • Hi,

    Thanks for your post.

    We usually know that for A-synchronized transfers where the address would be updated by adding SRCCIDX/DSTCIDX to the start address of the last array in the frame but please note that for AB-synchronized transfers, after a transfer request (TR) for the frame is submitted, the address update should add SRCCIDX/DSTCIDX to the beginning address of the beginning array in the frame. Kindly ensure this difference in address update for AB -synchronized transfer should happen for SRCCIDX/DSTCIDX accordingly.

    I guess, because of inappropriate address update, the SRCCIDX and DSTCIDX are invalid. Please check this on the code which will fix your issue.

    For more info. on AB synchronized transfers, please refer section 16.2.2.2 from c6747 TRM below:

    http://www.ti.com/lit/ug/spruh91b/spruh91b.pdf

    Thanks & regards,

    Sivaraj K

    ----------------------------------------------------------------------------------------------------------------

    Please click the "Verify Answer" button on this post if it answers your question.

    ----------------------------------------------------------------------------------------------------------------