Usb Operation (Endpoints 1 To 4 Transmit) - Renesas M16C Series User Manual

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

Advertisement

M30245 Group

2.8.7 USB Operation (Endpoints 1 to 4 Transmit)

Endpoints 1 to 4 can apply to the isochronous transfer, bulk transfer and interrupt transfer.
The endpoints 1 to 4 respectively have their IN (transmit) FIFOs and OUT (receive) FIFOs.
For using the endpoints 1 to 4 IN, enable each endpoint IN FIFO by USB endpoint enable register (ad-
dress 028E
be set according to the user's system. The buffer size of IN FIFO can be set to a maximum of 1024 bytes
per 64 bytes for one endpoint. When the double buffer mode is enabled, the buffer which has twice as
much as the set size is available for the IN FIFO. The size and starting location of FIFO, the double buffer
mode enable can be set by USB endpoint x IN FIFO configuration register(EPxIFC).
www.DataSheet4U.com
When packet data are transmitted to the host CPU, the data are written to the endpoint x IN FIFO. When
a data transmit request from the host CPU occurs before the data are written to IN FIFO, NAK is automati-
cally transmitted in bulk transfer and interrupt transfer, or an empty packet (with 0 data length) is auto-
matically transmitted in isochronous transfer.
The data transmitted to the host CPU is controlled based on the communication status of endpoints 1 to
4 IN. The default of endpoints 1 to 4 is bulk transfer. Each endpoint should be initialized in order to use
other transfer modes.
The transmit of endpoints 1 to 4 can select the following functions.
Continuous Transmit Mode
This function is used for transmitting data at a higher speed. This mode can be set only for endpoints
1 to 4 IN bulk transfer. With continuous tranfer mode bit of the EPxIFC being set to "1", the continuous
transmit mode is enabled.
In continuous transmit mode, the USB function control unit, by dividing the data in IN FIFO into one
packet size (the maximum packet size set in the EPxIMP) units, transmits them one by one to the host
PC (When the last one packet is smaller than the size set in the EPxIMP, it is transmitted as a short
packet.) When continuous transmit mode is enabled, the IN FIFO size has to be equal to an integral
multiple of the maximum packet size.
AUTO_SET Function
With AUTO_SET bit of EPxICS being set to "1", the AUTO_SET function is enabled. When transmit
data of the buffer size (specified in the BUF_SIZ) is written to the IN FIFO in AUTO_SET enable state,
the IN_BUF_STS0 and IN_BUF_STS1 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 than the BUF_SIZ value in continuous transfer enable) has been written, the
IN_BUF_STS1, IN_BUF_STS0 flags are not automatically updated. In these cases, the completion of
data transmit ready is indicated by setting SET_IN_BUF_RDY bit to "1". The AUTO_SET function is
useable both in continuous transmit mode and in continuous transmit mode disable of endpoints 1 to
4 IN (Not available with endpoint 0).
Rev.2.00 Oct 16, 2006
REJ09B0340-0200
). The size and the starting location (every 64 bytes) of each endpoint x(x=1~4) IN FIFO can
16
page 193 of 354
2. USB function

Advertisement

Table of Contents
loading

Table of Contents