Download Print this page

Renesas REJ06B0732-0100 Application Note page 7

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

Advertisement

2.3
Procedure for Setting Modules
This section describes the procedure for making initial settings when the DMAC is to be used to transfer data between
locations within the on-chip RAM. Auto request mode is used for the transfer requests.
By default, the on-chip peripheral modules of this MCU are in module standby mode. Whenever any of these modules
is to be used, be sure to take it out of module standby mode before making the initial settings. Although processing to
delete the end of DMA transfer is typically handled by interrupts, polling is used in this sample application. A
flowchart of the sample program is shown in figure 5. In addition, a flowchart of DMAC initialization is shown in
figure 6.
For details on registers, refer to the SH7211 Group Hardware Manual.
STB.CR2.BIT._DMAC = 0
512-byte Initialization
DMAC0.CHCR.BIT.DE = 1
Transfer completed?
DMAC0.CHCR.BIT.DE = 0
* In this sample application, sleep processing is performed after the main routine is complete.
REJ06B0732-0100/Rev.1.00
Data Transfer between On-chip RAM Areas with DMAC (Cycle-Stealing Mode)
main
[1]
[2]
DMAC_init
No
completed?
[3]
Yes
[4]
No
Yes
END
Figure 5 Flowchart of Sample Program
[1] Cancel module standby mode
Activate the DMAC
[2] Initialize the DMAC (channel 0)
[3] Initialize the transfer destination
Clear a 512-byte area to 0
[4] Enable DMA transfer
Set DMA enable flag
[5] Perform DMA transfer end processing
[5]
Disable DMA transfer after confirmation
of the tranfer end.
March 2008
SH7211 Group
Page 7 of 13

Advertisement

loading

This manual is also suitable for:

Sh7211