Download Print this page

Renesas REJ06B0732-0100 Application Note page 8

Data transfer between on-chip ram areas with dmac (cycle-stealing mode)

Advertisement

DMAC_init
Set DMA channel control register
(CHCR_0)
Set DMA source address register
(SAR_0)
Set DMA destination address
register (DAR_0)
Set DMA transfer count register
(DMATCR_0)
Set DMA channel control register
(CHCR_0)
Set DMA operation register
(DMAOR)
END
REJ06B0732-0100/Rev.1.00
Data Transfer between On-chip RAM Areas with DMAC (Cycle-Stealing Mode)
[1] Disable DMA transfer
Set the DE (DMA enable) bit to 0
[1]
Disable DMA transfer
[2] Set the DMA transfer source address (SAR_0)
Specify the DMA transfer source address
[2]
[3] Set the DMA transfer destination address (DAR_0)
Specify the DMA transfer destination address
[4] Specify the DMA transfer count (DMATCR_0)
[3]
Set the DMA transfer count to 128
[5] Set the channel control register (CHCR_0)
Set TC to B'1: transfer data for the count specified in DMATCR
[4]
Set RLD to B'0: disable the reload function
Set RS[3:0] (resource selector) to B'0100: auto request
Set DM[1:0] to B'01: increment the destination address
Set SM[1:0] to B'00: fix the source address
[5]
Set TB to B'0: cycle steal mode
Set IE to B'0: disable interrupts
[6] Set the DMA operation register (DMAOR)
[6]
Read from the AE and MNIF bits and clear them to 0
Clear the address error flag
Set the DME bit to 1 after clearing the flags
Enable DMA transfer on all the channels
Figure 6 Flowchart of Initializing DMAC
March 2008
SH7211 Group
Page 8 of 13

Advertisement

loading

This manual is also suitable for:

Sh7211