![](http://datasheet.mmic.net.cn/120000/M34506M4-XXXFP_datasheet_3558636/M34506M4-XXXFP_55.png)
Rev.2.00
Aug 28, 2006
page 53 of 119
7643 Group
REJ03B0054-0200
[USB Endpoint x (x = 0 to 2) IN Max. Packet Size Register]
IN_MAXP
This register specifies the maximum packet size (MAXP) of an
endpoint x IN packet. The value set for endpoint 1 is the number
of transmitted bytes divided by 8, and the value set for endpoints
0 and 2 is the actual number of transmitted bytes. The CPU can
change these values using the SET_DESCRIPTOR command.
The initial value for endpoints 0 and 2 is 8, and the initial value for
endpoint 1 is 1.
[USB Endpoint x (x = 0 to 2) OUT Max. Packet Size Register]
OUT_MAXP
This register specifies the maximum packet size (MAXP) of an
Endpoint x OUT packet. The value set for endpoint 1 is the num-
ber of received bytes divided by 8, and the value set for endpoints
0 and 2 is the actual number of received bytes. The CPU can
change these values using the SET_DESCRIPTOR command.
The initial value for endpoints 0 and 2 is 8, and the initial value for
endpoint 1 is 1. When using the endpoint 0, both USB endpoint x
IN max. packet size register (IN _MAXP) and USB endpoint x
OUT max. packet size register (OUT_MAXP) are set to the same
value. Changing one register’s value effectively changes the value
of the other register as well.
s Notes
Only flash memory version acknowledges IN/OUT token input to
the endpoints 3 and 4. For its countermeasure program the follow-
ing in the initial settings or other routines.
[USBINDEX] = 03h
; USBINDEX=58H
[IN_MAXP]=00h
; IN_MAXP=5BH
[OUT_MAXP]=00h
; OUT_MAXP=5CH
[USBINDEX]=04h
; USBINDEX=58H
[IN_MAXP]=00h
; IN_MAXP=5BH
[OUT_MAXP]=00h
; OUT_MAXP=5CH
(This program does not affect the operation of mask ROM ver-
sion.)
The maximum packet size (MAXP) of endpoint x IN is contained.
MAXP = n for endpoints 0, 2
MAXP = n 8 for endpoint 1
“n” is a written value into this register.
USB endpoint x IN max. packet size register (address 005B16)
IN_MAXP
b0
b7
The maximum packet size (MAXP) of endpoint x OUT is contained.
MAXP = n for endpoints 0, 2
MAXP = n 8 for endpoint 1
“n” is a written value into this register.
USB endpoint x OUT max. packet size register (address 005C16)
OUT_MAXP
b0
b7
Fig. 46 Structure of USB endpoint x IN max. packet size register
Fig. 47 Structure of USB endpoint x OUT max. packet size register