|ARM Technical Support Knowledge Articles|
Applies to: DMA-330 AXI DMA Controller
DMAFLUSHP has nothing to do with DATA transfer, it's to flush the peripheral requests (burst|single) received in DMA. In our test environment, we implement the peripheral to recalculate and resend requests when getting DMAFLUSHP.
We suggest not putting DMAFLUSHP after the DMAWFP but adding DMAFLUSHP before DMAWFP instead. Each DMAFLUSHP will cost pipeline cycles to execute; there is no need to add DMAFLUSHP after each peripheral microcode. A more optimal approach might be to only use DMAFLUSHP when necessary.
There are two key situations where this is better:
1. At the start of a DMA program that will perform accesses to/from a peripheral
2. At the end of a sequence in which the program transfers less data than the full amount indicated by a burst request
The following illustrates both of these in a memory-to-peripheral program that is set up to do an 8 x 8-beat burst, but needs to transfer 68 beats in total:
;; Initial program setup DMAMOV CCR ... DMAMOV SAR ... DMAMOV DAR ...
;; Flush the request status to ensure that ;; the peripheral and DMA-330 are aligned DMAFLUSHP P0
;; Transfer a burst for each of the first 8 ;; burst requests from the peripheral DMALP 8 DMAWFP P0, burst DMALD DMASTP DMALPEND
;; Transfer final 4 beats DMALP 4 DMAWFP P0, single DMALDS DMASTPS DMALPEND
;; Re-align request status of DMA-330 and peripheral DMAFLUSHP
The "DMAWFP P0, single" command will be executed if either a single or burst request has been received by DMA-330. If it is a burst request, then it will not be popped from the internal request tracking FIFO inside DMA-330, and so that burst request will allow the loop to execute all 4 times. The DMAFLUSHP command is required to inform the peripheral that it must now re-calculate its fill levels before sending updated requests.
Did you find this article helpful? Yes No
How can we improve this article?