6 DMA CONTROLLER (DMAC)
6-6
Seiko Epson Corporation
S1C31D50/D51 TECHNICAL MANUAL
(Rev. 2.00)
6.5.3 Ping-Pong Transfer
In ping-pong transfer mode, the DMAC performs basic transfers repeatedly while switching between the primary
data structure and alternate data structure. The data structures are referred alternately, and DMA transfer is termi-
nated when the control data with cycle_ctrl set to 0x0 is referred. A transfer completion interrupt occurs each time a
transfer using a data structure is completed.
Transfer using primary data structure
Transfer using alternate data structure
Task A
DMA transfer request
DMA transfer request
DMA transfer request
DMA transfer
completion interrupt
Task B
DMA transfer request
DMA transfer request
DMA transfer request
DMA transfer
completion interrupt
Task C
DMA transfer request
DMA transfer
completion interrupt
Task D
DMA transfer request
DMA transfer request
DMA transfer
completion interrupt
Task E
DMA transfer request
DMA transfer
completion interrupt
Termination
(cycle_ctrl = 0x3, 2
R
= 4, N = 6)
(cycle_ctrl = 0x3, 2
R
= 4, N = 12)
(cycle_ctrl = 0x3, 2
R
= 2, N = 2)
(cycle_ctrl = 0x3, 2
R
= 4, N = 5)
(cycle_ctrl = 0x3, 2
R
= 4, N = 7)
(cycle_ctrl = 0x0)
Figure 6.5.3.1 Ping-Pong Transfer Operation Example
DMA transfer procedure
1. Start data transfer by following the procedure shown in Section 6.2.1, “Initialization.” In Step 2 of the ini-
tialization procedure, set Task A and Task B to the primary data structure and the alternate data structure,
respectively.
2. Set Task C to the primary data structure after a DMA transfer completion interrupt has occurred by Task A.
3. Set Task D to the alternate data structure when a DMA transfer completion interrupt has occurred by Task B.
4. Repeat Steps 2 and 3.
5. Set cycle_ctrl to 0x0 after a DMA transfer completion interrupt has occurred by the next to last task.
6. The DMA transfer is completed when a DMA transfer completion interrupt occurs by the last task.