DSPRelated.com
Forums

Newbiew q about McBSP and DMA

Started by davidganor March 30, 2003
Hi all,
I pretty new to C55x, so please bare with me...
I've read the "TMS320C55x DSP Peripherials Reference Guide",
the chapters dealing with DMa and McBSP.
I've reviewed the examples that came with the C5510 DSK.

What I'm trying to do?
Write a driver that reads a word (16bit), which is a len of the
comming buffer and then read 'len' number of words (16bit).
The reading is from the McBSP, through DMA, to the DARAM.
After The buffer is stored in memory, I need to process it (by a
3rd party algorithm) and write back the result, knowing its length
in advance. The result overides the input to the algorithm.
The destination buffer can be allocated before starting the
operation; The max length is 450bytes"5words.

I have some ideas on how to implement that, but I think it can be
done 'cleaner'... (I thought of an McBSP receive ISR that reads the
length, set the DMA to the correct number of words to read and
enables it; An DMA receive ISR to signal the completion of reception
and... well the trasmit part is differnt isn't it? I need to set the
DMA and McBSP, enable both and write the first word to the McBSP
'manualy'... Makes sens?)

Now, the questions:
1. Do I need an ISR for the McBSP? Maybe only for the tx part?
2. Do I need an ISR for the DMA? Again, maybe only for the tx part?
3. I tried to set the number of elements in a frame of the receive
McBSP to 225 but the max is 128... How can I set to the McBSP and
the DAM to read an arbitary number of elements?
4. Do I need 2 DMA channels with 2 differnt configurations?
5. Should I use DMA's end-of-block interrupt or end-of-frame?

Please, help clear the 'fog' here...
Thank you for your time
David