Universal Serial Bus OTG Controller
UG0331 User Guide Revision 15.0
321
10.3.6.8 TX_CSRH_REG (in Peripheral mode) Bit Definitions
5
RxStall
0
This bit is set when a STALL handshake is received. When this bit is set, any
DMA request that is in progress is stopped, the FIFO is completely flushed and
the TxPktRdy bit (bit 0 of this register) is cleared. The Cortex-M3 processor (or
fabric master) should clear this bit.
4
SetupPkt
0
The Cortex-M3 processor (or fabric master) sets this bit at the same time the
TxPktRdy bit (bit 0 of the register) is set, to send a SETUP token instead of an
OUT token for the transaction.
Setting this bit also clears the Data Toggle.
3
FlushFIFO
0
The Cortex-M3 processor (or fabric master) writes a 1 to this bit to flush the
latest packet from the endpoint TX FIFO. The FIFO pointer is reset, the
TxPktRdy bit (bit0 of this register) is cleared and an interrupt is generated. May
be set simultaneously with TxPktRdy to abort the packet that is currently being
loaded into the FIFO.
FlushFIFO should only be used when TxPktRdy is set. At other times, it may
cause data to be corrupted. Also note that, if the FIFO is double-buffered,
FlushFIFO may need to be set twice to completely clear the FIFO.
2
Error
0
The controller sets this bit when 3 attempts have been made to send a packet
and no handshake packet has been received. When the bit is set, an interrupt
is generated, TxPktRdy (bit 0 of this register) is cleared and the FIFO is
completely flushed. The Cortex-M3 processor (or fabric master) should clear
this bit. Valid only when the endpoint is operating in Bulk or Interrupt mode.
1
FIFONotEmpty
0
The controller sets this bit when there is at least 1 packet in the transmit FIFO.
0
TxPktRdy
0
The Cortex-M3 processor (or fabric master) sets this bit after loading a data
packet into the FIFO. It is cleared automatically when a data packet has been
transmitted. An interrupt is also generated at this point (if enabled). TxPktRdy
is also automatically cleared prior to loading a second packet into a double-
buffered FIFO.
Table 219 •
TX_CSRH_REG (Peripheral)
Bit
Number
Name
Reset
Value
Function
7
AutoSet
0
If the Cortex-M3 processor (or fabric master) sets this bit, TxPktRdy (bit 0 of
TXCSRL_REG) will be set automatically when data of the maximum packet
size (value in TxMaxP in TX_MAX_P_REG) is loaded into the transmit FIFO. If
a packet of less than the maximum packet size is loaded, then TxPktRdy must
be set manually.
Should not be set for high-bandwidth ISO endpoints or high-bandwidth
interrupt endpoints.
6
ISO
0
The Cortex-M3 processor (or fabric master) sets this bit to enable the transmit
endpoint for ISO transfers, and clears it to enable the transmit endpoint for bulk
or interrupt transfers.
This bit only has effect in Peripheral mode. In Host mode, it always returns
zero.
5
Mode
0
The Cortex-M3 processor (or fabric master) sets this bit to enable the endpoint
direction as transmit and clears the bit to enable it as receive.
This bit only has effect where the same endpoint FIFO is used for both transmit
and receive transactions.
Table 218 •
TX_CSRL_REG (Host)
(continued)
Bit
Number
Name
Reset
Value
Function