I am writing to ask about SPORT DMA of SHARC ADSP-21060.
While receiving several frames of data using Serial Port, I stopped DMA (SDEN disabled) and then checked the DMA count register.
As a result, the amount of data DMA-transferred to the internal memory was sometimes one less than the DMA count register decrease.
I have a few questions about this trouble.
(1) I would like to know about the mechanism of this trouble.
(2) Could you inform me of where to send the lost DMA transfer data? (- It remains in the buffer in SPORT？, - Written to another location in internal memory？, - Data disappears？)
(3) Could you inform me of the timing when the DMA count register counts down? (- Immediately before DMA transfer? , - After completion of DMA transfer? , - just after SPORT input?)
(4) I think this trouble depends on the timing of SPORT input and DMA stop. Could you inform me of the interval between the SPORT input and the DMA stop that causes this trouble?
(5) Could you inform me how to get the correct amount of DMA data transfers?
Hi Yuya,Regarding "1">>Losing of data is caused by irregular clock or frame sync. Each serial port has a transmit clock signal (TCLKx) and a receive clock signal (RCLKx). The receive clock pin may be tied to the transmit clock if a single clock is desired for both input and output.And also disabling peripheral first and then DMA is correct. Disabling DMA first lead to loss of data.
Regarding "2">>In SPORT, the DMA transfers can be set up to transfer or receive a configurable number of serial words between the serial port buffers (TXSPxA, TXSPxB, RXSPxA, and RXSPxB) and internal memory automatically. And if there is a lost DMA transfer data, the data will disappears.
Regarding "3">>The count register decrements after each DMA transfer on the channel.
Regarding "4">> The interval between the SPORT input and DMA is SPORT clock that you were configured with internally or externally.
Regarding "5">>Check the clocking and frame sync that you were configured.Regards,Anand Selvaraj.