RX610 Group
13. Data Transfer Controller (DTC)
R01UH0032EJ0120 Rev.1.20
Page 363 of 1006
Feb 20, 2013
13.6
Examples of DTC Usage
13.6.1
Normal Transfer
As an example of DTC usage, its employment in the transfer of 128 bytes of data by an SCI is described below.
1. In the MRA register, make the settings to select a fixed source address (MRA.SM[1:0] = 00b), incrementation of the
destination address (MRA.DM[1:0] = 10b), transfer in normal mode (MRA.MD[1:0] = 00b), and byte-sized transfer
(MRA.SZ[1:0] = 00b). The MRB.DTS bit can be set to any value. For other bits of the MRB register, make the
setting for one interrupt to initiate one round of transfer (MRB.CHNE = "0" and MRB.DISEL = "0"). Set the SAR to
the address of the RDR for the given SCIm (m = 0 to 6), the DAR to the first address of the area in RAM where data
are to be stored, and the CRA register to 128 (0080h). The CRB register can be set to any value.
2. The address where the transfer-control information for use with the RXI starts is set in the vector table for the DTC.
3. Set "01b" in the corresponding ICU.ISELRi register and "1" to the ICU.IERi.IENj bit. Set the DTCST.DTCST bit to
"1".
4. Set the SCI for the prescribed reception mode. Enable reception-completed interrupts by setting the SCR.RIE bit in
the given SCIm to "1". Also, so that further reception does not proceed if a reception error occurs while reception by
the SCI is in progress, make the CPU able to accept reception-error interrupts.
5. Every time the reception of one byte by the SCI is completed, an RXI interrupt is generated to activate the DTC. The
DTC transfers the received byte from the RDR of the SCI to RAM, after which the DAR register is incremented and
the CRA register is decremented.
6. After 128 rounds of data transfer have been completed and the value in the CRA register becomes "0", an RXI
interrupt request is generated for the CPU. Processing for completion is performed in the processing routine for this
interrupt.