Universal Serial Bus OTG Controller
UG0331 User Guide Revision 15.0
323
10.3.6.10 RX_MAX_P_REG Bit Definitions
0
Data Toggle
0
When read, this bit indicates the current state of the endpoint 0 data toggle. If
Data Toggle Write Enable (bit 1 of this register) is High, this bit may be written
with the required setting of the data toggle. If Data Toggle Write Enable is Low,
any value written to this bit is ignored.
Table 221 •
RX_MAX_P_REG
Bit
Number
Name
Reset
Value
Function
[15:11]
m-1
N/A
If the core is configured for high-bandwidth ISO/interrupt endpoints or packet splitting
on bulk endpoints, the register includes either 2 or 5 further bits that define a multiplier
m,
which is equal to one more than the value recorded.
For bulk endpoints with the packet splitting option enabled, the multiplier
m
can be up
to 32 and defines the number of USB packets of the specified payload which are to be
amalgamated into a single data packet within the FIFO. If the packet splitting option is
not enabled, bits[15:13] are not implemented and bits[12:11] (if included) are ignored.
For ISO/interrupt endpoints operating in High speed mode and with the
high-bandwidth option enabled,
m
may only be either 2 or 3 (corresponding to bit 11
set or bit 12 set) and it specifies the maximum number of such transactions that can
take place in a single microframe. If either bit[11] or bit[12] is non-zero, the USB
controller automatically combines the separate USB packets received in any
microframe into a single packet within the receive FIFO. The maximum payload for
each transaction is 1,024 bytes, so this allows up to 3,072 bytes to be
received in
each microframe. For ISO transfers in Full speed mode or if high-bandwidth is not
enabled, bits[11] and [12] are ignored.
The value written to bits[10:0] (multiplied by
m
in the case of high-bandwidth ISO
transfers) must match the value given in the
wMaxPacketSize
field of the standard
endpoint descriptor for the associated endpoint (refer to the
USB specification
revision 2.0,
Chapter 9). A mismatch could cause unexpected results.
The total amount of data represented by the value written to this register (specified
payload ×
m
) must not exceed the FIFO size for the receive endpoint, and should not
exceed half the FIFO size if double-buffering is required.
[10:0]
RxMaxP
0
Maximum payload/transaction. Maximum payload in bytes received in a single
transaction. The value set can be up to 1,024 bytes but is subject to the constraints
placed by the USB specification on packet sizes for bulk, interrupt, and ISO transfers
in full speed and high speed operations.
RxMaxP must be set to an even number of bytes for proper interrupt generation in
DMA Mode 1.
Table 220 •
TX_CSRH_REG (Host)
(continued)
Bit
Number
Name
Reset
Value
Function