Datasheet

Table Of Contents
Section 15 Universal Serial Bus Interface (USB)
REJ09B0140-0900 Rev. 9.00 Page 581 of 846
Sep 16, 2010
H8S/2215 Group
Write 1 to
EP2iPKTE
Write 1 to
EP2iPKTE
Write 1 to
EP2iPKTE
64 bytes 64 bytes 22 bytes
Figure 15.27 EP2iPKTE Operation in UTRG0 (Auto-Request)
(4) EPno DMA Transfer (n = 0, 2, 4)
(a) EPnoRDFN Bits of UTRG (n = 0, 2, 4)
Note that 1 is not automatically written to EPnoRDFN in case of auto-request transfer. Always
write 1 to EPnoRDFN by the CPU. The following example shows when EP2o receives 150-byte
data from the host. In this case, 1 should be written to EP2oRDFN three times as shown in figure
15.28.
(b) EP2o DMA Transfer Procedure
The DMAC transfer unit should be one packet. Therefore, set the number of transfers so that it is
equal to or less than the maximum packet size of each endpoint.
1. Wait for the UIFR1/EP2oREADY flag to be set.
2. DMAC settings for EP2o data transfer (such as auto-request and address setting). Read value
of UESZ2o and specify number of transfers to match size of received data (64 bytes or less).
3. Activate the DMAC (write 1 to DTE after reading DTE as 0).
4. DMA transfer (transfer of 64 bytes or less).
5. Write 1 to the UTRG0/EP2oRDFN bit after the DMA transfer is completed.
6. Repeat steps 1 to 5 above.
Write 1 to
EP2oRDFN
Write 1 to
EP2oRDFN
Write 1 to
EP2oRDFN
64 bytes 64 bytes 22 bytes
Figure 15.28 EP2oRDFN Operation in UTRG0 (Auto-Request)