Section 8 RAM-FIFO Unit (RFU)
Rev. 3.00 Jan 25, 2006 page 193 of 872
REJ09B0286-0300
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.
Summary of Contents for H8S/2158
Page 10: ...Rev 3 00 Jan 25 2006 page viii of lii...
Page 36: ...Rev 3 00 Jan 25 2006 page xxxiv of lii B Product Lineup 863 C Package Dimensions 864 Index 865...
Page 47: ...Rev 3 00 Jan 25 2006 page xlv of lii Appendix Figure C 1 Package Dimensions TBP 112A 864...
Page 54: ...Rev 3 00 Jan 25 2006 page lii of lii...
Page 70: ...Section 1 Overview Rev 3 00 Jan 25 2006 page 16 of 872 REJ09B0286 0300...
Page 118: ...Section 3 MCU Operating Modes Rev 3 00 Jan 25 2006 page 64 of 872 REJ09B0286 0300...
Page 126: ...Section 4 Exception Handling Rev 3 00 Jan 25 2006 page 72 of 872 REJ09B0286 0300...
Page 198: ...Section 6 Bus Controller Rev 3 00 Jan 25 2006 page 144 of 872 REJ09B0286 0300...
Page 326: ...Section 10 8 Bit PWM Timer PWM Rev 3 00 Jan 25 2006 page 272 of 872 REJ09B0286 0300...
Page 440: ...Section 15 Watchdog Timer WDT Rev 3 00 Jan 25 2006 page 386 of 872 REJ09B0286 0300...
Page 606: ...Section 17 I 2 C Bus Interface IIC Rev 3 00 Jan 25 2006 page 552 of 872 REJ09B0286 0300...
Page 742: ...Section 19 Multimedia Card Interface MCIF Rev 3 00 Jan 25 2006 page 688 of 872 REJ09B0286 0300...
Page 750: ...Section 21 D A Converter Rev 3 00 Jan 25 2006 page 696 of 872 REJ09B0286 0300...
Page 768: ...Section 22 A D Converter Rev 3 00 Jan 25 2006 page 714 of 872 REJ09B0286 0300...
Page 770: ...Section 23 RAM Rev 3 00 Jan 25 2006 page 716 of 872 REJ09B0286 0300...
Page 824: ...Section 26 Clock Pulse Generator Rev 3 00 Jan 25 2006 page 770 of 872 REJ09B0286 0300...
Page 844: ...Section 27 Power Down Modes Rev 3 00 Jan 25 2006 page 790 of 872 REJ09B0286 0300...
Page 878: ...Section 28 List of Registers Rev 3 00 Jan 25 2006 page 824 of 872 REJ09B0286 0300...
Page 926: ...Index Rev 3 00 Jan 25 2006 page 872 of 872 REJ09B0286 0300...