
Universal Serial Bus
Specifications in this manual are tentative and subject to change
Rev. E
MITSUBISHI MICROCOMPUTERS
M30245 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
76
Table 1.35. Endpoint 1-4 IN buffer status
The USB FCU sends out data packets equal to the MAXP size one at a time, except for the last packet if
the data set in the buffer is not a multiple of its MAXP, the USB FCU sends a short packet. The USB FCU
updates the buffer status flags from 112 to 002 after the data set has been successfully transmitted to the
host.
If the data set is less than the buffer size, the CPU must write “1” to the SET_IN_BUF_RDY bit to signify
the data set is ready to send.
Double Buffer Mode:
After the CPU writes a data set equal to its buffer size to the buffer, the USB FCU updates the
IN_BUF_STS1 & IN_BUF_STS0 flags.
If the buffer is immediately available to accept another data set, the buffer status flags transition from
002 to 012.
If the buffer is not available to accept another data set, the buffer status flags transition from 012 to 112.
The USB FCU sends out data packets equal to the MAXP size one at a time, except for the last packet.
If the data in the buffer is not a multiple of the MAXP, the USB FCU sends a short packet.
The USB FCU updates the buffers status flags after a data set has been successfully transmitted to the
host.
If the buffer has one more data set in it, the buffer status flags transition from 112 to 012.
If the buffer has no more data set in it, the buffer status flags transition from 012 to 002.
If the data set is less than the buffer size, the CPU must write “1” to the SET_IN_BUF_RDY bit to signify
the data set is ready to send.
IN Endpoint FIFO Flush
A software or a hardware flush causes the USB FCU to act (in both continuous and noncontinuous
transfer modes) as if a data set has been successfully transmitted out to the host. When there is one
data set in the buffer, a flush causes the buffer to be empty. When there are two data sets in the buffer, a
flush causes the older data set to be flushed out from the buffer. A flush also updates the buffer status
flags of the corresponding EPx IN CSR.
The Endpoint 1-4 IN buffer status can be obtained from the two status bits of the EPx IN CSR of the
corresponding endpoint as shown in Table 1.35.
IN_BUF_STS1
IN_BUF_STS0
Buffer Status
0
0
No data set in the IN buffer
0
1
Single buffer mode:
N/A
Double buffer mode:
One data set in the IN Buffer
1
0
Single buffer mode:
N/A
Double buffer mode:
N/A
1
1
Single buffer mode:
One data set in the IN buffer
Double buffer mode:
Two data sets in the IN buffer