Universal Serial Bus Device
LH79524/LH79525 User’s Guide
17-20
Version 1.0
17.2.3.2 IN Maximum Packet Size Register (INMAXP)
INMAXP defines the maximum packet size for transactions through the currently-selected
IN endpoint in units of 8 bytes, except that a value of 128 sets the maximum packet size
to 1,023 (the maximum size for an Isochronous packet transferred in a Full-speed trans-
action) rather than 1,024. When setting this value, note the constraints placed by the USB
Specification on packet sizes for Bulk, Interrupt, and Isochronous transactions in Full-
speed operations.
There is an INMAXP register for each IN endpoint, except Endpoint 0. Each register is
accessed via the INDEX register. For example, to access EP1 INMAXP register, write 0x1
to the INDEX register and then write the data required to address INMAXP (0x40).
The value written to this register should match the wMaxPacketSize field of the Standard
Endpoint Descriptor for the associated endpoint (see Universal Serial Bus Specification
Revision 2.0, Chapter 9). A mismatch may cause unexpected results. If a value greater
than the IN FIFO (see Table 17-2) size for the endpoint is written to this register, the value
will be automatically changed to the IN FIFO size. If the value written to this register is less
than or equal to half the IN FIFO size, two IN packets can be buffered. The register is reset
to 0. If this register is changed after packets have been sent from the endpoint, the end-
point IN FIFO should be flushed (using INCSR1:FIFO_FLUSH) after writing the new value
to the INMAXP register.
Table 17-26. INMAXP Register
BIT
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
FIELD
///
RESET
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
RW
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
BIT
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
FIELD
///
INMAXP
RESET
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
TYPE
RO
RO
RO
RO
RO
RO
RO
RO
RW
RW
RW
RW
RW
RW
RW
RW
ADDR
0xFF 0x040
(with the INDEX register set to IN endpoint 1, 2, or 3)
Table 17-27. INMAXP Fields
BITS
NAME
FUNCTION
31:8
///
Reserved
Reading returns 0. Write the reset value.
7:0
INMAXP IN Maximum Packet Size
Maximum Packet Size/transaction