
C165UTAH
USB Interface Controller
Data Sheet
345
2001-02-23
every setup-packet which is visible for the CPU will flush the tx-fifo for endpoint zero. This
will avoid wrong, old data to be sent over control-enpoint zero.
This flush-mechanism could also be done by flushing the usb with a write into the
command-register of the USB-block but the flush initiated by SW might happen too late.
Note:
The AutoFlushEnable-feature described above is only available if the C165UTAH
CPU is running with 36 MHz. This feature can not be used if the device is running
with 24 MHz. In this case, pending data has to be flushed explicitly by Software
via register USBD_CMD_REG on reception of the OUT packet that ends setup
transfer, indicated by the rx_done interrupt of endpoint 0.
15.7.6
Setting of configuration and alternate settings of interfaces
Each time the host send a valid set_configuration- or set_interface-command, this will
show up for the CPU as a configval-interrupt. In order to determine the actual
confitguration and the alternate setting of an interface, SW must read the configval-
register and set up the endpoints which are actually enabled.
There is no overwirte-protection on this register, the value is always updated if a valid
set_configuration or set_interface-packet is received.
15.7.7
Stalling Endpoints
All transmit-endpoints can be stalled by writing into the command-register, where it
makes no sense to stall an isochronous endpoint (for a isochronous packet there is no
stall-handshake, so the host will never notice that the endpoint is stalled and thus will
never try to abolish the stall-condition). The stall will be kept as long the bit in the
command-register is set and the host did not send a clear_feature-command.
If an endpoint was stalled during a in-transfer, this transfer will be finished and the next
request by the host will return a stall-handshake. If there is data in the fifo for transission,
the data will be kept and sent, if the stall-condition is abolished and host requests for this
data.
A stall-condition during an out-transfer will finish first and the next request will return a
stall-handshake.
Endpoint zero has only one stall-bit for both directions, for in and out. A stall on one
direction will also lead to a stall in the other transfer-direction.
15.7.8
Start of Frame
Host sends a Start of Frame-(SOF)-signal every ms. A SOF-interrupt is generated and
the value of the actual frame-number is stored in the SOF-register. There is no overwirte-
protection on this register, the value is always updated if a valid SOF-packid is received.