Our main code for the TMS570 is an event loop and it got too bogged down interfacing directly with the SCI (due to the 19-25 cycle access time to peripheral registers). So, we implemented DMA to copy byte by byte to buffer. The idea was to call something in our event loop that would look at the Current Destination Address Register CDADDR and then read up to that point in the DMA buffer. Seemed like an simple, eloquent solution.
However, it seems that reading CDADDR does not give us consistent results. We have the DMA FIFO turned off and are using 2 input SCI ports with 2 different channels.
Right now, we are running with a much less smooth design - enabling all 4 DMA interrupts and a 4 byte buffer that makes these trigger..makes for a very small buffer and more complication than needed.
The key thing is that we must know when every byte is in - because we have odd and even length data packets coming in - we don't want to have a delay waiting for other bytes to arrive before processing a data packet.
Is there an issue using the CDADDR for indexing in the DMA buffer? Is there a register we could hit to refresh this value?
Thank you