Datasheet

Table Of Contents
Section 15 Universal Serial Bus Interface (USB)
Page 564 of 846 REJ09B0140-0900 Rev. 9.00
Sep 16, 2010
H8S/2215 Group
15.5.6 Bulk-In Transfer (Dual FIFOs) (EP2i Is specified as Endpoint)
EP2i has two 64-byte FIFOs, but the user can perform data transmission and transmit data writes
without being aware of this dual-FIFO configuration. However, one data write is performed for
one FIFO. For example, even if both FIFOs are empty, it is not possible to perform EP2iPKTE at
one time after consecutively writing 128 bytes of data. EP2iPKTE must be performed for each 64-
byte write.
When transmitting data to the host using a bulk-in transfer, the EP2iFIFO empty interrupt must
first be enabled. 1 is written to the UIER1/EP2iEMPTYE bit, and the EP2iFIFO empty interrupt is
enabled. At first, both EP2iFIFOs are empty, and so an EP2iFIFO empty interrupt is generated
immediately.
The data to be transmitted is written to the data register using this interrupt. After the first transmit
data write for one FIFO, the other FIFO is empty, and so the next transmit data can be written to
the other FIFO immediately. When both FIFOs are full, EP2iEMPTY is cleared to 0. If at least
one FIFO is empty, UIFR1/EP2iEMPTY is set to 1. When ACK is returned from the host after
data transmission is completed, the FIFO used in the data transmission becomes empty. If the
other FIFO contains valid transmit data at this time, transmission can be continued.
When transmission of all data has been completed, write 0 to UIER1/EP2iEMPTYE and disable
EXIRQ0 or EXIRQ1 interrupt requests.