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?