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.

EDMA3 : error in datasheet example for C6747/5/3 and OMAP-L137

Other Parts Discussed in Thread: OMAP-L137

Hi,

I'm going through the EDMA3 datasheet for the C6747/5/3 and OMAP-L137 (SPRUFL1C). I don't fully understand the A-synchronized "transfer" example for continuous operation given in section 3.4.3 (page 65).

The text states that the EDMA is set up to receive and transmit from/to the McBSP. There are two channels for receive and two for transmit. I suppose that the data associated with these two channels are respectively named "A" and "B" as shown in figure 25. It is also shown in this figure that the McBSP receives/transmits the channels alternatively (A1, B1, A2, B2, ...). With the given PaRAM configuration, I don't understand how this allows the data to be written to memory in a way that the A data is contiguous and the B is data contiguous at an 0x80 offset in memory.

Is there an error in figure 25? Shouldn't the data written to memory be shown as A1i, B1i, A2i, B2i, ... ?

Also, it is stated that each channel has 128 elements. That means that the goal would be to have 2 x 128 elements in memory. But here ACNT is set to 1 and BCNT set to 128 (and CCNT is 1). How is it possible to acquire the total of 256 elements?

Best regards,

SC

  • SC,

    You're right, something is wrong here.  I suspect that the diagram is correct, because the intent was probably to show how to do channel sorting.  I suspect the parameter values are wrong.

    The idea is to move seperate channels of data alternatively to a peripheral.  I'll show their values and then what I believe are the correct ones.

    There are 5 configuration values that specify how this is done, ACNT, BCNT, and CCNT, BIDX, CIDX.  There are BIDX and CIDX values that need to be set for source and destination.  And one thing to keep in mind is that these values represent BYTES.  ACNT is the number of bytes per unit moved by the EDMA, BCNT is the size of each frame, so

    In the example you are referring to, the values are (Param set 64).  We are moving data from memory to the peripheral, and alternating channel A and Channel B.

     

    The Destination configuration is pretty easy.  We're just moving a single byte to address 0x01D00004 every time.  We never increment the location. This makes sense as we're assuming we're moving data out to a peripheral.

    Provided Values Correct Values
      Source Dest   Source Dest
    ACNT 1 ACNT 1
    BCNT 128
    BCNT 128
    CCNT 0 CCNT 2
    BIDX 0 1 BIDX 128 0
    CIDX 0 0 CIDX -127 0

    But for the source configuration, it's a bit more complicated.  The total number of bytes to be moved is defined by ACNT x BCNT x CCNT.  Using the correct values, you can see that this is 1 x 128 x 2 = 256, the total number of bytes. These values are assume that EDMA is configured for A synchronization. 

    Assume for simplicity that we are moving an array of 256 byte values, with channel A in locations 0-127 and B in locations 128-255..  The first move is element 0.  Then we increment the address by the value in BIDX bytes (128) to get to element  128.  Now, to get to the 2nd sample in channel A, we need to decrement the location by 127 bytes, which is the CIDX value. (element 1).  Then, we again increment by 128 to get to element 129.  And this continues until we have moved all 256 values.

    Regards,

    Dan

     

     

  • Hi Dan,

    Thanks for confirming the error in the document's PaRAM settings.

    As for the correct values that you supplied, I think there's an error. Shouldn't it be:

    ACNT = 1

    BCNT = 2

    CCNT = 128

    BIDX = 128

    CIDX = -127

    This is because BCNT must count down to 0 before the CIDX can be applied to the current position.

    Best regards,

    SC

  • Yes, you are right.  Those are reversed.  BCNT should be 2.  And CCNT should be 128.  ACNT is the number of bytes in a sample.  BCNT is the number of samples in a frame and CCNT is the number of frames.