English
Language : 

CP3BT10 Datasheet, PDF (77/210 Pages) National Semiconductor (TI) – Reprogrammable Connectivity Processor with Bluetooth and USB Interfaces
Bidirectional Control Endpoint FIFO0 Operation
FIFO0 should be used for the bidirectional control endpoint
0. It can be configured to receive data sent to the default ad-
dress with the DEF bit in the EPC0 register. Isochronous
transfers are not supported for the control endpoint.
The Endpoint 0 FIFO can hold a single receive or transmit
packet with up to 8 bytes of data. Figure 26 shows the basic
operation in both receive and transmit direction.
Transmit Endpoint FIFO Operation (TXFIFO1, TXFIFO2,
TXFIFO3)
The Transmit FIFOs for endpoints 1, 3, and 5 support bulk,
interrupt, and isochronous USB packet transfers larger than
the actual FIFO size. Therefore, software must update the
FIFO contents while the USB packet is transmitted on the
bus. Figure 27 illustrates the operation of the transmit
FIFOs.
Note: The actual current operating state is not directly vis-
ible to software.
FLUSH (Resets TXRP and TXWP)
FLUSH Bit, TXC0 Register
FLUSH Bit, RXC0 Register
Write to TXD0
IDLE
RX_EN Bit,
RXC0 Register
TFnS - 1
0X0
+
TXRP
+
TXFL = TXWP - TXRP
TX FIFO n
TXWP
TXFILL
RXWAIT
+
TX_EN Bit,
TXC0
Register
TXWAIT
TX_EN Bit,
TXC0 Register
(Zero-Length
Packet)
IN Token
SETUP
Token
OUT or
SETUP
Token
Transmission
Done
FIFO0 Empty
(All Data Read)
RX
TX
DS050
Figure 26. Endpoint 0 Operation
A packet written to the FIFO is transmitted if an IN token for
the respective endpoint is received. If an error condition is
detected, the packet data remains in the FIFO and transmis-
sion is retried with the next IN token.
The FIFO contents can be flushed to allow response to an
OUT token or to write new data into the FIFO for the next IN
token.
If an OUT token is received for the FIFO, software is in-
formed that the FIFO has received data only if there was no
error condition (CRC or STUFF error). Erroneous recep-
tions are automatically discarded.
TCOUNT = TXRP - TXWP (= TFnS - TXFL)
DS051
Figure 27. Transmit FIFO Operation
TFnS
TXRP
TXWP
TXFL
TCOUNT
The Transmit FIFO n Size is the total number
of bytes available within the FIFO.
The Transmit Read Pointer is incremented ev-
ery time the Endpoint Controller reads from
the transmit FIFO. This pointer wraps around
to zero if TFnS is reached. TXRP is never in-
cremented beyond the value of the write
pointer TXWP. An underrun condition occurs if
TXRP equals TXWP and an attempt is made
to transmit more bytes when the LAST bit in
the TXCMDx register is not set.
The Transmit Write Pointer is incremented ev-
ery time software writes to the transmit FIFO.
This pointer wraps around to zero if TFnS is
reached. If an attempt is made to write more
bytes to the FIFO than actual space available
(FIFO overrun), the write to the FIFO is ig-
nored. If so, TCOUNT is checked for an indi-
cation of the number of empty bytes
remaining.
The Transmit FIFO Level indicates how many
bytes are currently in the FIFO. A FIFO warn-
ing is issued if TXFL decreases to a specific
value. The respective WARNn bit in the FWR
register is set if TXFL is equal to or less than
the number specified by the TFWL bit in the
TXCn register.
The Transmit FIFO Count indicates how many
empty bytes can be filled within the transmit
FIFO. This value is accessible by software in
the TXSn register.
77
www.national.com