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.

McBSP continuous data streaming

Other Parts Discussed in Thread: TMS320C28346

Hello to everyone,

for my master thesis I am using the TMS320C28346 (delfino) for data acqusition purposes. The sampling is done by a ADS1278-EVM which communicate over SPI (this part works fine). The data are supposed to be shifted to a PC via an USB driver unit which works as SPI-Master. Thus, the TMS320 is working in slave mode.

Since I am having pretty high data rates (52ksps) I need to use the DMA for shifting data to a McBSP (in SPI mode) on the DSP. Programming both works fine:

I am getting data shifted to the PC everytime the CS is set by the USB driver. This however takes a lot of time on the USB driver.

Is there a chance to programm the McBSP in SPI mode so that I need just one interrupt and the DMA services the DXR1 continuously?

The DMA's source is a buffer of 1024*16bit, it is set in continuous mode. So I suppose the solution might be within the McBSP programming.

I would be very thankful for anyone who has an idea or faced a similar problem before.

Thank you very much in advance!

Johannes

  • Hi,

     Is there a chance to programm the McBSP in SPI mode so that I need just one interrupt and the DMA services the DXR1 continuously?

    You can go through this doc: http://www.ti.com/lit/ug/sprug80a/sprug80a.pdf

    Regards,

    Gautam

  • Thank's for your answer, but that's of course what I did.

    I ment I need to trigger the McBSP once at the beginning and I need the DMA to service the McBSP until the buffer is empty.

    Does anyone have an idea which bits to set? Because right now I need a CS signal for each word I'd like to send.

    Thank you very much!

  • Well, problem solved!

    Just if anybody should face this problem as well:

    If you need to shift a lot of data (in my case a buffer size of 1024 words) but you are limited due to the McBSP, set the frame length as you need it (and I am talking about SPI mode and not frame-sync).

    The frame length is also limited to a maximum size of 128 words, thus I am using 8 frames with each 128 words. This makes a total size of 1024 words.

    The registers you need:

        McbspaRegs.XCR2.bit.XPHASE = 0;        // single phase frame

        McbspaRegs.XCR1.bit.XWDLEN1 = 2;      // 16-bit word

        McbspaRegs.XCR1.bit.XFRLEN1 = 127;      // 128 words per frame; thus 8 frame must be sent

    Thanks for anyone who took a look at this and I hope this helps.