Rev.2.00 Oct 16, 2006 page 189 of 354
REJ09B0340-0200
M30245 Group
2. USB function
When an error is detected in bulk OUT transfer, a response is not returned without ACK and NAK
responses (Error checks such as CRC check and bit-justification, conforming to USB2.0 specifica-
tion, are automatically performed. So the error does not have to be controlled by software).
●
Fetch of Receive Data
On receiving one packet data (Note 2), the received packet data (Note 2) from OUT FIFO is read.
Fetch one packet data (Note 2) in the following procedure:
1: Confirm that there are receive data in the OUT FIFO by the statuses of the OUT_BUF_STS1 and
OUT_BUF_STS0 flags.
2: Determine the data byte count to be read from the OUT FIFO by reading USB endpoint x(x=1 to
4) OUT write count register .
3: Read the data byte count determined in the above 2: from the OUT FIFO.
Every time that 1(2)-byte data are read from the OUT FIFO, the internal write pointer is automati-
cally decremented by one(two). (Content of the internal write pointer cannot be read.)
4: Set CLR_OUT_BUF_RDY bit to “1” to complete one receive packet data fetch (Note 2).
At this time, the OUT FIFO status (OUT_BUF_STS1 and OUT_BUF_STS0 flags) are updated,
enabling a receive of the next one packet data (Note 2).
•In Single Buffer Mode
The OUT_BUF_STS1 and OUT_BUT_STS0 flags are updated from “11
2
” (the OUT FIFO full) to
“00
2
” (the OUT FIFO empty).
•In Double Buffer Mode
When there are one more packet data (Note 2) in the OUT FIFO, the OUT_BUF_STS1 and
OUT_BUF_STS1 flags are updated from “11
2
” (the OUT FIFO full) to “10
2
” (one data set in the
OUT FIFO). In this case, the second packet data (Note 2) can be continuously fetched.
When there are no data packet does in the OUT FIFO, the OUT_BUF_STS1 and
OUT_BUF_STS1 flags are updated from “10
2
” (one data set in the OUT FIFO) to “00
2
” (the OUT
FIFO empty).
When one packet data (Note 2) is read from the OUT FIFO while the AUTO_CLR function is en-
abled (AUTO_CLR bit is “1”), the OUT_BUF_STS1 and OUT_BUF_STS0 flags are automatically
updated without CLR_OUT_BUF_RDY bit being set to “1”.
Note 2: In continuous transfer enable, read the description by substituting the underlined part with
“buffer data”. On receiving one buffer full (data equal to byte count set in the BUF_SIZ) or a
short packet, one buffer data receive is completed. Also, the BUF_SIZ has to be equal to an
integral multiple of the EPxOMP.
Содержание M16C FAMILY
Страница 12: ...Chapter 1 Hardware...
Страница 13: ...See M30245 group datasheet...
Страница 14: ...Chapter 2 Peripheral Functions Usage...
Страница 303: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 304: ...Chapter 3 Examples of Peripheral Functions Applications...
Страница 340: ...Chapter 4 External Buses...
Страница 361: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 362: ...Chapter 5 Standard Characteristics...
Страница 369: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan M30245 Group REJ09B0340 0200 User s Manual...