English
Language : 

UPD78F1502AGK-GAK-AX Datasheet, PDF (746/1031 Pages) Renesas Technology Corp – 16-Bit Single-Chip Microcontrollers
78K0R/Lx3
CHAPTER 18 DMA CONTROLLER
Figure 18-9. Setting Example of CSI Transmission/reception
Start
DEN0 = 1
DEN1 = 1
DSA0 = 10H
DRA0 = F100H
DBC0 = 0100H
DMC0 = 06H
DSA1 = 10H
DRA1 = F201H
DBC1 = 00FFH
DMC1 = 46H
Setting for CSI transfer
DST0 = 1
DST1 = 1
Write transmit data to
SIO00 (= SDR00 [7:0])
INTCSI00 occurs.
User program
processing
INTDMA0 occurs.
DST0 = 0 Note
DEN0 = 0
RETI
INTDMA1 occurs.
DST1 = 0 Note
DMA0 transfer CSI reception
DMA1 transfer CSI transmission
DEN1 = 0
RETI
Hardware operation
End
Note
The DSTn flag is automatically cleared to 0 when a DMA transfer is completed.
Writing the DENn flag is enabled only when DSTn = 0. To terminate a DMA transfer without waiting for
occurrence of the interrupt of DMAn (INTDMAn), set DSTn to 0 and then DENn to 0 (for details, refer to 18.5.7
Forcible termination by software).
During CSI transfers, no CSI interrupt is generated when the transmitted data of the first byte is written. Therefore, the
transmitted data is written using software in this example. The data of the second and following bytes is automatically
transmitted.
The received data is automatically transferred from the first byte. (In successive transmission/reception, the data that is
to be received when the first buffer empty interrupt occurs is invalid because the valid data has not been received.)
A DMA interrupt (INTDMA1) occurs when the last transmit data has been writing to the data register. A DMA interrupt
(INTDMA0) occurs when the last received data has been read from the data register. To restart the DMA transfer, the CSI
transfer must be completed.
R01UH0004EJ0501 Rev.5.01
730
Jun 20, 2011