
Rev.2.00 Oct 16, 2006
page 186 of 354
REJ09B0340-0200
M30245 Group
2. USB function
q USB endpoint x(x=1 to 4) OUT MAXP register
This register indicates endpoint x(x=1~4) OUT maximum packet size. The default value is 0 byte.
When the endpoint is initialized due to any reason such as that the request for setting the endpoint
(SET_DESCRIPTOR, SET_CONFIGURATION, SET_INTERFACE, etc.) is received from the host
CPU, change the endpoint x OUT maximum packet size value by writing in this register. Set a packet
size value specified for every transfer type to be used.
The configuration of USB endpoint x(x=1 to 4) OUT MAXP register is shown in Figure 2.8.41.
q USB endpoint x(x=1 to 4) OUT write count register
This 11-bit register contains the number of bytes of one buffer data written in the endpoint x(x=1~4)
OUT FIFO. This register is for read-only. When the USB function control unit completes the data
packet receive from the host CPU, set the value of this register. When one buffer data receive com-
pletes, read this register and determine the byte count of the data to be read from OUT FIFO. This
register value is not decremented even if the data are read from USB endpoint x OUT FIFO register .
When this register is read while there are two buffer data in OUT FIFO in the double buffer mode, the
number of bytes of the packet data received at first is already stored. When CLR_OUT_BUF_RDY bit
is set to “1” after one buffer data is read from OUT FIFO, this register value is updated to the number
of bytes of buffer data subsequently received.
The configuration of USB endpoint x(x=1 to 4) OUT write count register is shown in Figure 2.8.42.
Figure 2.8.41. USB endpoint x(x=1 to 4) OUT MAXP register
Figure 2.8.42. USB endpoint x(x=1 to 4) OUT write count register
Bit Symbol
Bit Name
Function
R W
Must always be “0”
O O
Symbol
EPxOMP (x = 1 - 4)
Address
When reset
USB Endpoint x OUT MAXP register
b7
(b15)
(b8)
b0
OMAXP9-0
b7
b0
Maximum packet size
O O
Reserved
000000
02B816, 02C016,
02C816, 02D016
000016
Set maximum packet size of
EPx OUT
Bit Symbol
Bit Name
Function
R W
O O
Symbol
EPxWC (x = 1 - 4)
Address
When reset
USB Endpoint x OUT Write Count register
b7
(b15)
(b8)
b0
WCNT10-0
b7
b0
Receive byte count
O X
Reserved
Must always be “0”
00000
02BA16, 02C216,
02CA16, 02D216
000016
The byte count of receive one buffer
data in the EPx OUT FIFO is set.