Rev.2.00 Oct 16, 2006 page 187 of 354
REJ09B0340-0200
M30245 Group
2. USB function
●
USB endpoint x(x=1 to 4) OUT FIFO configuration register
This register sets endpoint x(x=1~4) OUT FIFO.
•BUF_NUM
This bit sets the starting location of the endpoint x(x= 1~4) OUT FIFO per 64 bytes. For example,
when OUT FIFO is allocated, starting at the 320th byte, the set value is “000101
2
”.
•BUF_SIZ
This bit sets one buffer size of the endpoint x(x= 1~4) OUT FIFO per 64 bytes. For example, when
256 bytes is set, the set value is “0100
2
”.
•DBL_BUF
With this bit being set to “1”, OUT FIFO of the corresponding endpoint is changed into double buffer
mode. The byte count for a valid OUT 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
This bit enables continuous transfer mode.
Set this bit to “1” when continuous transfer is enabled. The bit is valid only in bulk transfer.
The USB function control unit writes the receive data from the host PC in OUT FIFO sequentially by
one packet size (the maximum packet size set in the EPxOMP) and receives continuously until one
buffer full or a short packet is received.
When continuous receive mode is enabled, the BUF_SIZ has to be equal to an integral multiple of
the EPxOMP. Further, the user's system has to be comprehended beforehand that the receive data
from the host PC are equal to the buffer size or includes a short packet.
Pay attention to the following when setting the BUF_NUM/BUF_SIZ:
- Not exceed 3072 bytes in OUT FIFO starting lo OUT FIFO size.
- Not overlap Endpoint FIFOs each other.
Figure 2.8.43. USB endpoint x(x=1 to 4) OUT FIFO configuration register
Bit Symbol
Bit Name
Function
R W
O O
Symbol
EPxOFC (x = 1 - 4)
Address
When reset
USB Endpoint x OUT 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 OUT 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 OUT 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 (Note)
1 : Enabled
O O
O O
O O
Note: Valid for bulk transfer type only
Must always be “0”
0
0
0
0
02BC
16
, 02C4
16
,
02CC
16
, 02D4
16
0000
16
Содержание M16C FAMILY
Страница 12: ...Chapter 1 Hardware...
Страница 13: ...See M30245 group datasheet...
Страница 14: ...Chapter 2 Peripheral Functions Usage...
Страница 303: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 304: ...Chapter 3 Examples of Peripheral Functions Applications...
Страница 340: ...Chapter 4 External Buses...
Страница 361: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 362: ...Chapter 5 Standard Characteristics...
Страница 369: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan M30245 Group REJ09B0340 0200 User s Manual...