Renesas M16C Series User Manual page 197

16-bit single-chip microcomputer
Hide thumbs Also See for M16C Series:
Table of Contents

Advertisement

M30245 Group
(2) Bulk Transfer: Endpoints 1 to 4 Receive
Setting of Transfer Type
When endpoints 1 to 4 OUT are used for bulk transfer, ISO bit of USB endpoint x(x=1 to 4) OUT
control and status register is set to "0" for bulk transfer setting.
Also, for initialization of toggle sequence bit in bulk transfer, set TOGGLE_INIT bit to "1" and initialize
PID to DATA0.
Set by using USB endpoint x OUT FIFO configuration register in order to enable double buffer mode
and continuous receive mode.
Set AUTO_CLR bit of USB endpoint x OUT control and status register to "1" in order to use the
www.DataSheet4U.com
AUTO_CLR function.
Receive Operation
When one packet data (Note 1) is received in OUT FIFO, the OUT_BUF_STS1 and the OUT_BUF_STS0
flags of the corresponding EPxOCS are automatically updated. In single buffer mode (when double
buffer mode bit is "0"), these flags are updated from "00
updated as follows:
•When the first one packet data (Note 1) of the double buffer has been written to the OUT FIFO and
the second packet data (Note 1) is ready to be written, the OUT_BUF_STS1 and OUT_BUF_STS0
flags are updated from "00
•When two packet data (Note 1) have been written in OUT FIFO, the OUT_BUF_STS1 and
OUT_BUF_STS0 flags are updated from "10
Note 1: In continuous transfer enable, read the description by substituting the underlined part with
When the OUT token is received from the host CPU while SEND_STALL bit is set to "1", STALL
response is automatically returned.
When there is a packet space in OUT FIFO, on receiving the OUT token from the host CPU in the
current data toggle sequence bit, the data are received and ACK response is returned. At this time,
the OUT FIFO status is updated (updates the OUT_BUF_STS1 and OUT_BUF_STS0 flags) and
data toggle sequence bit is toggled (DATA0 → DATA1 or DATA1 → DATA0). Further, the endpoint
x OUT interrupt request occurs.
When there is a packet space in OUT FIFO, on receiving the OUT token from the host CPU in the
toggle which is different from the current data toggle sequence bit, it is regarded that the ACK having
responded for the packet previously received has dropped and, therefore, the host CPU has trans-
mitted the same data. Only ACK response, therefore, is returned without receiving the data.
When the OUT token is received from the host CPU while there are already data in OUT FIFO and
packet data cannot be received, NAK response is automatically returned.
When a packet, which size exceeds the maximum packet size, is transmitted from the host CPU,
STALL response automatically is returned without receiving the data. At this time, the
FORCE_STALL flag is set to "1" and, when error interrupt has been enabled by USB function inter-
rupt enable register, an error interrupt request occurs (INTST8 is set to "1").
Rev.2.00 Oct 16, 2006
REJ09B0340-0200
" to "10
2
"buffer data". The USB function control unit writes the receive data from the host PC in OUT
FIFO sequentially by one packet size (the maximum packet size set in the EPxOMP), re-
ceives continuously until one buffer full or a short packet is received.
page 188 of 354
" to "11
2
".
2
" to "11
"".
2
2
2. USB function
". In double buffer mode, they are
2

Advertisement

Table of Contents
loading

Table of Contents