Datasheet

Section 16 USB Function Module (USB)
Page 1004 of 1408 R01UH0309EJ0500 Rev. 5.00
Sep 24, 2012
H8S/2456, H8S/2456R, H8S/2454 Group
16.5.6 EP1 Bulk-Out Transfer
USB function Application
OUT token reception
Data reception from host
Set EP1 FIFO full status.
(IFR2.EP1 FULL = 1)
Clear EP1 FIFO full status.
(IFR2.EP1 FULL = 0)
Read EP1 receive data
size register (EPSZ1).
Read data from EP1
data register (EPDR1).
Write 1 to EP1 read
complete bit.
(TRG1.EP1 RDFN = 1)
Space
in EP1 FIFO?
No
Yes
No
Yes
NAK
ACK
Interrupt
request
Interrupt request
Figure 16.16 EP1 Bulk-Out Transfer Operation
Dual FIFOs (EP1)
EP1 has two 64-byte FIFOs, but the user can receive data and read receive data without being
aware of this dual-FIFO configuration.
When one FIFO is full after reception is completed, the EP1 FULL bit in IFR2 is set. After the
first receive operation into one of the FIFOs when both FIFOs are empty, the other FIFO is empty,
and so the next packet can be received immediately. When both FIFOs are full, NAK is returned
to the host automatically. When reading of the receive data is completed following data reception,
1 is written to the EP1 RDFN bit in TRG1. This operation empties the FIFO that has just been
read, and makes it ready to receive the next packet.