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.

TMS470R1B1M: DMA Transfer Count not updating even if DMA_STOP or DMA_HALT is set

Part Number: TMS470R1B1M
Other Parts Discussed in Thread: SM470R1B1M-HT,

I am using DMA transfer in conjunction with SCI3 receive function. Everything seems to be working with one exception: When I receive less than the number of characters specified in DMATC (in my case: 20), I need to know how many. In addition to handling DMA interrupts which are called when the complete number of characters have been received I use a timer interrupt to check if the DMATC has changed. To force and update of the DMATC, I tried setting DMA_STOP or DMA_HALT or both. I then read out the DMATC and clear the DMA_STOP/DMA_HALT bits. However, DMATC is always at 20 even if I see in the buffer that a number of characters (less than 20) have been received.

How can I force DMATC to update before a DMA transfer is complete? Alternatively, how can I know how many characters have been received by SCI RX if it is less than the specified count?  

  • First, the TMS470R1B1M is no longer recommended for new designs. Are you using the SM470R1B1M-HT instead?

    When using the SCI to receive an arbitrary length string, I always use interrupts for the receive instead of DMA for the very reason you cited. I use DMA for transmit of strings.
  • Hi Bob - thanks for responding.

    It's not a new design. The design is 10 years old and so far only has RS485 and RS232 ports. I want to add an USB port. Right now I have an evaluation board patched into the existing design and it is working. However, what good is USB if you cannot crank up the transmission rate. Using the RX interrupt I am at the limit with 57600 baud. Any higher, characters get lost. That's why I want to use DMA.

    According to SPNU194 page 11, the transfer count (DMATC) register is updated only under the following circumstances

    (1) Upon completion of the blocks transfer

    (2) when the DMA controller switches to another channel

    (3) or, when the program sets the DMA_STOP bit or DMA_HALT bit

    If (3) is correct, I have everything to implement DMA RX of arbitrary length messages. However (3) is not working, so either the documentation is incorrect or I am doing something wrong.

  • I believe that the documentation is incorrect. It has been a long time since I have worked with that device, but I remember not being able to determine the transfer count unless that control packet has completed or been arbitrated out of the queue. I will submit a documentation correction request, but I doubt there are plans to update that document.
  • Thank you, Bob. Not what I hoped to learn but it is what it is.

    Best regards,

    Tony Poeltl