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.

SPI serviced by eDMA and CSHOLD

Hi everyone,

 

I'm working on servicing SPI peripheral with eDMA for performance purposes on OMAP L137. The thing is that I would like to use the CSHOLD feature from the SPI.

Is that possible ? Because, the way I think I'll be compelled to do it is set a channel with N-1 bytes to tranfer and then chaining to another channel for the remaning byte disabling CSHOLD at the same time in this transfer. Seems kind of tricky though.

 

Any automatic way to manage CSHOLD with eDMA  ?

 

Regards,

 

Maxime

  • Maxime,

    There are two basic choices ...

    You could use chaining similar to what you mention.

    It may be simpler however to pad your data buffer such that the DMA source buffer is of the format:

    Word0:  <control info><data>

    Word1: <control info><data>

    ...

    WordN:<control info><data>

    The control info would be set with the appropriate value of the CSHOLD, WDEL, ... etc, bitfields.  The first N-1 words would set CSHOLD to 1 and the final word would set the CSHOLD info to 0. 

    The EDMA would be set w/ ACNT = 4 such that each trigger from the SPI would set the control info and the data word.

    Regards
    Kyle

  • Kyle,

     

    That's what I figured, I tried these two options that work fine. I was just hoping for a better solution.

    The chaining is okay but uses a channel, and the other solution just multiplies data transfers by 4 ...

     

    Anyways, thanks for your reply.

     

    Regards,
    Maxime