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.

Channel shifting during DMA operation

Hi,

We are trying to configure MCBSP for 8 channel operation with DMA in C6424.

DMA is configured to sent data to MCBSP in the order 0,1,2,3,4,5,6,7.

We are able to route the channels correctly.

But when we removed some unused code in our application, we could see that channels are shifted in a circular fashion as shown below

7,0,1,2,3,4,5,6, after some time it will become 6,7,0,1,2,3,4,5 and so on.

We are keeping the DMA buffer in external memory and cache is enabled. Can somebody tell me what could be the reason for this shift?

(We are using Code Composer Studio 4.0 with BIOS 6.0)

 

regards,

Arun

 

  • Arun,

    If you put the unused code back in, does the channel-shift go away again?

    When the shift occurs on the serial line, what does the previous set of 8 channels look like? In other words, do you have 0,1,2,3,4,5,6,7 then 7,0,1,2,3,4,5,6 with the "7" being duplicated from one frame to the next?

    Regards,
    RandyP

  • Dear Randy,

     

    Thanks a lot for your kind attention.

     

    If I put the unused code back, there wont be any channel-shift and the code works fine.

     

    And in 7,0,1,2,3,4,5,6, the "7"th one not a duplicate.

     

    regards,

    Arun Sankar

  • Arun,

    The "unused code" is your best hint for figuring out what the cause of the problem is. Please try to determine what changes with that code in or out. You could be looking for program placement, data initialization, and so on.

    If I understand your use of the McBSP correctly, you write 8 channels of data to it for transmit. These 8 channels of data are written in sequence, 0-7, one-at-a-time in response to the XRDY events from the McBSP. Am I correct on this much?

    What data was transmitted on the previous set of 8 channels just before the shift occurred? It would seem that if channel 7 comes out first, then its new value would not have been written yet, and this is why I am curious about how it compares to the data sent out in the previous sequence.

    What size are the individual channels?

    Regards,
    RandyP

  • Randy,

    I had tried a lot to make some correlation between this channel shift and the unused code. But unfortunately I couldn't. One interesting fact is that If I comment out a portion of the unused code, the channel shifting is not there and if I am commenting more, channel shift appears again.

    What you said is correct. we have 8 arrays of 1024 samples(4 bytes) each, and we are transmitting one element from each array at a time.

    Actually I am using sine waves(of different frequencies) as input and I am watching the output wave form. i will try to dump the data and see whether we are getting a new set of samples each time.

    Each time we are sending 1024 * 4bytes of data in one channel.

    I would like to add one more observation here.

    I have a test case with valid data only in 2 channels and I was getting this in channel 0 and 1.  Then I got a channel shift with data in 1 and 2 again it got shifted back to 0 and 1. But it was not shifting to other channels.

    regards,

    Arun