English
Language : 

H8S2158 Datasheet, PDF (245/927 Pages) Renesas Technology Corp – Renesas 16-Bit Single-Chip Microcomputer H8S Family/H8S/2100 Series
Section 8 RAM-FIFO Unit (RFU)
the FIFO size. Programming should be such that the CPU access does not deviate from the FIFO
area.
8.8.3 RFU Manipulation by USB
Figure 8.4 is a block diagram of the RFU interface in the USB.
The USB can use the RFU for data transfer with end point 4 (EP4) and end point 5 (EP5). The
USB has a 2-byte transmit buffer in end point 4 dedicated for IN transfer. The USB also has a 2-
byte receive buffer in end point 5 dedicated for OUT transfer.
Figure 8.5 shows the operational flow for IN transfer. EP4 is bulk IN transfer. When the transmit
data is written to the FIFO, and start of transmission is triggered (the PTTE bit is set to1), the USB
issues a data transfer request to the RFU, and the 2-byte transmit buffer is filled and enters an
output enable state. When the host issues an IN transfer request, the USB transmits data in the
transmit buffer. The USB issues data transfer requests until data of MAX_PACKET_SIZE bytes is
transferred to the transmit buffer, and operates such that the transmit buffer is always filled. When
the transmission for MAX_PACKET_SIZE bytes is completed, the USB issues a mark/reload
(rewind) request to the RFU according to the ACK/NACK handshake received from the host. If
the FIFO underruns (OVER-R) during transmission, transmission ends correctly by regarding the
data packet as a short packet. If the transmit buffer underruns, the USB transmits abnormal data to
lead to the NACK handshake from the host.
Figure 8.6 shows the operational flow for OUT transfer. EP5 is bulk OUT transfer. The USB
writes the received data to the receive buffer. When data is stored in the receive buffer, the USB
issues the data transfer request, and operates such that the receive buffer is always empty. When
the reception for MAX_PACKET_SIZE bytes completes, and all data in the receive buffer is
transferred to the FIFO, the USB transmits the ACK handshake to the host, and requests a mark to
the RFU. If an error is detected from the received data or all received data cannot be transferred to
the FIFO, the USB transmits the NACK handshake to the host, and requests a reload (rewind) to
the RFU. FIFO overrun (OVER-W) and receive buffer overrun can be regarded as the error status.
Rev. 3.00 Jan 25, 2006 page 193 of 872
REJ09B0286-0300