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.

CC2642R: Large SPI transfer exceeding uDMA limitation of 1024 elements - options?

Part Number: CC2642R

I've got a big SPI transfer that I'd like to offload from the processor, but I am limited to 1024 elements when setting up the transfer.

As for solutions, I am thinking about looping small transfers, or using scatter gather.   The uDMA limit is 1024 elements, and I need to transfer 6000 elements.  

I see that a scatter gather mode is supported in the technical reference manual.   Is scatter-gather the recommended uDMA workaround for transferring more than 1024 elements?  

Is there an example of scatter gather in the lauchpads or SDK?

Thanks!

  • Hi timeslice,

    There is a new version of the SPI driver that should support transfers larger than 1024 elements. There is an upcoming SDK release for CC2640R2 that will include this updated version in a few weeks.

    If you are in a rush and don't want to wait, you could download any of the 2.10 SDKs for the other platforms (such as CC13x0) and copy out the SPIDMACC26XX.[c/h] files from the driver source directory. If doing this, add the files straight to your project and they should override the library versions.
  • Thank you M-W, that extension will be well received.

    On related note, I am porting a design to the CC2642R from a MCU that had integrated full speed USB which was used to dump large real time waveform buffers to a host PC.   I am planning to use UART instead of USB per se, but I still need it fast.

    I would like to get 20kB transferred at ~10Hz rate, or roughly 200kB/sec out of the interface.    Will uDMA on the CC26x2R UART be the ticket for me here?     I think I would like something similar where uDMA is transferring UART data, in sizes larger than 1024 elements for maximum efficiency.

    Any chance that the upcoming SDK for extending uDMA for SPI xfers will work with outbound UART TX too?

    Thanks!

  • Hi Timeslice,

    Currently the UART driver do not support using the DMA (this is however supported in hardware). It is a feature that is planned but I can't give you any date on when this might be available. I would not expect it in the near future. 

    As of today, the best you can do is to write your own specialized UART driver using the UART driverlib and borrowing the DMA logic from the SPI driver, changing it to work with the UART instead.