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.

TMS570LS1224: SPI RX DMA with variable RX length

Part Number: TMS570LS1224

Dear All, 

I wanted to use DMA for a long chunk of byte to be received on SPI RX. What i wanted to know is how can I use DMA with variable length ? 

Is it possible to use DMA with variable length ?

  • Hello Vikram,

    If you want to change the transfer size, you need to re-program the element count and frame count in ITCOUNT register.
  • QJ Wang said:
    Hello Vikram,

    If you want to change the transfer size, you need to re-program the element count and frame count in ITCOUNT register.

    Thank you for your reply. Does that lead to re-initializing of the DMA ? Or can i do it without re-initializing the DMA and only by changing the ITCOUNT register ? 

  • Vikram

    The transfer count is defined in the DMA control packet. Changing the contents of a channel control packet will clear the corresponding pending bit if the channel has a pending status. If the control packet of an active channel is changed, then the channel will stop immediately at an arbitration boundary. When the same channel is triggered again, it will begin with the new control packet information.

    When the same channel is requested again, the state machine will start again by reading only the primary control packet with the new transfer count. You don't need to reinitialize the DMA.