Rev.2.00 Oct 16, 2006 page 171 of 354
REJ09B0340-0200
M30245 Group
2. USB function
- Data exceeding the one specified in the SETUP stage are required. (An OUT token is received
after the DATA_END flag is set.)
- Data exceeding the one specified are received in USB endpoint 0 MAXP register.
Except for when an incorrect data toggle is received in the SETUP stage, on occurrence of the above
condition, STALL is transmitted to the IN/OUT token with a problem. When an incorrect data toggle
is received in the SETUP stage, ACK is returned to the SETUP stage and STALL is returned to next
IN/OUT token.
The STALL handshake occurring by the above condition completes the control transfer in operation
by being transmitted to one transaction. The packet after STALL handshake is regarded as the start
of new control transfer. Set this flag to “0” by writing “1” to CLR_FORCE_STALL bit.
• SETUP_END flag
This flag shows the interrupt in control transfer.
This flag is set to “1” when at least one of the following conditions occurs:
- Transmission of the data which had amount of data set by setup phase during data phase process-
ing is completed. (The status phase is started before the DATA_END flag is set.)
- A new SETUP packet is received before status phase is completed.
When this flag is set to “1” and transmit data to the host CPU exists, IN_BUF_RDY bit is cleared to “0”
and the IN FIFO data is destroyed. Discontinue access to FIFO and process the preceding setup.
Also, when a new SETUP packet is received right after the SETUP_END flag is set to “1” (when the
next new SETUP packet is received before the data phase or the status phase is completed), the
SETUP flag and the OUT_BUT_RDY flag in addition to the SETUP_END flag are set to “1”, indicat-
ing that a new SETUP packet data exists in OUT FIFO.
Set the SETUP_END flag to “0” by writing “1” to CLR_SETUP_END bit.
• CLR_OUT_BUF_RDY bit
This bit controls clearing of the OUT_BUF_RDY flag.
This bit is set to “1” after reading the data packet from OUT FIFO. When this flag is written to “1”, the
OUT_BUF_RDY flag is cleared to “0”.
When the OUT_BUF_RDY flag is set to “1” by receiving the SETUP token, the USB function control
unit responds with NAK to the data request from the host CPU.
Until decoding of request data from the host CPU is completed, do not set this bit to “1” (nor the
OUT_BUF_RDY flag is set to “0”.)
• SET_IN_BUF_RDY bit
This bit controls setting of the IN_BUF_RDY flag to “1”.
Completion of one buffer data write is notified to the USB function control unit.
Set this bit to “1” after writing the data packet to IN FIFO. When this bit is written to “1”, the
IN_BUF_RDY flag is set to “1”.
• CLR_SETUP bit
This bit controls clearing of the SETUP flag.
Set this bit to “1” after decoding the SETUP packet. When this bit is written to “1”, the SETUP flag is
cleared to “0”.
Содержание 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...