04.03.2013 Views

RL78/D1A User's Manual: Hardware - Renesas

RL78/D1A User's Manual: Hardware - Renesas

RL78/D1A User's Manual: Hardware - Renesas

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Under development<br />

Preliminary document<br />

Specifications in this document are tentative and subject to change.<br />

<strong>RL78</strong>/<strong>D1A</strong> CHAPTER 19 DMA CONTROLLER<br />

19.4 Operation of DMA Controller<br />

19.4.1 Operation procedure<br />

The DMA controller is enabled to operate when DENn = 1. Before writing the other registers, be sure to set the<br />

DENn bit to 1. Use 80H to write with an 8-bit manipulation instruction.<br />

Set an SFR address, a RAM address, the number of times of transfer, and a transfer mode of DMA transfer to<br />

DMA SFR address register n (DSAn), DMA RAM address register n (DRAn), DMA byte count register n (DBCn),<br />

and DMA mode control register n (DMCn).<br />

The DMA controller waits for a DMA trigger when DSTn = 1. Use 81H to write with an 8-bit manipulation<br />

instruction.<br />

When a software trigger (STGn) or a start source trigger specified by the IFCn3 to IFCn0 bits is input, a DMA<br />

transfer is started.<br />

Transfer is completed when the number of times of transfer set by the DBCn register reaches 0, and transfer is<br />

automatically terminated by occurrence of an interrupt (INTDMAn).<br />

Stop the operation of the DMA controller by clearing the DENn bit to 0 when the DMA controller is not used.<br />

Remark n: DMA channel number (n = 0 to 3)<br />

Figure 19-7. Operation Procedure<br />

DENn = 1<br />

Setting DSAn, DRAn, DBCn, and DMCn<br />

DSTn = 1<br />

DMA trigger = 1?<br />

Yes<br />

Transmitting DMA request<br />

Receiving DMA acknowledge<br />

DMA transfer<br />

DRAn = DRAn + 1 (or + 2)<br />

DBCn = DBCn 1<br />

DBCn = 0000H ?<br />

Yes<br />

DSTn = 0<br />

INTDMAn = 1<br />

DENn = 0<br />

R01UH0317EJ0004 Rev. 0.04 1036<br />

Feb. 22, 2013<br />

No<br />

No<br />

Set by software program<br />

Operation by DMA<br />

controller (hardware)<br />

Set by software program

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!