![](http://datasheet.mmic.net.cn/380000/-PD98501_datasheet_16745028/-PD98501_423.png)
CHAPTER 6 USB CONTROLLER
Preliminary User’s Manual S14767EJ1V0UM00
423
6.6 Data Receive Function
This section explains USB Controller's data receive function.
6.6.1 Overview of receive processing
USB Controller takes the USB packets that it receives from the USB, stores them into system memory in order,
then creates a single data segment. The V
R
4120A RISC Processor sets the size of a single USB packet in the MAXP
field of the EP0 Control Register, EP1-2 Control Register, EP3-4 Control Register, and EP5-6 Control Register. (The
figure shown below is an example when the packet size is set to 64 bytes. )
Figure 6-12. Division of Data into USB Packets
Data Segment
USB
Packet
USB
Packet
USB
Packet
USB
Packet
USB
Packet
64Byte
64Byte
64Byte
64Byte
40Byte
When the data segments are divided by a value other than that set in the MAXP field, the last item of the divided
data will be smaller than the value set in the MAXP field (40 bytes in the example shown above). As a result, USB
Controller can identify the boundary between data segments. If a data segment is divided by the value set in the
MAXP field, a zero-length USB packet will be sent from the Host PC to USB Controller after the last item of the
divided data.
When sending data received from the USB to system memory, an area for the send data is required in system
memory. This area is referred to as the receive buffer. It must be secured by the V
R
4120A RISC Processor. For an
explanation of the receive buffer, see Section 6.6.2.
Upon the completion of data segment transfer, USB Controller writes the "Rx indication" into a mailbox in system
memory. For an explanation of the Rx modes, see Section 6.6.7.