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.

Adjusting DMA transfer count on the fly

Other Parts Discussed in Thread: TMS570LS1224

I am using a TMS570LS1224. I am trying to receive a variable length data frame on SCI1 using DMA. The first part of the frame is a fixed length header that contains the length for the second variable length part of the frame. I have set up the DMA channel to generate a HBC interrupt when the first fixed part has been read. Within the interrupt handler, I want to read the actual length and then adjust the transfer count accordingly. Is that possible? If not, is there another way to accomplish this? I cannot simply start a new transfer within the interrupt because the data rate is high enough that I could lose a character or 2 due to interrupt latency.  

  • Hi Richard,

    The DMA doesn't support this type of operation. Sorry it's a common request and makes sense but don't have this feature in the DMA.
    It's not as simple as it would seem to be [read the working control packet content] because the DMA doesn't always write back the working control packet to RAM .. it only does this when it switches channels.

    If you are not fully utilizing the HET there could be a way to use the HET in conjunction or instead of the SPI to count characters but it's something that would require some amount of work and we don't have any canned example for this.