
Rev.2.00 Oct 16, 2006
page 200 of 354
REJ09B0340-0200
M30245 Group
2. USB function
q USB endpoint x(x=1 to 4) IN FIFO configuration register
This register sets endpoint x(x=1 to 4) IN FIFO.
BUF_NUM
This bit sets the starting location of the endpoint x(x= 1 to 4) IN FIFO per 64 bytes. For example,
when IN FIFO is allocated, starting at the 320th byte, the set value is “0001012”.
BUF_SIZ
This bit sets one buffer size of the endpoint x(x= 1 to 4) IN FIFO per 64 bytes. For example, when 256
bytes is set, the set value is “01002”.
DBL_BUF
With this bit being set to “1”, IN FIFO of the corresponding endpoint is changed into double buffer
mode. The byte count for a valid IN FIFO becomes twice as much as the value specified by the
BUF_SIZ at the time of double buffer. Set carefully not to overlap with the FIFO start position of other
endpoints.
CONTINUE
Set this bit to “1” when continuous transmit is enabled. The bit is valid only in bulk transfer.
The USB function control unit, by dividing one buffer data equal to the byte count set in the BUF_SIZ
in the IN FIFO into one packet size (the maximum packet size set in the EPxIMP) units, transmits
them one by one to the host PC. (When the last one packet is smaller than the size set in the
EPxIMP, it is transmitted as a short packet.) When continuous transmit mode is enabled, the value
set in the BUF_SIZ has to be equal to an integral multiple of the maximum packet size.
Pay attention to the following when setting this register:
- Not exceed 3072 bytes in IN FIFO starting location + IN FIFO size.
- Not overlap endpoint FIFOs each other.
The configuration of USB endpoint x(x=1 to 4) IN FIFO configuration register is shown in Figure
2.8.48.
Figure 2.8.48. USB endpoint x(x=1 to 4) IN FIFO configuration register
Bit Symbol
Bit Name
Function
R W
O O
Symbol
EPxIFC (x = 1 - 4)
Address
When reset
USB Endpoint x IN FIFO register
b7
(b15)
(b8)
b0
BUF_NUM
BUF_SIZ
DBL_BUF
CONTINUE
Reserved
b7
b0
FIFO buffer
start number
FIFO buffer size
Double buffer mode
Continuous transfer
mode
O O
Select the starting number for the EPx IN FIFO
(in units of 64 bytes)
000000 : buffer stating location = 0
000001 : buffer stating location = 64
000010 : buffer stating location = 128
......
101111 : buffer stating location = 3008 (last starting number)
Select the buffer size for the EPx IN FIFO
(in units of 64 bytes)
0000 : buffer stating location = 64
0001 : buffer stating location = 128
0010 : buffer stating location = 192
......
1111 : buffer stating location = 1024 (largest buffer size)
0 : Disabled
1 : Enabled
0 : Disabled
1 : Enabled (Note)
O O
Note: Valid for bulk transfer type only.
02A216, 02A816,
02AE16, 02B416
000016
Must always be set to “0”
0000