Ping-Pong Transfer - Epson S1C31W74 Technical Manual

Cmos 32-bit single chip microcontroller
Table of Contents

Advertisement

6 DMA CONTROLLER (DMAC)

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
(cycle_ctrl = 0x3, 2
DMA transfer request
DMA transfer request
(cycle_ctrl = 0x3, 2
DMA transfer request
(cycle_ctrl = 0x3, 2
DMA transfer request
DMA transfer request
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.
6-6
R
= 4, N = 6)
Task A
DMA transfer
completion interrupt
DMA transfer request
DMA transfer request
DMA transfer request
R
= 2, N = 2)
Task C
DMA transfer
completion interrupt
DMA transfer request
DMA transfer request
R
= 4, N = 7)
Task E
DMA transfer
completion interrupt
Figure 6.5.3.1 Ping-Pong Transfer Operation Example
Seiko Epson Corporation
Transfer using alternate data structure
(cycle_ctrl = 0x3, 2
R
= 4, N = 12)
Task B
(cycle_ctrl = 0x3, 2
R
= 4, N = 5)
Task D
(cycle_ctrl = 0x0)
Termination
S1C31W74 TECHNICAL MANUAL
DMA transfer
completion interrupt
DMA transfer
completion interrupt
(Rev. 1.1)

Advertisement

Table of Contents
loading

Table of Contents