Rev.2.00 Oct 16, 2006 page 202 of 354
REJ09B0340-0200
M30245 Group
2. USB function
While the AUTO_SET is enabled (AUTO_SET bit is “1”), when one data packet whose is equal to the
maximum packet size (EPxIMP set value) has been written to IN FIFO in continuous transmit dis-
able, or, when data equal to the buffer size (byte count set in the BUF_SIZ of the EPxIFC) has been
written to IN FIFO in continuous transmit enable, the IN_BUF_STS1 and IN_BUF_STS0 flags are
updated without SET_IN_BUF_RDY bit being set to “1”. However, when a short packet (data whose
size is smaller than the EPxIMP value in continuous transfer disable or the BUF_SIZ value in con-
tinuous transfer enable) has been written, the IN_BUF_STS1 and IN_BUF_STS0 flags are not auto-
matically updated. In such cases, set the SET_IN_BUF_RDY bit to “1” by software.
●
Transmit Operation
On completing transmitting of one packet data (Note 2) to the host, the IN_BUF_STS0 and IN_BUF_STS1
flags are automatically updated. In single buffer mode (when double buffer mode bit is “0”), these
flags are updated from “11
2
” to “00
2
”. In double buffer mode, they are updated as follows:
- While there are two packet data (Note 2) in IN FIFO, the IN_BUF_STS0 and IN_BUF_STS1 flags
are updated from “11
2
” to “01
2
” when one of the data is transmitted, indicating that one more
transmit data is left inside the IN FIFO.
- When there is one packet data (Note 2) in IN FIFO, the IN_BUF_STS0 and IN_BUF_STS0 flags
are updated from “01
2
” to “00
2
” when the data are transmitted, indicating that the IN FIFO becomes
empty.
Note 2: In continuous transfer enable, read the description by substituting the underlined part with
“buffer data”. The USB function control unit transmits the transmit data in sequence by one
packet size (the maximum packet size set in the EPxIMP). (When the last one packet is
smaller than the size set in the EPxIMP, it is received as a short packet.)
When IN token is received from the host CPU while SEND_STALL bit is set to “1”, STALL response
is automatically returned.
When IN token is received from the host CPU while there are no packet data in the IN FIFO, NAK
response automatically is returned.
When IN token is received from the host CPU while there are packet data in the IN FIFO, data are
transmitted by using the current data toggle sequence bit. On completing one packet data transmit
(on receiving ACK from the host CPU), the IN FIFO status is updated (the IN_BUF_STS1 and
IN_BUF_STS0 flags are updated) and data toggle sequence bit is toggled (DATA0
→
DATA1, or
DATA1
→
DATA0). At this time, the endpoint x IN interrupt request occurs. When one packet data
has been unsuccessfully transmitted (ACK not received from the host CPU), the data are re-trans-
mitted in the next IN token (the same data are transmitted in the same toggle).
Содержание 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...